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
0 : manual search , 1: scanner Called when the user clicks the Send button
@SuppressWarnings("unused") public void sendMessage(View view) { // Do something in response to button etGtin = (EditText) findViewById(R.id.et_gtin); gtin = etGtin.getText().toString(); int value_code = 99; String json = ""; //String imgpp1 = "http://product.okfn.org.s3.amazonaws.com/images/gtin/gtin-309/3095757343101.jpg"; // http://localhost/github/products/explorer/product/3095757343101 // http://www.le10sport.com/img/ico/icon-club/as-monaco.png // http://product.okfn.org.s3.amazonaws.com/images/gtin/gtin/309/3095757343101.jpg //json = "{\"gtin\":{\"code\":\"3095757343101\",\"name\":\"La c\u00f4tes de porc cuite et pr\u00e9par\u00e9e dans le filet\",\"product-line\":\"Charcuterie\",\"weight\":\"2 x 70 g\",\"volume\":null,\"alcool\":null,\"img\":\"http:--product.okfn.org.s3.amazonaws.com-images-gtin-gtin-309-3095757343101.jpg\",\"img-default\":\"http:--www.product-open-data.com-images-coming-soon.jpg\"},\"brand\":{\"code\":\"469\",\"name\":\"Fleury Michon\",\"type\":\"Manufacturer-brand\",\"link\":\"www.fleurymichon.fr\",\"img\":\"http:--product.okfn.org.s3.amazonaws.com-images-brand-00000469.jpg\",\"img-default\":\"http:--www.product-open-data.com-images-coming-soon.jpg\"},\"group\":{\"code\":null,\"name\":null},\"gcp\":{\"code\":\"309575\"},\"gpc\":{\"img\":\"http:--www.product-open-data.com-images-gpc-50000000.jpg\",\"img-default\":\"http:--www.product-open-data.com-images-coming-soon.jpg\",\"segment\":{\"code\":\"50000000\",\"nom\":\"Food-Beverage-Tobacco\"},\"family\":{\"code\":\"50240000\",\"nom\":\"Meat-Poultry\"},\"class\":{\"code\":\"50240100\",\"nom\":\"Meat-Poultry - Prepared-Processed\"},\"brick\":{\"code\":null,\"nom\":null}},\"gepir\":{\"return-code\":{\"code\":\"0\",\"name\":\"No error\"},\"source\":\"GEPIR\",\"gln\":{\"code\":\"3010957500109\",\"name\":\"FLEURY MICHON CHARCUTERIE SAS\",\"address-1\":\"BP 1\",\"address-2\":\"\",\"address-3\":\"\",\"cp\":\"85700\",\"city\":\"POUZAUGES\",\"country\":\"FR\"}}}"; if(gtin.length() > 0) { // CALL WEBSERVICE try { json = new MyTask().execute("http://www.product-open-data.com/product/"+gtin).get(); //Toast.makeText(this,"ok"+json,1000).show(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ExecutionException e) { // TODO Auto-generated catch block e.printStackTrace(); } JSONObject object; try { object = new JSONObject(json); value_code = object.getInt("code"); // GTIN JSONObject gtin = object.getJSONObject("gtin"); String value_gtin_code = gtin.getString("code"); String value_gtin_name = gtin.getString("name"); JSONObject brand = object.getJSONObject("brand"); String value_brand_code = brand.getString("code"); String value_brand_name = brand.getString("name"); String value_brand_type = brand.getString("type"); String value_brand_link = brand.getString("link"); String value_brand_img = brand.getString("img"); switch(value_code){ case 0 : etGtin.setText(value_gtin_code); break; case 1: Toast.makeText(this,"Não Achou",Toast.LENGTH_LONG).show(); break; case 2: Toast.makeText(this,"Inválido",Toast.LENGTH_LONG).show(); break; case 3: Toast.makeText(this,"Não Achou sei lá o q",Toast.LENGTH_LONG).show(); break; case 98: Toast.makeText(this,"Gtin code required",Toast.LENGTH_LONG).show(); break; case 99: Toast.makeText(this,"No Internet Connection",Toast.LENGTH_LONG).show(); break; } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { value_code = 98; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(ActionEvent InputEvent)\r\n {\r\n performSearch();\r\n }", "public void search() {\r\n \t\r\n }", "@Override\n\tpublic boolean onSearchRequested()\n\t{\n \tstartSearch(getCurSearch(), true, null, false);\n \treturn true;\n\t}", "private void searchFunction() {\n\t\t\r\n\t}", "private void findClubEvent () {\n \n findClubEvent (\n findButton.getText(), \n findText.getText().trim(), \n true);\n \n if (findText.getText().trim().length() == 0) {\n findText.grabFocus();\n statusBar.setStatus(\"Enter a search string\");\n }\n }", "public void search() {\n }", "void searchUI();", "@Override\n public void onClick(View v) {\n IntentIntegrator integ = IntentIntegrator.forSupportFragment(search_Fragement.this);\n integ.setCaptureActivity(CaptureAct.class);\n integ.setOrientationLocked(false);\n integ.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);\n integ.setPrompt(\"scanning code..\");\n integ.initiateScan();\n\n\n }", "private void searchMenu(){\n\t\t\n\t}", "private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }", "@ActionTrigger(action=\"KEY-ENTQRY\", function=KeyFunction.SEARCH)\n\t\tpublic void spriden_Search()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"QUERY\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "private void goSearch() {\n\t\tThread t = new Thread(this);\n\t\tt.start();\n\t}", "protected void lbl_searchEvent() {\n\t\tif(text_code.getText().isEmpty()){\n\t\t\tlbl_notice.setText(\"*请输入股票代码\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tif(text_code.getText().length()!=6||!Userinfochange.isNumeric(text_code.getText())){\n\t\t\tlbl_notice.setText(\"*股票代码为6位数字\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tif(text_place.getText().isEmpty()){\n\t\t\tlbl_notice.setText(\"*请输入股票交易所\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(!text_place.getText().equals(\"sz\") && !text_place.getText().equals(\"sh\")){\n\t\t\tlbl_notice.setText(\"*交易所填写:sz或sh\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tString[] informationtemp = null ;\n\t\ttry {\n\n\t\t\tinformationtemp = Internet.share.Internet.getSharedata(text_place.getText(), text_code.getText());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \"网络异常或者不存在该只股票\", \"异常\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t\tString name = informationtemp[0];\n\t\tif (name == null) {\n\t\t\tlbl_notice.setText(\"*不存在的股票\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\tString[] names = new String[2];\n\t\tSystem.out.println(\"搜索出的股票名:\" + name + \"(Dia_buy 297)\");\n\t\tnames = name.split(\"\\\"\");\n\t\tname = names[1];\n\t\tif (name.length() == 0) {\n\t\t\tlbl_notice.setText(\"*不存在的股票\");\n\t\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tinformation = informationtemp;\n\t\tplace = text_place.getText();\n\t\tcode=text_code.getText();\n\t\t\n\t\ttrade_shortsell();//显示文本框内容\n\t\t\n\t\tlbl_notice.setText(\"股票信息获取成功!\");\n\t\tlbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_GREEN));\n\t}", "public static void searchBtnPressed() throws IOException {\r\n // define a search model to search PCs\r\n PC search_model = new PC();\r\n if (nameFilter != null && !nameFilter.isEmpty())\r\n search_model.setName(nameFilter);\r\n if (descriptionFilter != null && !descriptionFilter.isEmpty())\r\n search_model.setDescription(descriptionFilter);\r\n if (instalationDateFilter != null)\r\n search_model.setInstallDate(instalationDateFilter);\r\n switch (statusFilter) {\r\n case 1:\r\n search_model.setStatus(Status.ENABLE);\r\n break;\r\n case 2:\r\n search_model.setStatus(Status.DISABLE);\r\n break;\r\n case 3:\r\n search_model.setStatus(Status.SUSPENDED);\r\n break;\r\n }\r\n if (selectedComponentsFilter != null)\r\n for (int i = 0 ; i < selectedComponentsFilter.length ; i ++)\r\n if (selectedComponentsFilter[i]) {\r\n Calendar cal = Calendar.getInstance();\r\n cal.add(Calendar.DAY_OF_MONTH, 1);\r\n search_model.setInstalledComps(new PCComp(enaComp.get(i).getID(), cal.getTime()));\r\n }\r\n \r\n // define search model options\r\n String search_options = installationDateModeFilter + \",\" + warrentyModeFilter;\r\n if (selectedSpecsFilter != null)\r\n for (int i = 0 ; i < selectedSpecsFilter.length ; i ++)\r\n if (selectedSpecsFilter[i])\r\n search_options = search_options + \",\" + enaSpec.get(i).toString();\r\n PCNMClientModel.sendMessageToServer(new Message(MessageType.PC_SEARCH, search_model, search_options));\r\n }", "public void searchSwitch() {\r\n\t\tif (searchEmails) {\r\n\t\t\tsearchEmails = false;\r\n\t\t\tlblNewLabel_1.setText(srchPatrons);\r\n\t\t} else {\r\n\t\t\tsearchEmails = true;\r\n\t\t\tlblNewLabel_1.setText(srchEmails);\r\n\t\t}\r\n\t}", "private void performSearch() {\n try {\n final String searchVal = mSearchField.getText().toString().trim();\n\n if (searchVal.trim().equals(\"\")) {\n showNoStocksFoundDialog();\n }\n else {\n showProgressDialog();\n sendSearchResultIntent(searchVal);\n }\n }\n catch (final Exception e) {\n showSearchErrorDialog();\n logError(e);\n }\n }", "private void searchTextFiledActionPerformed(ActionEvent evt) {\n }", "private void searchSNP(String searchString) {\r\n SNP currentSNP = getController().getActiveSNP();\r\n \r\n if (SNPInputActive) {\r\n System.out.println(\"SNP input is active.\");\r\n return;\r\n }\r\n //viewSelector.setEnabled(false); // TODO: check effects\r\n SNPInputActive = true;\r\n //SNPInformation.setCaption(\"\");\r\n System.out.println(\"searchSNP(): \" + searchString);\r\n //System.out.println(currentSNP == null);\r\n SNPInput.setValue(searchString.replaceFirst(\" \\\\[your input\\\\]$\", \"\"));\r\n searchString = searchString.replaceFirst(\" \\\\[.*?\\\\]$\", \"\");\r\n \r\n if (searchString.equals(\"null\") || searchString.equals(\"\") || (currentSNP != null && currentSNP instanceof VerifiedSNP && searchString.equals(currentSNP.getID()))\r\n || searchString.contains(\"(not found)\")) {\r\n SNPInputActive = false;\r\n System.out.println(\"SNP already chosen\");\r\n //SNPRightGrid.removeComponent(SNPInformation);\r\n //SNPInformation = new Label(\"\");\r\n //SNPRightGrid.addComponent(SNPInformation);\r\n //viewSelector.setEnabled(true);// TODO: check effects\r\n \r\n //return false;\r\n }\r\n \r\n \r\n phenotypeSelector.setEnabled(false);\r\n //System.out.println(\"disabled\");\r\n //Notification.sendPlotOptions(\"disabled\", Notification.Type.TRAY_NOTIFICATION);\r\n currentSNPInputValue = searchString;\r\n \r\n VerifiedSNP verifiedSNP = null;\r\n \r\n SNPIDParser snpIDParser = new SNPIDParser(searchString);\r\n SNPIDFormat IDFormat = snpIDParser.getIDFormat();\r\n \r\n //System.out.println(\"format: \" + snpIDParser.getIDFormat());\r\n \r\n if (IDFormat == SNPIDFormat.UNRECOGNIZED) {\r\n SNPInputActive = false;\r\n verifiedSNP = null;\r\n } \r\n else if (IDFormat.equals(SNPIDFormat.CHROMOSOME_POSITION)) { // SNP entered in format chromosome:position\r\n String chromosome = snpIDParser.getChromosome();\r\n String position = snpIDParser.getPosition();\r\n \r\n verifiedSNP = database.getSNP(chromosome, position);\r\n \r\n if (verifiedSNP != null && !verifiedSNP.hasData() && !verifiedSNP.hasAnnotation()) { // SNP is not found in the database system; try searching the neighbourhood\r\n Map <String, String> result = database.getNearestSNPs(chromosome, Integer.parseInt(position));\r\n System.out.println(\"result: \" + result);\r\n \r\n if (result.get(\"result\").equals(\"exact\")) {\r\n verifiedSNP = database.getSNP(new SNPIDParser(result.get(\"0\")));\r\n }\r\n else {\r\n List <String> snpOptions = new ArrayList();\r\n\r\n if (result.containsKey(\"-1\")) {\r\n snpOptions.add(result.get(\"-1\"));\r\n }\r\n if (result.containsKey(\"1\")) {\r\n snpOptions.add(result.get(\"1\"));\r\n }\r\n\r\n RadioButtonGroup <String> selection = new RadioButtonGroup(\"Select SNP\", snpOptions);\r\n selection.addValueChangeListener(event -> searchSNP(event.getValue()));\r\n String windowCaption = \"SNPs nearest to position \" + position + \" on chromosome \" + chromosome + \":\";\r\n Window window = new Window(windowCaption);\r\n window.center();\r\n window.setContent(selection);\r\n window.setWidth(Math.round(windowCaption.length()*9.7), Sizeable.Unit.PIXELS);\r\n window.setHeight(10, Sizeable.Unit.PERCENTAGE);\r\n getComponent().getUI().addWindow(window);\r\n }\r\n\r\n }\r\n }\r\n else {\r\n verifiedSNP = database.getSNP(snpIDParser);\r\n }\r\n \r\n \r\n \r\n //viewSelector.setEnabled(true);\r\n phenotypeSelector.setEnabled(true);\r\n //Notification.sendPlotOptions(\"enabled\", Notification.Type.TRAY_NOTIFICATION);\r\n //System.out.println(\"enabled\");\r\n if (verifiedSNP == null) {\r\n if (!snpUpdateInProgress) {\r\n if (IDFormat.equals(SNPIDFormat.CHROMOSOME_POSITION)) {\r\n getController().setActiveSNP(new InputSNP(snpIDParser.getChromosome(), snpIDParser.getPosition()));\r\n }\r\n else {\r\n getController().setActiveSNP(new InputSNP(searchString));\r\n }\r\n }\r\n }\r\n else {\r\n getController().setActiveSNP(verifiedSNP);\r\n }\r\n if (!snpUpdateInProgress) {\r\n updateSNP();\r\n }\r\n SNPInputActive = false;\r\n }", "private void readyToSearch() {\n Intent intent = new Intent(this, SearchActivity.class);\n startActivityForResult(intent, 21);\n }", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //回调搜索方式\n if (!bOpenDevice) {\n BluetoothComm.ScanDevice(DEVICE_ADDRESS_FILETER, 5, 1);\n if (!scan_progress.isShown()) {\n scan_progress.setVisibility(View.VISIBLE);\n }\n } else {\n showLogMessage(\"请先断开连接\");\n }\n }", "public String btnSimpleSearch_action()\n {\n String userInput = \"\";\n if(this.getTxSimpleSearch().getValue()!= null)\n userInput = this.getTxSimpleSearch().getValue().toString();\n userInput = userInput.trim();\n System.out.println(1);\n if(userInput.length()==0){\n //Se desabilitan las banderas de busqueda simple y avanzada\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(false);\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se setea el data provider del paginador con los datos por default\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countAllSemental().intValue());\n }\n else{\n //Setear el string para consulta simple del SessionBean\n this.getgermplasm$SementalSessionBean().setConsultaSimple(userInput);\n //Indicarle al SessionBean que el paginador debe \"trabajar\" en modo busqueda simple\n this.getgermplasm$SementalSessionBean().setQueryModeSimple(true);\n //Desabilitar la bandera de busqueda avanzada\n this.getgermplasm$SementalSessionBean().setQueryMode(false);\n //Finalmente se inicializa el data provider del paginador con los resultados de la consulta\n this.getgermplasm$SementalSessionBean().getPagination().setTotalResults\n (getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n countSementalSimpleSearch(\n userInput).intValue());\n }\n //set the first result of the query\n this.getgermplasm$SementalSessionBean().getPagination().firstResults();\n return null;\n }", "public void searchProd(){\n\t\t\n\t\t// STEP 4:-\n\t\t// Enter 'mobile' in search bar.\n\t\tWebElement search = driver.findElement(By.name(\"q\"));\n\t\tsearch.sendKeys(\"mobiles\");\n\t\tsearch.sendKeys(Keys.ENTER);\n\t\tSystem.out.println(\"Enter name successfully\");\n\t\t\t\t\t\n\t\t// Click on search icon.\n\t\t//WebElement searchClick = driver.findElement(By.className(\"L0Z3Pu\"));\n\t\t//searchClick.click();\n\t\t//System.out.println(\"clicked search button successfully\");\n\t}", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "void search();", "void search();", "void searchProbed (Search search);", "public void actionPerformed(ActionEvent e)\n\t{\n\t\tWindowController.searchFor();\n\t}", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n }", "@Override\r\n\tpublic void search() {\n\r\n\t}", "@Override\n\tpublic void search() {\n\t}", "@Override\n public boolean onQueryTextSubmit(String s) {\n Intent intent = new Intent(getApplicationContext(), SearchActivity.class);\n intent.putExtra(\"idBeca\", s);\n startActivity(intent);\n return true;\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n search(searchIput.getText().toString()); // search user\n }", "public boolean action(Event e,Object o)\r\n {\r\n String text; // Search text entered by the user.\r\n\tString searchText; // Lower case version of above.\r\n\tURL newURL=null;\r\n\r\n\t// Chech to see if the option menu has been selected.\r\n\r\n\tif(e.target instanceof Choice)\r\n\t{\r\n\t Choice c=(Choice)e.target;\r\n\t try\r\n\t {\r\n\t maxSearch=Integer.parseInt(c.getSelectedItem(),10);\r\n\t }\r\n\t catch(NumberFormatException ne)\r\n\t {\r\n\t maxSearch=MAX_NUMBER_PAGES;\r\n\t }\r\n\t}\r\n\r\n\t// Check to see if a check box has been pressed.\r\n\tif(e.target instanceof Checkbox)\r\n\t{\r\n\t if(caseSensitive.getState() == true)\r\n\t matchCase=true;\r\n else matchCase=false;\r\n\t if(matchWholeWord.getState() ==true)\r\n\t matchWord=true;\r\n else matchWord=false;\r\n\t}\r\n\r\n // A Button has been pressed - which determine.\r\n\tif(e.target instanceof Button)\r\n\t{\r\n\t if(e.target == search)\r\n\t {\r\n\t // Search button pressed - read in search text entered \r\n\t\ttext=inputArea.getText();\r\n\t\t// Make sure there's something to search for\r\n\t\tif(text.length()==0)\r\n\t\t return(false);\r\n\t\t// New Search so clear the GUI out\r\n\t\tif(resultsArea.countItems()>0)\r\n\t\t resultsArea.clear();\r\n disableButtons();\r\n\t\tabort.enable();\r\n\t\tstatusArea.setText(\"\");\r\n\t\t// Clear out previous search data\r\n\t\tpageNames.removeAllElements();\r\n\t\tpageMatch.removeAllElements();\r\n\t\t// We're off start the search thread\r\n\t\tcp=new SearchPages(this,hostName,text,maxSearch);\r\n\t\tcp.start();\r\n\t }\r\n\t else if(e.target == abort)\r\n\t {\r\n\t // Abort button Pressed - stop the thread.\r\n\t\tif(cp != null)\r\n\t\t cp.stop();\r\n\t\tcp=null;\r\n\t\t// Enable Button for another search.\r\n\t\tenableButtons();\r\n\t\tabort.disable();\r\n\t }\r\n\t else\r\n\t {\r\n\t // Clear Button Pressed - clear all the fields and return.\r\n\t\tinputArea.setText(\"\");\r\n\t\tstatusArea.setText(\"\");\r\n\r\n\t\t// Clear radio Buttons.\r\n\t\tcaseSensitive.setState(false);\r\n\t\tcaseInsensitive.setState(true);\r\n\t\tmatchWholeWord.setState(false);\r\n\r\n\t\t// Clear option menu.\r\n\t\tnumPagesChoice.select(0);\r\n\t\ttry\r\n\t\t{\r\n\t\t maxSearch=Integer.parseInt(numPagesChoice.getSelectedItem(),10);\r\n\t\t}\r\n\t\tcatch(NumberFormatException ex)\r\n\t\t{\r\n\t\t maxSearch=MAX_NUMBER_PAGES;\r\n\t\t}\r\n\t\t\r\n\t\tif(resultsArea.countItems()>0)\r\n\t\t resultsArea.clear();\r\n cp=null;\r\n\t }\r\n\t}\r\n\r\n\t// Selection made from the list of matches.\r\n\tif(e.target instanceof java.awt.List)\r\n\t{\r\n\t java.awt.List list=(java.awt.List)e.target;\r\n\t int index=list.getSelectedIndex();\r\n\r\n\t // Extract the page name from the list.\r\n\t if(index<pageMatch.size())\r\n\t {\r\n\t String URLSelected=(String)pageMatch.elementAt(index);\r\n\t\ttry\r\n\t\t{\r\n\t\t // If URL store then use it.\r\n\t\t if(URLSelected.startsWith(\"http:\") || URLSelected.startsWith(\"file:\"))\r\n\t\t newURL=new URL(URLSelected);\r\n else if(server==null)\r\n\t\t newURL=new URL(\"http://www.\"+hostName+\"/\"+URLSelected);\r\n else newURL=new URL(server+URLSelected);\r\n\t\t}\r\n\t\tcatch(MalformedURLException except){}\r\n\t\tgetAppletContext().showDocument(newURL,\"_self\");\r\n\t }\r\n\t}\r\n\treturn true; // We are done.\r\n }", "private void search() {\n \t\tString searchString = m_searchEditText.getText().toString();\n \n \t\t// Remove the refresh if it's scheduled\n \t\tm_handler.removeCallbacks(m_refreshRunnable);\n \t\t\n\t\tif ((searchString != null) && (!searchString.equals(\"\"))) {\n \t\t\tLog.d(TAG, \"Searching string: \\\"\" + searchString + \"\\\"\");\n \n \t\t\t// Save the search string\n \t\t\tm_lastSearch = searchString;\n \n \t\t\t// Disable the Go button to show that the search is in progress\n \t\t\tm_goButton.setEnabled(false);\n \n \t\t\t// Remove the keyboard to better show results\n \t\t\t((InputMethodManager) this\n \t\t\t\t\t.getSystemService(Service.INPUT_METHOD_SERVICE))\n \t\t\t\t\t.hideSoftInputFromWindow(m_searchEditText.getWindowToken(),\n \t\t\t\t\t\t\t0);\n \n \t\t\t// Start the search task\n \t\t\tnew HTTPTask().execute(searchString);\n \t\t\t\n \t\t\t// Schedule the refresh\n \t\t\tm_handler.postDelayed(m_refreshRunnable, REFRESH_DELAY);\n \t\t} else {\n \t\t\tLog.d(TAG, \"Ignoring null or empty search string.\");\n \t\t}\n \t}", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "private void btnSearch_Clicked() {\n\t\tString input_id=txtStuNum.getText();\n\t\tif(studao.ReturnScore(input_id)!=null) {\n\t\t\tJOptionPane.showMessageDialog(this,\"学生\"+input_id+\",您的成绩是:\"+studao.ReturnScore(input_id));\n\t\t}\n\t\telse if(studao.ReturnScore(input_id)==null){\n\t\t\tJOptionPane.showMessageDialog(this, \"输入栏为空或您还没有考试\");\n\t\t}\n\t}", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "public void clickSearch() {\n\t\twaitForDocumentReady(5);\n\t\tlog.debug(\"Clicking on search button\");\n\t\tclickOn(search_button, 20);\n\t\tlog.info(\"Clicked on search button\");\n\t\tlogger.log(Status.INFO, \"Search for cruise completed\");\n\t\t\n\t}", "private void searchWeb()\n {\n searchWeb = true;\n search();\n }", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "public void inputSearchText(String searchValue) {\n try {\n clickElement(eleToDoSearchInput, \"click to eleToDoSearchInput\");\n sendKeyTextBox(eleToDoSearchInput, searchValue, \"send key to searchTextToDoListPage\");\n Thread.sleep(smallerTimeOut);\n NXGReports.addStep(\"Ending Input Search.\", LogAs.PASSED, null);\n } catch (Exception e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Ending Input Search.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "private void searchFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchFieldKeyReleased\n searchWord();\n }", "public void search(String plateNumber) {\n regSearch.sendKeys(plateNumber);\n btnContinue.click();\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearchResults(text);\n }", "public void Search()\r\n {\r\n WaitTime(2000);\r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Logged in account!');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n \r\n driver.findElement(By.cssSelector(\"#searchData\")).sendKeys(\"samsung\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"a.searchBtn\")).click(); \r\n \r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Loaded Search Page');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n\r\n }", "private static void sendScanCodeEvent (int keyScanCode) {\n INPUT input = new INPUT();\n // Common properties\n input.input.setType(\"ki\");\n input.type = new WinDef.DWORD(WinUser.INPUT.INPUT_KEYBOARD);\n input.input.ki.time = new WinDef.DWORD(0);\n input.input.ki.wVk = new WinDef.WORD(0);\n\n // Not really needed. Can be used to identify generated keyboard inputs\n input.input.ki.dwExtraInfo = new BaseTSD.ULONG_PTR(0xBAADC0FE);\n\n // \"keyDown\": Key\n input.input.ki.wScan = new WinDef.WORD(keyScanCode);\n input.input.ki.dwFlags = new WinDef.DWORD(KEYEVENTF_SCANCODE); // default key down\n User32.INSTANCE.SendInput(new WinDef.DWORD(1), (WinUser.INPUT[]) input.toArray(1), input.size());\n\n // \"keyUp\" : Key\n input.input.ki.dwFlags = new WinDef.DWORD(KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP);\n User32.INSTANCE.SendInput(new WinDef.DWORD(1), (WinUser.INPUT[]) input.toArray(1), input.size());\n }", "private void searchCode() {\n }", "@Override\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "@Override\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "void searchStarted (Search search);", "@Override\n\t\t public boolean onKey(View v, int keyCode, KeyEvent event) {\n\n\t\t Log.d(\"SEARCH\", \"Search onkey\");\n\t\t return false;\n\t\t }", "@And(\"^I searched for \\\"([^\\\"]*)\\\"$\")\t\t\t//Currently used by Order search & Passive Device Container \r\n\tpublic void i_searched_for_device(String field) throws Exception {\r\n\t\tSystem.out.println(field);\r\n\t\tenduser.fill_fields(field);\r\n\t\t//enduser.click_searchBtn();\t \r\n\t}", "public void clickSearchButton() {\n\t\tsearchButton.click();\n\t}", "private void scanTicket(){\r\n\t\ttext = numberField.getText();\r\n\t\t//Number field text is converted into char \r\n\t\tstringToChar(text);\r\n\t\tif(executed == false){\r\n\t\t\trandom();\r\n\t\t}\r\n\t}", "public boolean performAction() {\n // Save the combo history so previous search strings can be retrieved\n historyManager.updateHistory(searchStringCombo.getText());\n historyManager.saveHistory();\n\n // Get the scope for the search based on the users choice.\n SearchScope scope = new SearchScopeFactory().\n createSearchScope(getContainer(),\n new FileExtension[]{FileExtension.DEVICE_REPOSITORY});\n\n // Set up the options for the query based on the users choice.\n DeviceSearchQueryOptions options = new DeviceSearchQueryOptions();\n options.setCaseSensitive(caseButton.getSelection());\n options.setDeviceNameSearch(deviceNameSearch.getSelection());\n options.setDevicePatternSearch(devicePatternsSearch.getSelection());\n options.setRegularExpression(regExpButton.getSelection());\n\n // Create the query.\n DeviceSearchQuery query = new DeviceSearchQuery(scope,\n searchStringCombo.getText(), options);\n\n // Activate the view page and run the query.\n NewSearchUI.activateSearchResultView();\n NewSearchUI.runQuery(query);\n\n // Save the dialogSetting as a permanent source of the selected\n // dialog options so they can be retrieved next time the user opens\n // the dialog.\n dialogSettings.put(caseButton.getText(), caseButton.getSelection());\n dialogSettings.put(regExpButton.getText(), regExpButton.getSelection());\n dialogSettings.put(deviceNameSearch.getText(),\n deviceNameSearch.getSelection());\n dialogSettings.put(devicePatternsSearch.getText(),\n devicePatternsSearch.getSelection());\n\n return true;\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n try {\n if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n final ArrayList<String> matches = data\n .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n\n String voiceResult = matches.get(0);\n final String voiceResultNoWhitespace = voiceResult.replace(\" \", \"\");\n\n if (DataHelper.isWordOnlyNumeric(voiceResultNoWhitespace)) {\n voiceResult = voiceResultNoWhitespace;\n }\n\n mSearchField.setText(\"\");\n mSearchField.setText(voiceResult);\n }\n if (requestCode == SCAN_BARCODE_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n final String contents = data.getStringExtra(\"SCAN_RESULT\");\n\n mSearchField.setText(\"\");\n mSearchField.setText(contents);\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }\n catch (final Exception e) {\n showSearchErrorDialog();\n logError(e);\n }\n }", "public void firstSearch() {\n\n\t\tif ((workspaceSearchField.getText() == null) || \"\".equals(workspaceSearchField.getText())) {\n\t\t\tworkspaceSearchField.setText(mainGUI.getSearchFieldText());\n\t\t\tsearchInWorkspaceFor(workspaceSearchField.getText());\n\t\t}\n\t}", "@Override \n public void onActivityResult(int requestCode, int resultCode, Intent data) \n { \n \n if(requestCode==1) \n { \n \tString barcode=data.getStringExtra(\"BARCODE\");\n \tif (barcode.equals(\"NULL\"))\n \t{\n \t\t//that means barcode could not be identified or user pressed the back button\n \t\t//do nothing\t\n \t}\n \telse\n \t{\n \t\tsearch.setQuery(barcode, true);\n \t\tsearch.setIconifiedByDefault(false);\n \t}\n }\n \n if (requestCode == 2) {\n ArrayList<String> results;\n results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n //Toast.makeText(this, results.get(0), Toast.LENGTH_SHORT).show();\n \n //if the name has an ' then the SQL is failing. Hence replacing them. \n String text = results.get(0).replace(\"'\",\"\");\n search.setQuery(text, true);\n \t\tsearch.setIconifiedByDefault(false);\n }\n \n }", "private View.OnKeyListener onEnterPerformSearch() {\n return new View.OnKeyListener() {\n\n @Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n try {\n if (event.getAction() == KeyEvent.ACTION_DOWN\n && keyCode == KeyEvent.KEYCODE_ENTER) {\n performSearch();\n return true;\n }\n if (event.getAction() == KeyEvent.ACTION_DOWN\n && keyCode == KEYCODE_SCAN_HARDWARE_BUTTON) {\n mSearchField.setText(\"\");\n return true;\n }\n return false;\n }\n catch (final Exception e) {\n showSearchErrorDialog();\n logError(e);\n return false;\n }\n }\n };\n }", "public static void Action() {\r\n\t\r\n \r\n ActionListener actionListener = new ActionListener() {\r\n public void actionPerformed(ActionEvent event) {\r\n SearchBox();\r\n \r\n }\r\n };\r\n\r\n b1.addActionListener(actionListener);\r\n \r\n }", "public void star() {\n log.info(\"start: Start frame search\");\n frameSearch.getTpDataBase().getBtSave();\n frameSearch.getPnSearch().getBtSearch().addActionListener(a -> getAtribut());\n frameSearch.getTpDataBase().getBtSave().addActionListener(a -> getAtributOne());\n }", "@Override\n\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "HasClickHandlers getSearchButton();", "private void enterCriteriaToSerachField(String text) {\n WebElement searchField = findElementWithWait(By.id(\"gh-ac\"));\n searchField.clear();\n searchField.sendKeys(text);\n searchField.sendKeys(Keys.RETURN);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n adaptee.btnIDSearch_actionPerformed(e);\r\n\t}", "private void search() {\n if (isConnected()) {\r\n query = searchField.getText().toString();\r\n mLoader.setVisibility(View.VISIBLE);\r\n emptyStateTextView.setText(\"\");\r\n //restart the loader with the new data\r\n loaderManager.restartLoader(1, null, this);\r\n } else {\r\n String message = getString(R.string.no_internet);\r\n new AlertDialog.Builder(this).setMessage(message).show();\r\n }\r\n }", "public void startSearchSmbDevice() {\n this.stopRun = false;\n this.deviceList.clear();\n String smbUrl = getLocalIP();\n LogUtils.i(TAG, \"startSearchSmbDevice ip:\" + smbUrl);\n if (smbUrl != null && smbUrl.length() >= MIX_IP_COUNT) {\n if (!smbUrl.contentEquals(LOCAL_HOST) && onSmbSearchListener != null && !smbUrl.contains(\":\")) {\n this.scanCompleted.set(0);\n\n for (int i = 0; i < MAX_THREAD_COUNT; ++i) {\n if (this.stopRun) {\n this.isScanning = false;\n break;\n }\n int subCount = 256 / MAX_THREAD_COUNT;\n new Thread(new PingRunnable(\n smbUrl,\n i + 1,\n i * subCount + 1,\n i * subCount + subCount,\n onSmbSearchListener)\n ).start();\n isScanning = true;\n }\n } else {\n this.isScanning = false;\n if (logEnable) {\n Log.e(TAG, \"no ip address or recv listener! \");\n }\n if (onSmbSearchListener != null) {\n onSmbSearchListener.onSearch(OnSmbSearchListener.UPDATE_DEVICE_CANCEL, null);\n }\n\n }\n } else {\n this.isScanning = false;\n if (logEnable) {\n Log.e(TAG, \"no ip address!\");\n }\n if (onSmbSearchListener != null) {\n onSmbSearchListener.onSearch(OnSmbSearchListener.UPDATE_DEVICE_CANCEL, null);\n }\n\n }\n }", "private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }", "public void startScan()\n {\n Toolbox.toast(getContext(), \"Starting scan...\");\n //------------------------------------------------------------\n // Clear the list of devices and make sure user has Bluetooth\n // turned on\n clearDeviceLists();\n if ( !Toolbox.checkBLEAdapter(bleAdapter) )\n {\n Toolbox.requestUserBluetooth(mainActivity);\n }\n else\n {\n scanLeDevice(true);\n }\n }", "public Result clickSearch() {\n\t\tthis.searchButton.click();\r\n\t\treturn new Result(driver);\r\n\t}", "private void searchSpecificCar() {\n\t\tSystem.out.print(\"Enter Registration Number: \");\n\t\tSystem.out.println(application.displaySpecificCar(console.nextLine()));\n\t}", "@FXML\n\tvoid search(ActionEvent event) {\n\n\t\ttry {\n\n\t\t\tif(idEditText.getText().equals(\"\")) {\n\n\t\t\t\tthrow new InsufficientInformationException();\n\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\tPlanetarySystem ps = ns.search(Integer.parseInt(idEditText.getText()));\n\n\t\t\t\tif(ps != null) {\n\t\t\t\t\t\n\t\t\t\t\tloadInformation(ps);\t\t\t\t\t\n\t\t\t\t\teditSelectionAlerts();\n\t\t\t\t\tupdateValidationsAvailability(true);\n\t\t\t\t\tupdateButtonsAvailability(true, true, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsystemNotFoundAlert();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tcatch(InsufficientInformationException e) {\n\t\t\tinsufficientDataAlert();\n\t\t}\n\t\tcatch(Exception ex) {\n\t\t\tsystemNotFoundAlert();\n\t\t}\n\n\t}", "private void searchforResults() {\n\n List<String> queryList = new SavePreferences(this).getStringSetPref();\n if(queryList != null && queryList.size() > 0){\n Log.i(TAG, \"Searching for results \" + queryList.get(0));\n Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);\n searchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n searchIntent.putExtra(SearchManager.QUERY, queryList.get(0));\n this.startActivity(searchIntent);\n }\n }", "public void type(String string) {\n\t\tthis.search.sendKeys(string);;\r\n\t}", "private void showSearch() {\n\t\tonSearchRequested();\n\t}", "public void doSearch(String searchText){\n }", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "private void txtSearchingBrandKeyReleased(java.awt.event.KeyEvent evt) {\n String query=txtSearchingBrand.getText().toUpperCase();\n filterData(query);\n }", "private static void sendScanCodeEvent (int keyScanCode, int modifierScanCode) {\n INPUT input = new INPUT();\n // Common properties\n input.input.setType(\"ki\");\n input.type = new WinDef.DWORD(WinUser.INPUT.INPUT_KEYBOARD);\n input.input.ki.time = new WinDef.DWORD(0);\n input.input.ki.wVk = new WinDef.WORD(0);\n\n // Not really needed. Can be used to identify generated keyboard inputs\n input.input.ki.dwExtraInfo = new BaseTSD.ULONG_PTR(0xBAADC0FE);\n\n // \"keyDown\": Modifier\n input.input.ki.wScan = new WinDef.WORD(modifierScanCode);\n input.input.ki.dwFlags = new WinDef.DWORD(KEYEVENTF_SCANCODE); // default key down\n User32.INSTANCE.SendInput(new WinDef.DWORD(1), (WinUser.INPUT[]) input.toArray(1), input.size());\n\n // \"keyDown\": Key\n input.input.ki.wScan = new WinDef.WORD(keyScanCode);\n input.input.ki.dwFlags = new WinDef.DWORD(KEYEVENTF_SCANCODE); // default key down\n User32.INSTANCE.SendInput(new WinDef.DWORD(1), (WinUser.INPUT[]) input.toArray(1), input.size());\n\n // \"keyUp\" : Key\n input.input.ki.dwFlags = new WinDef.DWORD(KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP);\n User32.INSTANCE.SendInput(new WinDef.DWORD(1), (WinUser.INPUT[]) input.toArray(1), input.size());\n\n // \"keyUp\": Modifier\n input.input.ki.wScan = new WinDef.WORD(modifierScanCode);\n input.input.ki.dwFlags = new WinDef.DWORD(KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP);\n User32.INSTANCE.SendInput(new WinDef.DWORD(1), (WinUser.INPUT[]) input.toArray(1), input.size());\n }", "private void scanSSIDs() {\n if (mRecognitionTimeoutAnimation != null) mRecognitionTimeoutAnimation.cancel();\n\n // UI Updates\n hideMatchView();\n mRescanButton.setVisibility(View.GONE);\n mTimeClockBar.setVisibility(View.GONE);\n mScannerView.setAnimated(false);\n\n mStatusTextView.setVisibility(View.VISIBLE);\n mStatusTextView.setText(R.string.status_wifi_search);\n mStatusProgressBar.setVisibility(View.VISIBLE);\n\n scanSSIDsInBackground();\n }", "public void ClickSearch() {\r\n\t\tsearch.click();\r\n\t\t\tLog(\"Clicked the \\\"Search\\\" button on the GIS Locator page\");\r\n\t}", "public void onSearchStarted();", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "@Override\n public void run() {\n if(ScanSerice.isPressed()|| ScanSerice.isLoop()){\n startScanner();\n }else{\n stopScanner();\n }\n }", "@Override\n\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\n\t\t}", "@Override\r\n\tpublic void onScanViewButtonClick() {\n\r\n\t}", "@Override\n\tpublic void onScanViewButtonClick() {\n\t\t\n\t}", "public boolean openSearch(){\n return true;\n }", "@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase MSG_SEARCH_FINISHED:\n\t\t\t\t\tafterSearch();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t}", "private void onScanActionSelected() {\n Intent intent = new Intent(this, ScanActivity.class);\n startActivity(intent);\n }", "String searchBoxUserRecordSelected();", "public void searchByAccount() {\n\t\t\n\t\tlog.log(Level.INFO, \"Please Enter the account number you want to search: \");\n\t\tint searchAccountNumber = scan.nextInt();\n\t\tbankop.search(searchAccountNumber);\n\n\t}", "public void searchItem(String itemnum){\t\r\n\t\tString searchitem = getValue(itemnum);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+searchitem);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Item should be searched in the search box\");\r\n\t\ttry{\r\n\t\t\t//editSubmit(locator_split(\"txtSearch\"));\r\n\t\t\twaitforElementVisible(locator_split(\"txtSearch\"));\r\n\t\t\tclearWebEdit(locator_split(\"txtSearch\"));\r\n\t\t\tsendKeys(locator_split(\"txtSearch\"), searchitem);\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Item is searched in the search box\");\r\n\t\t\tSystem.out.println(\"Search item - \"+searchitem+\" is entered\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Item is not entered in the search box \"+elementProperties.getProperty(\"txtSearch\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtSearch\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public void clickOnSearchButton() {\n elementControl.clickElement(searchButton);\n }", "public void actionPerformed(ActionEvent e) {\r\n\r\n if (identifier.intValue() == KeyEvent.VK_F3 || identifier.intValue() == KeyEvent.VK_ENTER) {\r\n btnSearch.doClick();\r\n }\r\n else if (identifier.intValue() == KeyEvent.VK_F12 || identifier.intValue() == KeyEvent.VK_ESCAPE) {\r\n btnCancel.doClick();\r\n }\r\n }", "@Override\n public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) {\n if (arg1 == EditorInfo.IME_ACTION_SEARCH) {\n sw_refresh.setRefreshing(true);\n query();\n }\n return false;\n }", "public void ClickScanner(View view){\n MainActivity.redirectActivity(this,Scanner.class);\n\n }", "public void run() {\n //txtReferredBy.requestFocus(); (commented because the lookup should always be through btnLookup\n btnLookup.requestFocus();\n }", "public String search() {\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn SUCCESS;\r\n\t}" ]
[ "0.6709554", "0.6569812", "0.63800716", "0.63557535", "0.6336656", "0.63356495", "0.6305334", "0.63024145", "0.6293189", "0.6257316", "0.6246848", "0.6239775", "0.62292373", "0.6226686", "0.61914796", "0.61883515", "0.6162218", "0.6139884", "0.6110371", "0.60943216", "0.6080653", "0.60663927", "0.6054313", "0.6046714", "0.60288376", "0.60288376", "0.60261345", "0.60085243", "0.60072863", "0.5995774", "0.5992288", "0.59836626", "0.59796923", "0.59722656", "0.5970183", "0.59634846", "0.5961086", "0.5937694", "0.5937694", "0.5910533", "0.59093535", "0.5907669", "0.5891086", "0.58817863", "0.58810973", "0.5864329", "0.5859498", "0.58554465", "0.58494437", "0.5844137", "0.5844137", "0.5844131", "0.5840194", "0.5836455", "0.5835607", "0.583559", "0.5834037", "0.5833554", "0.5832709", "0.5826988", "0.58145416", "0.5805931", "0.5801244", "0.57975686", "0.57922316", "0.5790329", "0.57888657", "0.5788837", "0.57832116", "0.5779661", "0.5778966", "0.5778612", "0.5777233", "0.5775542", "0.57721215", "0.57679605", "0.5763453", "0.57556206", "0.57526135", "0.5752299", "0.57492286", "0.57453483", "0.57439405", "0.5741844", "0.5739884", "0.57386005", "0.5730182", "0.57289934", "0.5727156", "0.5722465", "0.5719564", "0.57090545", "0.57005805", "0.5692483", "0.5686518", "0.56862974", "0.5684255", "0.5677578", "0.5676562", "0.5666389", "0.56648916" ]
0.0
-1
TODO Autogenerated method stub
public int getCount() { return questionList.size(); }
{ "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
public Object getItem(int arg0) { return null; }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
public long getItemId(int position) { return position; }
{ "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
Scanner to take input / Constructor: The constructor for Zoo takes in two Strings; one .txt file for the Staff list and another separate .txt file for the Region list. The number of regions and the number of staff are initialized to 0.
public Zoo(String f1Name, String f2Name) { numRegions = 0; numStaff = 0; loadStaffList(f1Name); loadRegionList(f2Name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createAmazonRainforest (BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int tempMaxStaff = Integer.parseInt(in.readLine());\n int tempNumStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n \n for (int i = 0; i < tempNumStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n \n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int tempMaxAnimals = Integer.parseInt(in.readLine());\n int tempNumAnimals = Integer.parseInt(in.readLine());\n \n Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals;\n \n for (int i = 0; i < tempNumAnimals; i++) {\n readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n RegionSpec tempSpec = new RegionSpec (tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()),\n Double.parseDouble(in.readLine()));\n \n regionList[numRegions] = new AmazonRainforest(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()),\n Boolean.parseBoolean(in.readLine()), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()),\n Integer.parseInt(in.readLine())); \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++;\n }", "private void createArctic(BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int maxStaff = Integer.parseInt(in.readLine());\n int numStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[maxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n for (int i = 0; i < numStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int maxAnimals = Integer.parseInt(in.readLine());\n int numAnimals = Integer.parseInt(in.readLine());\n \n Animal[] animals = new Animal[numAnimals]; //creating a local array of Animals;\n for (int i = 0; i < numAnimals; i++) {\n animals[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n regionList[this.numRegions] = new Arctic(readStaffList, animals, tempRegionName, new RegionSpec(numStaff, maxStaff, numAnimals, maxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())), \n Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine()), Double.parseDouble(in.readLine()), Boolean.parseBoolean(in.readLine()));\n //constructor call \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++; //updates the global field numRegions\n }", "private void createAquarium (BufferedReader in) { \n try {\n String tempRegionName = in.readLine();\n int tempMaxStaff = Integer.parseInt(in.readLine());\n int tempNumStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor\n \n for (int i = 0; i < tempNumStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int tempMaxAnimals = Integer.parseInt(in.readLine());\n int tempNumAnimals = Integer.parseInt(in.readLine());\n \n Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals;\n \n for (int i = 0; i < tempNumAnimals; i++) {\n readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n RegionSpec tempSpec = new RegionSpec(tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()), \n Double.parseDouble(in.readLine()));\n \n regionList[numRegions] = new Aquarium(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()), \n Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()),\n Integer.parseInt(in.readLine()));\n //maybe we left out regionName in the constructor for saving and loading the files\n \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n numRegions++; //check over this /updates the global field numRegions\n \n \n }", "public void init() throws IOException{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\tline=in.readLine();\n\t\tif(line.trim().length()!=0)\n\t\t\tnum=Integer.parseInt(line.trim());\n\t\tfor(int i=0; i<num; i++){\n\t\t\tHashSet<Integer> datasets = new HashSet<Integer>();\n\t\t\tline=in.readLine();\n\t\t\tif(line.trim().length()!=0){\n\t\t\t\tString[] strs=line.trim().split(\"\\\\s+\");\n\t\t\t\tfor(String s: strs){\n\t\t\t\t\tif(s.trim().length()!=0){\n\t\t\t\t\t\tdatasets.add(new Integer(s.trim()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcenters.add(datasets);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(\"IslandFerriesIN.txt\"));\n\n while (br.ready()) {\n String[] data = br.readLine().split(\" \");\n int numIslands = Integer.parseInt(data[0]);\n int numFerries = Integer.parseInt(data[1]);\n int destIsland = Integer.parseInt(br.readLine());\n Ferry[] ferries = new Ferry[numFerries];\n for (int i = 0; i < numFerries; i++) {\n data = br.readLine().split(\" \");\n ferries[i] = new Ferry();\n ferries[i].startIsland = Integer.parseInt(data[0]);\n ferries[i].endIsland = Integer.parseInt(data[1]);\n ferries[i].ferryCost = Integer.parseInt(data[2]);\n }\n System.out.println(minTotalCost(numIslands, numFerries, destIsland, ferries));\n }\n br.close();\n }", "private static int Initialize (String[] list)\n {\n\t\tString filename, stateInput;\n \t\tint i = 0, numItems = 0;\n \t \ttry {\n System.out.print(\"Input File : \");\n Scanner stdin = new Scanner(System.in);\n filename = stdin.nextLine();\n stdin = new Scanner(new File(filename));\n\n while ((stdin.hasNext()) && (i < list.length))\n {\n stateInput = stdin.nextLine();\n System.out.println(\"S = \" + stateInput);\n list[i] = stateInput;\n i++;\n }\n numItems = i;\n }\n catch (IOException e) {\n System.out.println(e.getMessage());\n }\n return numItems;\n }", "public void load(String inFN) throws FileNotFoundException\n {\n String check = \" \";\n \tfile = new Scanner(new FileReader(inFN));\n \n \t// Rip apart the string and find the number of cities\n \t// Save it to a misc string named fileInfo\n \twhile (!check.equals(\"NODE_COORD_SECTION\"))\n {\n \tcheck = file.next();\n \t// Get the number of cities from the file\n \tif (check.equals(\"DIMENSION\"))\n \t{\n \t\t// Removes the character ':'\n \t\tcheck = file.next();\n \t\tfileInfo = fileInfo + check + \" \";\n \t\t\n \t\t// Extracts the number of cities\n \t\tcityNumber = file.nextInt();\n \t\tfileInfo = fileInfo + cityNumber + \" \";\n \t}\n \t\n \t// Dumps the fileinfo into one string\n \tfileInfo = fileInfo + check + \" \";\n }\n\n \t// Now that we have the number of cities, use it to\n \t// initialize an array\n \tcity = new City[cityNumber];\n \t\n \t// Loads the city data from the file into the city array\n \tfor (int i = 0; i < cityNumber; i++)\n {\n \t\tfile.nextInt();\n \tcity[i] = new City(i, file.nextDouble(), file.nextDouble());\n \t}\n }", "static void constructUnionFindDataStructure() {\n\n\t\t// construct a scanner for an input file\n\t\tScanner scanner = null;\n\t\ttry {\n\n\t\t\tscanner = new Scanner(new File(\"tinyUF.txt\"));\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// read the number of objects from the standard input\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\t// initialise a union-find data structure\n\t\tUnionFind unionFind = new UnionFind(n);\n\n\t\t/* Repeatedly read in pairs of integers (object identifiers). If they are not yet connected, connect them\n\t\t * and print out the pair */\n\n\t\twhile (scanner.hasNextLine()) {\n\n\t\t\t// read integers\n\t\t\tString pair = scanner.nextLine();\n\t\t\tString[] objects = pair.split(\" \");\n\t\t\tint p = Integer.parseInt(objects[0]);\n\t\t\tint q = Integer.parseInt(objects[1]);\n\n\t\t\t// connect them if not already\n\t\t\tif (!unionFind.connected(p, q)) {\n\n\t\t\t\tunionFind.union(p, q);\n\t\t\t\tSystem.out.println(p + \" \" + q);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n File data = new File(\"C:\" + File.separatorChar + \"temp\" + File.separatorChar \r\n + \"labFile.txt\");\r\n \r\n BufferedReader in = null;\r\n int count = 0;\r\n int recordCount = 0;\r\n try {\r\n //FileReader is being decorated by BufferedReader to make it read faster\r\n //buffered allows us to talk to file\r\n //open the stream\r\n in = new BufferedReader(new FileReader(data));\r\n //read the first line\r\n String line = in.readLine();\r\n //so long as line we just read is not null then continue reading file\r\n //if line is null it's end of file\r\n while (line != null) {\r\n \r\n \r\n if (count == 0) {\r\n String[] myStringArray = line.split(\" \");\r\n \r\n System.out.println(\"First Name: \" + myStringArray[0]);\r\n System.out.println(\"Last Name: \" + myStringArray[1]); \r\n } else if (count == 1) {\r\n \r\n System.out.println(\"Street Address: \" + line); \r\n } else if (count == 2) {\r\n \r\n String[] myStringArray = line.split(\" \");\r\n System.out.println(\"City: \" + myStringArray[0].replace(\",\", \" \"));\r\n System.out.println(\"State: \" + myStringArray[1]);\r\n System.out.println(\"Zip: \" + myStringArray[2]);\r\n \r\n count = -1;\r\n recordCount++;\r\n System.out.println(\"\");\r\n System.out.println(\"Number of records read: \" + recordCount);\r\n System.out.println(\"\");\r\n } \r\n count++;\r\n \r\n //reads next line\r\n line = in.readLine(); // strips out any carriage return chars\r\n \r\n }\r\n\r\n } catch (IOException ioe) {\r\n System.out.println(\"Houston, we have a problem! reading this file\");\r\n //want to close regardless if there is an error or not\r\n } finally {\r\n try {\r\n //close the stream\r\n //closing the file throws a checked exception that has to be surrounded by try catch\r\n in.close();\r\n } catch (Exception e) {\r\n\r\n }\r\n }\r\n }", "public static void main(String[] args) throws IOException {\r\n\r\n File file = new File(\"Load_Shedding_All_Areas_Schedule_and_Map.clean.final.txt\");\r\n\r\n LSItemsArray = new LSItems[2976];\r\n Scanner scan;\r\n //Scanner scan = new Scanner(file);\r\n\r\n try {\r\n scan = new Scanner(file);\r\n int count = 0;\r\n while (scan.hasNextLine()){\r\n String line = scan.nextLine();\r\n String[] splitString = splitString(line);\r\n //System.out.println(Arrays.toString(splitString));\r\n LSItems lsItem = new LSItems(splitString[0], splitString[1]);\r\n LSItemsArray[count] = lsItem;\r\n count++;\r\n }\r\n scan.close();\r\n\r\n }\r\n catch(FileNotFoundException e) {\r\n throw new RuntimeException(e);\r\n }\r\n\r\n\r\n if (args.length != 0) {\r\n printAreas(args[0]);\r\n try {\r\n writeOperationsToTxt(args[0], opCount);\r\n writeOperationsToCSV(args[0], opCount);\r\n }\r\n catch(FileNotFoundException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n else\r\n printAllAreas();\r\n\r\n }", "public Counselor(String first, String last, String password, String p1, String p2, String p3, String p4, \n String p5, String p6, String p7, String p8)\n {\n super(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8);\n students = new ArrayList<Student>();\n }", "public void initialize(InputStream is) {\n // Get data out of the restaurants file and store it in a readable way.\n ArrayList<String> restaurantData = getFileData(is);\n\n // Fill arrayList with restaurant objects by properly initializing restaurants.\n initializeRestaurantList(restaurantData);\n }", "public int readPersonsFromFile(int numberOfLines) {\n listOfPatients = new Person[numberOfLines];\n StdIn.readLine();\n for(int i = 0 ; i < numberOfLines ; i ++){\n String data = StdIn.readLine();\n // System.out.println(data);\n String[] dataValues = data.split(\" \");\n for(int j = 0; j < dataValues.length ; j++){\n dataValues[j] = dataValues[j].trim();\n }\n \n Person p = new Person(Integer.parseInt(dataValues[0]),Integer.parseInt(dataValues[1]),Integer.parseInt(dataValues[2]),Integer.parseInt(dataValues[3]),Integer.parseInt(dataValues[4]),Integer.parseInt(dataValues[5]),Integer.parseInt(dataValues[6]));\n addPerson(p, i);\n }\n\n return numberOfLines;\n\n }", "public static void main(String[] args) throws IOException {\n FileInputStream fis = new FileInputStream(\"out/cities.txt\");\r\n \r\n // Create DataInputStream object wrap 'fis'.\r\n DataInputStream dis = new DataInputStream(fis);\r\n \r\n //\r\n // Read data.\r\n //\r\n int cityId1 = dis.readInt();\r\n System.out.println(\"Id: \" + cityId1);\r\n String cityName1 = dis.readUTF();\r\n System.out.println(\"Name: \" + cityName1);\r\n int cityPopulation1 = dis.readInt();\r\n System.out.println(\"Population: \" + cityPopulation1);\r\n float cityTemperature1 = dis.readFloat();\r\n System.out.println(\"Temperature: \" + cityTemperature1);\r\n \r\n //\r\n // Read data.\r\n //\r\n int cityId2 = dis.readInt();\r\n System.out.println(\"Id: \" + cityId2);\r\n String cityName2 = dis.readUTF();\r\n System.out.println(\"Name: \" + cityName2);\r\n int cityPopulation2 = dis.readInt();\r\n System.out.println(\"Population: \" + cityPopulation2);\r\n float cityTemperature2 = dis.readFloat();\r\n System.out.println(\"Temperature: \" + cityTemperature2);\r\n \r\n dis.close();\r\n }", "public void readFile(File inputFile) throws FileNotFoundException, IOException, ClassNotFoundException {\n\n ArrayList<Student> studentList = null;\n int noOfStudents = 1; int noOfProjects = 0;\n int count = 1;\n String title; String school; String supervisor; Project project = null; \n ArrayList<Project> projectList = new ArrayList<>();\n\n Scanner scan = new Scanner(new FileReader(inputFile));\n String line = null;\n\n while (scan.hasNextLine()) {\n studentList = new ArrayList<>();\n \n if (count == 1) {\n line = scan.nextLine();\n noOfProjects = Integer.parseInt(line);\n System.out.println(line);\n }\n\n line = scan.nextLine();\n String[] projectInfo = line.split(\",\", 5);\n noOfStudents = Integer.parseInt(projectInfo[3]);\n String[] studentInfo = projectInfo[4].split(\",\");\n\n Student student = null;\n \n for (int k = 0; k < studentInfo.length; k+=4) {\n //new Student(AdminNo, Name, Course, Gender)\n student = new Student(studentInfo[k], studentInfo[k+1], studentInfo[k+2], studentInfo[k+3]);\n studentList.add(student); //Add new Student to List\n }\n\n title = projectInfo[0];\n school = projectInfo[1];\n supervisor = projectInfo[2];\n project = new Project(title, school, supervisor, noOfStudents, studentList);\n \n System.out.println(line);\n count++;\n \n projectList.add(project);\n }\n\n for (Student stud: studentList) {\n System.out.println(stud.getAdminNo() + stud.getCourse() + stud.getGender() + stud.getName());\n }\n \n writeToFile(project);\n \n scan.close();\n }", "public void init(String inputFile) \n\t{\t\t\n\t\tif (instance != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\ts = new Scanner(new FileReader(inputFile));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\\nnot a valid inputFile\");\n\t\t\t}\n\t\t\t//load mapping of reserved words and special symbols\n\t\t\tLoadCoreValues();\n\t\t\tinstance = new Tokenizer();\n\t\t}\n\t}", "public void loadStaffList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxStaff = Integer.parseInt(in.readLine());\n staffList = new Staff[maxStaff];\n int numStaffInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numStaffInFile; i++){\n \n String staffType = in.readLine();\n if (staffType.equals(\"Labourer\")) {\n staffList[i] = new Labourer(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()));\n numStaff++;\n } else if (staffType.equals(\"Manager\")) /*;*/\n {\n staffList[i] = new Manager(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()));\n numStaff++;\n }\n }\n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n \n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "public static void main(String[] args) {\n\t\tFile file = new File(\"src/day/d16/input.txt\");\n\t\tString line = \"\";\n\t\tList<Register> before = new ArrayList<>();\n\t\tList<Integer> ins = new ArrayList<>();\n\t\tList<Register> after = new ArrayList<>();\n\t\t\n\t\tint count = 0;\n\t\tint countOpNum = 0;\n\t\ttry (Scanner sc = new Scanner(file)) {\n\t\t\twhile (sc.hasNext() && count <= 1) {\n\t\t\t\tline = sc.nextLine().trim();\n\t\t\t\tif(line.isEmpty()) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \n\t\t\t\tcount = 0;\n\t\t\t\tline = line.replaceAll(\"[^0-9]+\", \" \");\n\t\t\t\tbefore = Arrays.stream(line.split(\" \")).filter(p -> !p.isEmpty()).map(Integer::parseInt).map(Register::new).collect(Collectors.toList());\n\t\t\t\t\n\t\t\t\tline = sc.nextLine();\n\t\t\t\tins = Arrays.stream(line.split(\" \")).map(Integer::parseInt).collect(Collectors.toList());\n\n\t\t\t\tline = sc.nextLine();\n\t\t\t\tline = line.replaceAll(\"[^0-9]+\", \" \");\n\t\t\t\tafter = Arrays.stream(line.split(\" \")).filter(p -> !p.isEmpty()).map(Integer::parseInt).map(Register::new).collect(Collectors.toList());\n\n\t\t\t\tif(findNumOfOp(before, ins, after) >= 3 ) {\n\t\t\t\t\tcountOpNum++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Broj operacija: \" + countOpNum);\n\t}", "public void loadRegionList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxRegions = Integer.parseInt(in.readLine()); \n regionList = new Region[maxRegions];\n int numRegionsInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numRegionsInFile; i++) {\n String type = in.readLine();\n /* createAmazonRainforest, createArctic, and createAquarium are void static\n methods which takes in the BufferedReader and initializes all Region objects \n in the RegionList array using the Regions.txt file\n */\n if (type.equals(\"Amazon Rainforest\")) {\n createAmazonRainforest(in); \n } else if (type.equals(\"Arctic\")) {\n createArctic(in);\n } else if (type.equals(\"Aquarium\")) {\n createAquarium(in);\n }\n \n if (i == 2) {\n regionList[i].toString(); //temp \n }\n }\n \n \n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "private static void input(String[] args) {\n try (BufferedReader scanner = new BufferedReader(\n new InputStreamReader(args.length > 0 ? new FileInputStream(args[0]) : System.in))) {\n\n String linija;\n\n // regularne definicije\n while ((linija = scanner.readLine()) != null && linija.startsWith(\"{\")) {\n String tmp[] = linija.split(\" \");\n\n tmp[0] = tmp[0].substring(1, tmp[0].length() - 1);\n String naziv = tmp[0];\n String izraz = expandRegularDefinition(tmp[1]);\n\n regularneDefinicije.put(naziv, izraz);\n\n // System.out.println(naziv + \", \" + izraz);\n }\n\n // stanja\n while (!linija.startsWith(\"%X\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, stanjaLA);\n\n // leksicke jedinke\n while (!linija.startsWith(\"%L\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, leksickeJedinke);\n\n // pravila leksickog analizatora\n\n while ((linija = scanner.readLine()) != null) {\n while (!linija.startsWith(\"<\")) {\n linija = scanner.readLine();\n }\n\n String tmp[] = linija.split(\">\", 2);\n\n String stateName = tmp[0].substring(1, tmp[0].length());\n String regDef = tmp[1];\n\n regDef = expandRegularDefinition(regDef);\n\n // System.out.println(stateName + \"<> \" + regDef);\n LexerRule lexerRule = new LexerRule(regDef, stateName, 1, \"<\" + stateName + \">\" + regDef);\n lexerRules.add(lexerRule);\n\n scanner.readLine(); // preskoci {\n\n linija = scanner.readLine().trim();\n while (linija != null && scanner.ready() && !linija.equals(\"}\")) {\n // radi nesto s naredbom\n lexerRule.addAction(linija);\n linija = scanner.readLine().trim();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main (String args[] ){\n\t\tScanner scanner = new Scanner( System.in );\r\n\t\tSystem.out.print ( \" 1. Load Employee (From File) \\n 2. Exit Program \\n Enter Your Selection: \" );\r\n\t\tint input = scanner.nextInt();\r\n\t\t\r\n\t\t//if user inputs 1 read the text file and print employees loaded from the file\r\n\t\tif (input == 1 ){\r\n\t\t\tString[] Data;\r\n\t\t\t/**\r\n\t\t\t**create four arrays each of type StaffPharmacist, PharmacyManager, StaffTechnician, Senior technician\r\n\t\t\t**in order to store the employee objects. create arrays of length 1\r\n\t\t\t**/\r\n\t\t\tStaffPharmacist [] Pharmacist = new StaffPharmacist[1];\t\t\r\n\t\t\tPharmacyManager [] Manager = new PharmacyManager[1];\t\t\t\r\n\t\t\tStaffTechnician [] staffTech = new StaffTechnician[1];\t\t\t\r\n\t\t\tSeniorTechnician [] seniorTech = new SeniorTechnician[1];\r\n\t\t\ttry{\r\n\t\t\t\t//read the text file using scanner\r\n\t\t\t\tFile file = new File(\"employees.txt\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tScanner sc = new Scanner(file);\r\n\t\t\t\t\t\r\n\t\t\t\t//while text file has next line split the text to store all elements in to an array\r\n\t\t\t\twhile (sc.hasNextLine()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//read the text file and store it in an array called data. split the text file at , and read until we have next line\r\n\t\t\t\t\tData = sc.nextLine().split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t//create 4 employee objects of each employee type \r\n\t\t\t\t\tPharmacyManager pharmacyManager = new PharmacyManager(Data);\r\n\t\t\t\t\tStaffPharmacist staffPharmacist = new StaffPharmacist(Data);\r\n\t\t\t\t\tStaffTechnician staffTechnician = new StaffTechnician(Data);\r\n\t\t\t\t\tSeniorTechnician seniorTechnician = new SeniorTechnician(Data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tint i;\r\n\t\t\t\t\t/** parse through the text files to check the job id number.\r\n\t\t\t\t\tif the job id is one than the employee is pharmacy manager and there fore store it in an array of type pharmacy manager, else if job id == 2 than it is a staff pharmacist there fore store the staff pharmacist employee in the respective array. else if job id == 3 the employee is a staff technician therefore store the employee object staff technician in array of type staff technician and if the id == 4 than the employee is senior technician so store the employee senior technician in an array of type senior technician\r\n\t\t\t\t\t**/\r\n\t\t\t\t\tfor( i = 0; i < Data.length; i = i + 4){\r\n\t\t\t\t\t\tif( Integer.parseInt(Data[i]) == 1 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tManager[0] = pharmacyManager;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 2 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPharmacist[0] = staffPharmacist;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 3 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstaffTech[0] = staffTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 4 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tseniorTech[0] = seniorTechnician;\r\n\t\t\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\t\t\r\n\t\t\t\t//close the file \r\n\t\t\t\tsc.close();\r\n\t\t\t\t\t\r\n\t\t\t\t//print that the file loaded success fully\r\n\t\t\t\tSystem.out.println ( \" \\n File Successfully Loaded! \" );\r\n\t\t\t\t\t\r\n\t\t\t\t//set a boolean variable named keepgoing equal to true.\r\n\t\t\t\tboolean keepGoing = true;\r\n\t\t\t\t//as long as keep going remains true, do the following steps\r\n\t\t\t\twhile(keepGoing){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ask the user what they would like to do next\r\n\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t\t//if user inputs 3 that is tries to print checks prior to entering hours worked than throw an error\r\n\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println( \" Please enter the hours worked (Option #2) before trying to calculate the paycheck amounts! \" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//again ask the user after throwing the exception about what they would like to do\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\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//do this steps as long as user inputs 1 or 2\r\n\t\t\t\t\t\tdo{\r\n\t\t\t\t\t\t\t//if the user inputs 1 print the employee information described in respective classes of employees\r\n\t\t\t\t\t\t\tif(input == 1){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tManager[0].printPharmacyManager();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tPharmacist[0].printStaffPharmacist();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tseniorTech[0].printSeniorTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tstaffTech[0].printStaffTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\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\t//if the user inputs 2 prompt the user asking the number of hours worked by employees\r\n\t\t\t\t\t\t\telse if(input == 2){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.print( \" \\n Please enter the hours worked: \" );\r\n\t\t\t\t\t\t\t\tint workingHours = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//than again ask user what they would like to do\r\n\t\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/**if user inputs 3 after they entered number of hours employees worked than calculate the employee pay checks\r\n\t\t\t\t\t\t\t\tusing the calculate pay method defined in employee class\r\n\t\t\t\t\t\t\t\tget the employees pay rate by using getHourlyRate method defined in employee class\r\n\t\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tManager[0].calculatePay(workingHours, Manager[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tPharmacist[0].calculatePay(workingHours, Pharmacist[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tstaffTech[0].calculatePay(workingHours, seniorTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tseniorTech[0].calculatePay(workingHours, staffTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\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//again show the menu to the user asking them what they would like to do\r\n\t\t\t\t\t\t\t//if user enters one or two or three repeat the above steps else exit the loop\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}while(input == 1 || input == 2 );\r\n\t\t\t\t\t}while(input == 3);\r\n\t\t\t\t\t//if user enters 4 set keepGoing = false print good bye and exit the loop.\r\n\t\t\t\t\tif(input == 4){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tkeepGoing = false;\r\n\t\t\t\t\t\tSystem.out.println( \" Goodbye! \" );\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//if the file is not found in the system throw an IO exception printing file not found\t\t\t\t\t\t\t\r\n\t\t\t}catch(FileNotFoundException fnfe){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t//catch the exception if the file is not found\r\n\t\t\t\tSystem.out.println(\" File Load Failed! \\n java.io.FileNotFoundException: employees.txt ( The system cannot find the file specified) \\n Program Exiting..... \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t//if the user inputs 2 in the main menu bar exit the loop and say goodBye!\r\n\t\tif(input == 2){\r\n\t\t\t\t\r\n\t\t\tSystem.out.println ( \"\\n Good Bye! \\n\" );\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public void initLadiesDay() {\n\t // your code here\n\t\t\n\t\tFileReader classesReader = null;\n\t\ttry\t{\n\t\t\ttry {\n\t\t\tclassesReader = new FileReader(classesInFile);\n\t\t\tScanner classesScanner = new Scanner(classesReader);\n\t\t\tfitnessProg = new FitnessProgram();\n\t\t\t\n\t\t\twhile (classesScanner.hasNextLine() ) {\n\t\t\t\tString classLine = classesScanner.nextLine();\n\t\t\t\tfc = new FitnessClass(classLine);\n\t\t\t\tfitnessProg.addFitnessClass(fc);\n\t\t\t}\n\t\t\t\n\t\t\tupdateDisplay(fitnessProg);\n\t\t\t\n\t\t\t}\n\t\t\tfinally {\n\n\t\t\t\tif (classesReader != null) {\n\t\t\t\t\tclassesReader.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tcatch (IOException ioe) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"File not found\",\n\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t\t}\n\t\t\tcatch (InputMismatchException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid file content\",\n\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}\t\n\t}", "public void readInput(String fileName){\n\n BufferedReader reader;\n try {\n reader = new BufferedReader(new FileReader(fileName));\n String line = reader.readLine(); //read first line\n int numLine =1; //keep track the number of line\n while (line != null) {\n String[] tokens = line.trim().split(\"\\\\s+\"); //split line into token\n if(numLine==1){ //for the first line\n intersection = Integer.parseInt(tokens[0]); //set the number of intersection\n roadways = Integer.parseInt(tokens[1]); // set the number of roadways\n coor = new Coordinates[intersection];\n g = new Graph(intersection);//create a graph\n line = reader.readLine();\n numLine++;\n }\n else if(numLine>1&&numLine<intersection+2){ //for all intersection\n while(numLine>1&&numLine<intersection+2){\n tokens = line.trim().split(\"\\\\s+\");\n coor[Integer.parseInt(tokens[0])] = new Coordinates(Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])); //add into coor array to keep track the coor of intersection\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine ==intersection+2){ //skip the space line\n line = reader.readLine();\n numLine++;\n while(numLine<roadways+intersection+3){ // for all the roadways, only include the number of roadways mention in the first line\n tokens = line.trim().split(\"\\\\s+\");\n int fst = Integer.parseInt(tokens[0]);\n int snd = Integer.parseInt(tokens[1]);\n g.addEgde(fst,snd,coor[fst].distTo(coor[snd]));\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine >= roadways+intersection+3)\n break;\n }\n reader.close();\n } catch (FileNotFoundException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void getInput(){\n\t\tScanner scan= new Scanner(System.in);\n\t\t//Get the range\n\t\tif(scan.hasNext()){\n\t\t\tcount=Integer.parseInt(scan.nextLine()); \n\t\t}\n\t\t//Initialize the array\n\t\tpeople = new People[count];\n\t\t//Get the array elements\n\t\tint i=0;\n\t\twhile(i<count){\n\t\t\tString lin[] = scan.nextLine().split(\" \");\n\t\t\tpeople[i] = new People(Integer.parseInt(lin[0]), Double.parseDouble(lin[1]));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t\n\t}", "public void readFile() throws NumberFormatException,FileNotFoundException {\n Scanner scanStar, scanMessier, scanPlanet;\n String raw_data;\n String[] values;\n Set<String> identifyName = new HashSet<>();\n // Create scanner to scan file\n scanStar = new Scanner(new File(filename[0]));\n scanMessier = new Scanner(new File(filename[1]));\n scanPlanet = new Scanner(new File(filename[2]));\n\n // Read data about Star and store\n Star star;\n while (scanStar.hasNext()){\n raw_data = scanStar.nextLine();\n values = processData(raw_data, 1);\n // Check whether there is the same object or the data is wrong\n if (values.length != 7 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Star file\");\n System.exit(1);\n }\n star = new Star();\n star.setNumber(values[0]);\n star.setRa(Double.parseDouble(values[1]));\n star.setDecl(Double.parseDouble(values[2]));\n star.setMagn(Double.parseDouble(values[3]));\n star.setDistance(Double.parseDouble(values[4]));\n star.setType(values[5]);\n star.setConstellation(values[6]);\n // Add object to collection\n aos.add(star);\n identifyName.add(star.getNumber());\n }\n scanStar.close();\n\n // Read data about Messier and store\n Messier messier;\n while (scanMessier.hasNext()){\n raw_data = scanMessier.nextLine();\n values = processData(raw_data, 1);\n if (values.length < 6 || identifyName.contains('M' + values[0])){\n System.out.println(\"There are some mistakes in Messier file\");\n System.exit(1);\n }\n messier = new Messier();\n messier.setNumber(\"M\" + values[0]);\n messier.setRa(Double.parseDouble(values[1]));\n messier.setDecl(Double.parseDouble(values[2]));\n messier.setMagn(Double.parseDouble(values[3]));\n messier.setDistance(Double.parseDouble(values[4]));\n messier.setConstellation(values[5]);\n if (values.length == 7){\n messier.setDescription(values[6]);\n }else {\n messier.setDescription(\"-\");\n }\n // Add object to collection\n aos.add(messier);\n identifyName.add(messier.getNumber());\n }\n scanMessier.close();\n\n // Read data about Planet and store\n Planet planet;\n while (scanPlanet.hasNext()){\n raw_data = scanPlanet.nextLine();\n values = processData(raw_data, 0);\n if (values.length != 6 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Planet file\");\n System.exit(1);\n }\n planet = new Planet();\n planet.setName(values[0]);\n planet.setRa(Double.parseDouble(values[1]));\n planet.setDecl(Double.parseDouble(values[2]));\n planet.setMagn(Double.parseDouble(values[3]));\n planet.setDistance(Double.parseDouble(values[4]));\n planet.setAlbedo(Double.parseDouble(values[5]));\n // Add object to collection\n aos.add(planet);\n identifyName.add(planet.getName());\n }\n scanPlanet.close();\n }", "public static void main(String[] args) {\n \tScanner s = null;\n try{\n s = new Scanner(new File(args[0]));\n }catch (FileNotFoundException e) {\t\t\n \tSystem.out.println(\"File not found!\");\n }catch (Exception e){\t\t\n \tSystem.out.println(\"Something else went wrong!\");\n \te.printStackTrace();\n }\n \t \t\n //Read Line by Line\n s.nextLine();\n while(s.hasNext()){\n\t\t\tString Line=s.nextLine();\n\t\t\tString tokens[] = Line.split(\";\");//4 tokens created(MAIN LINE)\n\t\t\tString personCode=tokens[0];\t\t\n\t\t\tString name[] = tokens[1].split(\", \");//String name created split with comas\t\n\t\t\t\n\t\t\tName personName =new Name (name[0],name[1]);//personName object created under Name class, both name are passed\n\t\t\tSystem.out.println(name[0]);\n\t\t\tpersonName.setFirstName(name[0]);\n \t\tpersonName.setLastName(name[1]);\t\t\t\n \t\tString address[] = tokens[2].split(\",\");\n \t\tAddress personAddress =new Address (address[0],address[1],address[2],address[3],address[4]);\n\t\t\tSystem.out.println(tokens[2]);\t\n\t\t\tif(tokens.length==4) {\n \t\t\tString emailAdress=tokens[3];\n \t\t\tSystem.out.println(tokens[3]);\t\n \n \t\t}\n \n \t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n Scanner scanner = new Scanner(new FileInputStream(\"/Users/guoziren/IdeaProjects/剑指offer for Java/src/main/java/com/ustc/leetcode/algorithmidea/dynamicprogramming/input.txt\"));\n }", "public Database(Scanner inputScanner)\n //takes a scanner so main can handle file exceptions\n //also so only main has to deal with i/o\n {\n if(!inputScanner.hasNextLine())\n {\n //I don't want a null, so its initialized as an empty list\n entryList = new LinkedList<Entry>();\n }\n while (inputScanner.hasNextLine())\n {\n //a new entry object parsed from the line of text\n Entry newEntry = parseInputLine(inputScanner.nextLine());\n //checks to see if entry is empty\n //null is specifically only from parseInputLine\n if (!(newEntry == null))\n {\n //adds the word to the database in alphabetical order\n addEntryInOrder(newEntry);\n }\n }\n }", "private static void inputs(Scanner fileScanner) {\n\t\tSystem.out.printf(\"You will now need to enter in the correct pathway to the files containing: \\n\\t1.) RNA table\\n\\t2.) RNA strand\\n\\t3.) Output Protien strand (this will create a new file)\\n\");\n\t\tSystem.out.println(\"Example pathway: C:/CSC142_143/DataFiles/RNATable.txt\");\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Table: \");\n\t\tsetRNATablePathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Strand: \");\n\t\tsetRNAStrandPathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the decoded protien: \");\n\t\tsetRNAOutPathway(fileScanner.next());\n\t\tfileScanner.close();\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n ArrayList<String> in = GetInput.get(\"10.txt\");\n for (String star : in) {\n Sky.addStar(new Star(\n Integer.parseInt(star.substring(10, 16).replaceAll(\" \", \"\")),\n Integer.parseInt(star.substring(18, 24).replaceAll(\" \", \"\")),\n Integer.parseInt(star.substring(36, 38).replaceAll(\" \", \"\")),\n Integer.parseInt(star.substring(40, 42).replaceAll(\" \", \"\"))\n ));\n }\n for (int i = 0; i < 20000; i++) {\n Sky.printSky(i);\n }\n\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tSkipList<String, Rectangle> list = new SkipList<String, Rectangle>();\n\t\tString file = args[0];\n\t\tScanner scan = new Scanner(new File(file));\n\t\t// FileProcessor fp = new FileProcessor();\n\t\t// fp.fileParser(line);\n\t\ttry {\n\t\t\tString lineReader = \"\";\n\t\t\twhile (scan.hasNextLine()) {\n\t\t\t\tlineReader = scan.nextLine();\n\t\t\t\t// regex string delimeter we need to figure out to get rid of excess whitespace\n\t\t\t\t// between parameters in text file\n\t\t\t\tString CMD = lineReader.trim();\n\t\t\t\tString[] lineCMD = CMD.split(\"\\\\s+\");\n\t\t\t\t// switch statement for all situations\n\t\t\t\tswitch (lineCMD[0]) {\n\t\t\t\tcase \"insert\":\n\t\t\t\t\tString name = lineCMD[1];\n\t\t\t\t\tint xCord = Integer.parseInt(lineCMD[2]);\n\t\t\t\t\tint yCord = Integer.parseInt(lineCMD[3]);\n\t\t\t\t\tint width = Integer.parseInt(lineCMD[4]);\n\t\t\t\t\tint height = Integer.parseInt(lineCMD[5]);\n\t\t\t\t\tRectangle rect = new Rectangle(name, xCord, yCord, width, height);\n\t\t\t\t\tKVPair<String, Rectangle> item = new KVPair<String, Rectangle>(name, rect);\n\t\t\t\t\tif (width <= 0 || height <= 0 || (xCord + width > 1024) || (xCord + width < 0)\n\t\t\t\t\t\t\t|| (yCord + height > 1024) || (yCord + height < 0) || (xCord < 0) || (yCord < 0)) {\n\t\t\t\t\t\tSystem.out.println(\"Rectangle rejected: (\" + name + \", \" + xCord + \", \" + yCord + \", \" + width\n\t\t\t\t\t\t\t\t+ \", \" + height + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlist.insert(name, rect);\n\t\t\t\t\t\tSystem.out.println(\"Rectangle Inserted: (\" + name + \", \" + xCord + \", \" + yCord + \", \" + width\n\t\t\t\t\t\t\t\t+ \", \" + height + \")\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"remove\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"regionsearch\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"intersections\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"search\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dump\":\n\t\t\t\t\tSystem.out.println(\"SkipList dump: \");\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(lineCMD[0]);\n\t\t\t}\n\t\t}\n\t\t// line = scan.nextLine();\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// String line = scan.nextLine();\n\t\t// System.out.println(line);\n\t\t// System.out.println(file);\n\t\t// fileParser(file);\n\t\t// Rectangle1 rect = new Rectangle1();\n\n\t}", "public void fillFromFile()\n\t{\n\t\tJFileChooser fc = new JFileChooser();\t//creates a new fileChooser object\n\t\tint status = fc.showOpenDialog(null);\t//creates a var to catch the dialog output\n\t\tif(status == JFileChooser.APPROVE_OPTION)\t\n\t\t{\n\t\t\tFile selectedFile = fc.getSelectedFile ( );\n\t\t\tthis.fileName = selectedFile;\n\t\t\tScanner file = null; //scans the file looking for information to load\n\n\t\t\tif(selectedFile.exists())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfile = new Scanner(fileName); //scans the input file\n\t\t\t\t}\n\t\t\t\tcatch(Exception IOException)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showConfirmDialog (null, \"Unable to import data from the list\");\n\t\t\t\t\tSystem.exit (-1);\n\t\t\t\t}//if there was an error it will pop up this message\n\t\t\t\t\n\t\t\t\tString str = file.nextLine ( ); //names the line\n\t\t\t\tString [] header = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\tsetCourseNumber(header[1]);\n\t\t\t\tsetCourseName(header[0]);\n\t\t\t\tsetInstructor(header[2]);\n\t\t\t\t\n\t\t\t\twhile(file.hasNextLine ( ))\n\t\t\t\t{\n\t\t\t\t\tstr = file.nextLine ( ); //names the line\n\t\t\t\t\tString [] tokens = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\t\tStudent p = new Student();\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tp.setStrNameLast (String.valueOf (tokens[0]));\n\t\t\t\t\t\tp.setStrNameFirst (String.valueOf (tokens[1]));\n\t\t\t\t\t\tp.setStrMajor (String.valueOf (tokens[2]));\n\t\t\t\t\t\tp.setClassification (tokens[3]);\n\t\t\t\t\t\tp.setiHoursCompleted (new Integer (tokens[4]).intValue ( ));\n\t\t\t\t\t\tp.setfGPA (new Float (tokens[5]).floatValue ( ));\n\t\t\t\t\t\tp.setStrStudentPhoto (String.valueOf (tokens[6]));\n\t\t\t\t\t//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tclassRoll.add (p);\n\t\t\t\t\t\t}//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tcatch(Exception IOException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIOException.printStackTrace ( );\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + str + \"'\" + IOException.getMessage());\n\t\t\t\t\t\t}//pops up a message if there were any errors reading from the file\n\t\t\t\t}//continues through the file until there are no more lines to scan\n\t\t\tfile.close ( ); //closes the file\n\n\t\t\t\tif(selectedFile.exists ( )==false)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception IOException)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + selectedFile + \"' \" + IOException.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}//if the user picks a file that does not exist this error message will be caught.\n\t\t\t}\n\t\t}//if the input is good it will load the information from the selected file to and Array List\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.exit (0);\n\t\t\t}\n\t\tthis.saveNeed = true;\n\n\t\t}", "public static void main(String[] args) throws IOException, ParseException {\n\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"C:\\\\Dev\\\\Demo\\\\Demo\\\\src\\\\main\\\\resources\\\\data\\\\USNationalParks.txt\"));\n\t\ttry {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t String line = \"\";\n\t\t String[] lineArray;\n\t\t \n\t\t Park park = new Park();\n\t\t \n\t\t \n\t\t \n\t\t ArrayList<Park> retArray = new ArrayList<Park>();\n\t\t while ((line = br.readLine()) != null) {\n\t\t \tpark = new Park();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\"); //2 Acadia\n\t\t\t park.setParkName(lineArray[2].substring(0, lineArray[2].indexOf('<')));\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); //2 Maine\n\t\t\t lineArray = line.split(\">\");\n\t\t\t park.setProvince(lineArray[2].substring(0, lineArray[2].indexOf('<')));\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine(); //19: \"44.35, -68.21\"\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setLatitude(lineArray[19].substring(0, 5));\n\t\t\t park.setLongitude(lineArray[19].substring(7, lineArray[19].indexOf('<')));\n\t\t\t \n\t\t\t \n\t\t\t line = br.readLine(); //4 February 26th, 1919\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setDateEstablished(stringToDate(lineArray[4].substring(0, lineArray[4].indexOf('<'))));\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); //3 347,389 acres '('\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setParkArea(NumberFormat.getNumberInstance(java.util.Locale.US).parse(lineArray[3].substring(0, lineArray[3].indexOf('a')-1)).intValue());\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); // 1 3,303,393 <\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setParkVisitors(NumberFormat.getNumberInstance(java.util.Locale.US).parse(lineArray[1].substring(0, lineArray[1].indexOf('<'))).intValue());\n\t\t\t \n\t\t\t line = br.readLine(); //skip for now\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t \n\n\t\t \n\t\t\t retArray.add(park);\n\t\t }\n\t\t \n\t\t for(Park p: retArray){\n\t\t \tSystem.out.println(\"Insert into parks(name, country, province, latitude, longitude, dtEst, parkArea, annualVisitors)\" + \"VALUES('\"+ p.getParkName()+\"',\"+ \"'United States','\"+p.getProvince() +\"','\"+ p.getLatitude()+\"','\" + p.getLongitude() + \"','\" + dateToString(p.getDateEstablished()) + \"',\" + p.getParkArea() +\",\"+ \t\t\t\tp.getParkVisitors()+\");\");\n\t\t \t//System.out.println();\n\t\t }\n\t\t} finally {\n\t\t br.close();\n\t\t}\n\t}", "private static City[] fileInterpreter(Scanner file,int numberOfLines){\n City[] cities = new City [numberOfLines];\n for(int i = 0 ; file.hasNextLine(); i++){\n String line = file.nextLine();\n Scanner string = new Scanner(line); //String Scanner to consume the line into city and country and rainfall...\n String cityName = string.next();\n String countryName = string.next();\n double[] data = extractRainfallInformation(line.split(\"[ \\t]+[ \\t]*\")); //to create the array of monthly rainfall\n cities[i] = new City(cityName , countryName , data);\n string.close();\n }\n file.close();\n return cities;\n }", "public static void openF(){\n Scanner in = new Scanner(System.in);\n \n String Name;\n\tString Code;\n\tString Capital;\n\tlong Population;\n\tlong GDP;\n\tString HappinessRank;\n int GDPperCapita;\n \n \n Country country;\n \n \n Scanner stream;\n \n File file = new File(fName);\n \n if(!file.exists()){\n System.out.println(\"File does not exist.\");\n }\n else\n\n \n try{\n stream = new Scanner(file);\n stream.nextLine();\n stream.useDelimiter(\",|\\\\n\");\n \n while(stream.hasNext()){\n Name = stream.next();\n Code = stream.next();\n Capital = stream.next();\n Population = Long.parseLong(stream.next());\n GDP = new BigDecimal(stream.next()).longValue();\n HappinessRank = NumberFormat.getIntegerInstance(Locale.US).format(stream.nextInt());\n GDPperCapita = (int) (GDP/ Population);\n \n \n \n country = new Country (Name, Code, Capital, Population, GDP, HappinessRank, GDPperCapita);\n \n \n \n \n \n if(country.getGDPperCapita()< 1000)\n POOR.insert(country);\n \n \n else if(country.getGDPperCapita() >= 1000 && country.getGDPperCapita() < 5000)\n FAIR.insert(country);\n \n \n else if(country.getGDPperCapita() >= 5000 && country.getGDPperCapita() < 20000)\n GOOD.insert(country);\n \n \n else if(country.getGDPperCapita() >= 20000 && country.getGDPperCapita() < 50000)\n VGOOD.insert(country);\n \n \n else \n EXCELLENT.insert(country);\n \n \n \n \n } stream.close();\n System.out.println(\"\");\n \n }\n \n catch(IOException e){\n e.printStackTrace();\n } \n \n }", "public static void main(String[] args) throws FileNotFoundException \r\n\t{\r\n\t\t//here we try to read from the text file input.txt\r\n\t\tFileInputStream fis = new FileInputStream(\"D:/New folder/input.txt\");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc = new Scanner(fis);\r\n\t\t//here we are trying to store the elements in the object array\r\n\t\tint number_of_employees = Integer.parseInt(sc.nextLine().split(\": \")[1]);\r\n\t\tGoodie[] goodieslist = new Goodie[10];\r\n\t\tint i = 0;\r\n\t\twhile (sc.hasNext()) {\r\n\t\t\tString[] nameprice = sc.nextLine().split(\": \");\r\n\t\t\tGoodie g1 = new Goodie(nameprice[0], Integer.parseInt(nameprice[1]));\r\n\t\t\tgoodieslist[i] = g1;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t//now the values present in the file are copied to the object array\r\n\r\n\t\t//in order to get the output we are calling this method \r\n\t\tGoodies_sort.goodiecheck(goodieslist, number_of_employees);\r\n\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) throws FileNotFoundException{ \n File file = new File(\"/Users/admin/NetBeansProjects/AlgoDataA3/src/algodataa3e3/output_interpret.txt\");\n Scanner input = new Scanner(file); \n \n SeparateChainingHash_A3E3<String, Integer> st = new SeparateChainingHash_A3E3<>(INTERVAL);\n //141491 words\n //9944 uniqe (with toLowerCase)\n \n //read file word by word and store in array\n while (input.hasNext()) {\n String key = input.next().toLowerCase();\n st.put(key, 1);\n }\n \n for(int i = 0; i < INTERVAL; i++){\n \n System.out.println(\"In hash #\" + (i+1) + \" there are \" + st.sizeOfList(i) + \" nodes\");\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString textfile = \"Sample.txt\";\n\t\tBufferedReader reader = new BufferedReader(new FileReader(textfile));\n\t\tString first = \"a\", last = \"s\";\n\t\tdouble balance = 0;\n\t\tint id = 0;\n\t\ttry {\n\n\t\t\tid = Integer.parseInt(reader.readLine());\n\t\t\tfirst = reader.readLine();\n\t\t\tlast = reader.readLine();\n\t\t\tbalance = Double.parseDouble(reader.readLine());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\t\tCustomer m = new Customer(id, first, last, balance);\n\t\tSystem.out.println(m.getFirstName());\n\t\tSystem.out.println(m.getLastName());\n\t}", "public static void main(String args[]) throws FileNotFoundException{\n\t\tFile file = new File(\"input.txt\");\r\n\t\tScanner scan = new Scanner(file);\r\n\t\twhile (scan.hasNext()) {\r\n\t\t\tString fName = scan.next();\r\n\t\t\tString lName = scan.next();\r\n\t\t\tSystem.out.println(\"Full name is: \" + fName + \" \" + lName);\r\n\t\t}\r\n\t\t\tscan.close();\r\n\t\t\r\n\t}", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public Customer(String s) {\r\n\t\tString [] sr = s.split(\",\");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(sr.length == 3)\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.seqNo = Integer.parseInt(sr[0].trim());\r\n\t\t\t\t\tthis.name = sr[1].trim();\r\n\t\t\t\t\tthis.parcelID = sr[2].trim();\r\n\t\t\t\t}\r\n\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Error in input file. Cannot convert to int\" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Error in input file. To few parts\" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomerStringFormatException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(CustomerStringFormatException cfse)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"String format error: Cannot convert string to Customer.\");\r\n\t\t}\r\n\t}", "public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }", "private void readInter() throws FileNotFoundException {\n\t\t\r\n\t\tFile file = new File(\"input.txt\");\r\n\r\n\t\tScanner input = new Scanner(file);\r\n\r\n\t\twhile (input.hasNext()) {\r\n\r\n\t\t\tint x = input.nextInt();\r\n\t\t\tint y = input.nextInt();\r\n\t\t\t\r\n\t\t\tintervals.add(new Point(x, y));\r\n\t\t}\r\n\t\t\r\n\t\t//Close 'input.txt'\r\n\t\tinput.close();\r\n\t\t\r\n\t}", "public Bank() throws Exception\r\n\t{\r\n\t\tScanner fileScan = new Scanner(new File(\"C:\\\\Users\\\\jason\\\\workspace\\\\proj1fa14\\\\bankdata.txt\"));\r\n\t\taccounts = new Account[10];\r\n\t\tnumAccounts = 0;\r\n\t\tCustomer customer;\r\n\t\tAccount account;\r\n\t\tfor(int i = 0; i<9; i++)\r\n\t\t{\r\n\t\t\tString first = fileScan.next();\r\n\t\t\t//System.out.println(first);\r\n\t\t\tString last = fileScan.next();\r\n\t\t\t//System.out.println(last);\r\n\t\t\tint age = fileScan.nextInt();\r\n\t\t\tString pN = fileScan.next();\r\n\t\t\tint ba = fileScan.nextInt();\r\n\t\t\tint ch = fileScan.nextInt();\r\n\t\t\tString accNum = fileScan.next();\r\n\t\t\tcustomer = new Customer(first,last,age,pN);\r\n\t\t\taccount = new Account(customer,ba,ch, accNum);\r\n\t\t\taccounts[i] = account;\r\n\t\t\tnumAccounts++;\r\n\t\t}\r\n\t\tfileScan.close();\r\n\t}", "public TextFile(Scanner input) {\n \tSystem.out.println(\"Enter your Textfile name: \");\n \tString textfilename = input.nextLine(); \n \ttextFile = new File(textfilename);\n \tthis.checkFile();\n }", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "public void parseInput(Scanner sc, String inputLine) {\n String[] input = inputLine.split(\",\");\n assert(input[0].equals(\"R\"));\n this.warehouseID = Integer.parseInt(input[1]);\n this.districtID = Integer.parseInt(input[2]);\n this.customerID = Integer.parseInt(input[3]);\n }", "public static void main(String[] args) {\n \n Employee[] employees = readFile(\"C:\\\\Users\\\\gdemirturk\\\\OneDrive\\\\Shared\\\\Coding\\\\git\\\\javabyLiang\\\\src\\\\JavaIII\\\\Project_1\\\\employee.txt\");\n \n //pass the employee list to employee manager class\n EmployeeManager employeeManager = new EmployeeManager(employees);\n String manager = \"Joseph\";\n int empCount = employeeManager.countEmployeesUnder(manager);\n System.out.println(\"Number of employees report to \" + manager + \" are:\"+ empCount);\n }", "public static void main(String[] args) throws Exception, IOException{\n\t\tString inname = \"欧巴欧巴韩国年糕火锅(天津 津南区咸水沽月坛商厦)\";\n\t\tString restname = inname.replace(\":\", \" \");\n\t\tFile folder = new File(\"sourcefile/data/serialization\");\n\t\tFile[] list = folder.listFiles();\n\t\tfor(File f: list){\n\t\t\tif(f.getName().contains(restname))\n\t\t\t{\n\t\t\t\trestaurant res = DeserializeRestaurant(f.getAbsolutePath());\n\t\t\t\tSystem.out.println(res.getName());\n\t\t\t\tSystem.out.println(res.getAveragePrice());\n\t\t\t\tSystem.out.println(res.getEnvironment());\n\t\t\t\tSystem.out.println(res.getFlavor());\n\t\t\t\tSystem.out.println(res.getService());\n\t\t\t\tSystem.out.println(res.getReview());\n\t\t\t\tSystem.out.println(res.getSummary());\n\t\t\t\tString ss = res.getReview() + res.getSummary();\n\t\t\t\tSystem.out.println(count_StringContain(ss, \"电视\"));\n\t\t\t\tSystem.out.println(count_StringContain(ss, \"安静\"));\n\t\t\t\tSystem.out.println(count_StringContain(ss, \"舒适\"));\n\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void skrivInn(String filnavn) throws Exception{\r\n Scanner filScan = new Scanner(new File(filnavn));\r\n Person person;\r\n String next = filScan.nextLine().toLowerCase();\r\n\r\n //forst registrerer jeg personene\r\n while(!next.equals(\"-\"))\r\n {\r\n\r\n if(!personListe.containsKey(next)) {\r\n personListe.put(next , new Person(next));\r\n }\r\n next = filScan.nextLine().toLowerCase();\r\n }\r\n person = personListe.get(filScan.nextLine().toLowerCase());\r\n\r\n //og saa legger jeg til dvdene til de personene som ble registrert\r\n while (filScan.hasNextLine()) {\r\n\r\n if(filScan.hasNextLine()) {\r\n next = filScan.nextLine().toLowerCase();\r\n }\r\n\r\n if (next.startsWith(\"-\") && filScan.hasNextLine()) {\r\n person = personListe.get(filScan.nextLine().toLowerCase());\r\n }\r\n\r\n else if(next.startsWith(\"*\")) {\r\n String tittel = next.substring(1).toLowerCase();\r\n\r\n if(!dvdListe.containsKey(tittel)) {\r\n DVD dvd = new DVD(tittel, person);\r\n String laner = filScan.nextLine().toLowerCase();\r\n Person laaner = personListe.get(laner);\r\n\r\n if(personListe.containsKey(laner)) {\r\n dvdListe.put(tittel,dvd);\r\n person.leggTilutlaant(dvd);\r\n laaner.leggTilLaaner(dvd);\r\n }\r\n\r\n }\r\n }\r\n\r\n else {\r\n if(!dvdListe.containsKey(next) && !next.equals(\"-\")) {\r\n DVD dvd = new DVD(next, person);\r\n person.leggTilDVD(dvd);\r\n dvdListe.put(next, dvd);\r\n }\r\n }\r\n }\r\n }", "private void init(){\r\n\t\t// already checked that this is a valid file and reader\r\n\t\ttokenizer = new StreamTokenizer(reader);\r\n\t\ttokenizer.slashSlashComments(true);\r\n\t\ttokenizer.slashStarComments(true);\r\n\t\ttokenizer.wordChars('_', '_');\r\n\t\ttokenizer.wordChars('.', '.');\r\n\t\ttokenizer.ordinaryChar('/');\r\n\t\ttokenizer.ordinaryChar('-');\r\n\t\tfillKeywords();\r\n\t\t//tokenChoose = new TokenChooser();\r\n\t}", "public void readData(Scanner strScanner) \n {\n super.readData(strScanner);\n \n bodyType = strScanner.next();\n \n noOfDoors = strScanner.nextInt();\n noOfSeats = strScanner.nextInt();\n }", "public static void main(String[] args) {\n\t\tint choice;\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\n\t\tFileOutputStream fos=new FileOutputStream(\"F:\\\\Student.txt\");\n\t\tObjectOutputStream dos=new ObjectOutputStream(fos);\n\t FileInputStream fis=new FileInputStream(\"F:\\\\student.txt\");\t\n\t\tObjectInputStream ois=new ObjectInputStream(fis);\n\t //ArrayList<StudentDet> arl=new ArrayList<StudentDet>();\n\t \n\t\t\n\t\tSystem.out.println(\"1.Store data into file\");\n\t System.out.println(\"2.read whos age is > 18 and write into another file\");\n\t System.out.println(\"exit\");\n\t\tSystem.out.println(\"enter choice\");\n\t\tchoice=sc.nextInt();\n\t\t\n\t\tStudentOperation so=new StudentOperation();\n\t \n\t // sdt.accept();\n\t \n\t\t/*StudentDet sd=new StudentDet();\n\t\tStudentDet sd1=new StudentDet(1,10,220406,\"a\");\n\t\tStudentDet sd2=new StudentDet(4,15,220406,\"am\");\n\t\tStudentDet sd3=new StudentDet(3,33,220406,\"amber\");\n\t\tStudentDet sd4=new StudentDet(5,23,220406,\"er\");\n\t\tStudentDet sd5=new StudentDet(6,19,220406,\"amer\");\n\t\tStudentDet sd6=new StudentDet(2,20,220406,\"ambr\");\n\t\t*/\n\t\t\n\t\tswitch(choice)\n\t\t{\n\t\tcase 1:so.store(); \n\t\t\tbreak;\n\t\t\n\t\tcase 2:\tso.Readstore();\n\t\tbreak;\n\t\t\n\t\tdefault:System.out.println(\"invalid choice\");\n\t\tbreak;\t\n\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t \n\t}", "private boolean parseInput(String fileName)\n {\n try\n {\n Scanner in = new Scanner(new File(fileName));\n\n this.numIntxns = in.nextInt();\n this.roads = new Road[in.nextInt()];\n this.cities = new City[in.nextInt()];\n\n for (int i = 0; i < this.roads.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.roads[i] = new Road(start, end, length);\n }\n\n for (int i = 0; i < this.cities.length; i++)\n {\n int intersectionNum = in.nextInt();\n String name = in.next();\n\n this.cities[i] = new City(intersectionNum, name);\n }\n\n if (in.hasNextInt())\n {\n this.signs = new Sign[in.nextInt()];\n }\n\n for (int i = 0; i < this.signs.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.signs[i] = new Sign(start, end, length);\n }\n }\n // lazy catch statement because computer science is hard\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n return false;\n }\n\n return true;\n }", "public static void main(String[] args) throws IOException {\n\t\tScanner fileLine = new Scanner(new File (\"/Users/bsandi/eclipse-workspace/5511/src/assignment_4/ds17s-Asg4-data\"));\n\n\t\t// Length of the array\n\t\tLineNumberReader lnr = new LineNumberReader(new FileReader(new File (\"/Users/bsandi/eclipse-workspace/5511/src/assignment_4/ds17s-Asg4-data\")));\n\t\tlnr.skip(Long.MAX_VALUE);\n\t\tint total_entries = lnr.getLineNumber()+1;\n\n\t\tfileLine.useDelimiter(\"\\\\n|:\");\n\t\tint col_num = 4;\n\n\n\t\t//Read data from text file\n\t\tString[][] inputArr = new String[total_entries][col_num];\t\n\t\tint j = 0;\n\t\tint l = 0;\n\t\twhile (l< total_entries ) {//fileLine.hasNext()) {\n\n\t\t\tfor (int k=0 ; k<col_num ; k++) {\n\t\t\t\tinputArr[j][k] = (fileLine.next());\n\t\t\t}\n\t\t\tl++;\n\t\t\tj++;\n\t\t}\n\t\tfileLine.close();\n\t\tlnr.close();\n\n\n\n\t\t// Ask for the the string to be searched \n\t\tint searchedField =-1;\n\t\tSystem.out.println(\"Choose a field to execute the search (1) Person’s name. (2) Email address. (3) Organization \");\n\t\tScanner field = new Scanner(System.in);\n\t\twhile (searchedField<1 || searchedField>3) {\t\n\t\t\tfield = new Scanner(System.in);\n\t\t\ttry {\n\t\t\t\tsearchedField = Integer.parseInt(field.nextLine());\n\t\t\t\tif (searchedField<1 || searchedField>3) {\n\t\t\t\t\tSystem.out.println(\"Input 1, 2 or 3 ((1) Person’s name. (2) Email address. (3) Organization) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tSystem.out.println(\"Input 1, 2 or 3 ((1) Person’s name. (2) Email address. (3) Organization) \");\n\t\t\t}\n\t\t}\n\n\t\t\n\n\n\n\n\n\t\t// Ask for the the string to be searched \n\t\tSystem.out.println(\"Give a string you would like to search: \");\n\t\tScanner item = new Scanner(System.in);\n\t\tString searchedItem = item.nextLine();\n\t\t\n\t\t\n\t\tfield.close();\n\t\titem.close();\n\n\t\t\n\t\t\n\t\t// Create output array\n\t\tint outputIndex = 0;\n\t\tint outputItems = 0;\n\t\tString[] output = new String[total_entries]; //Change to dynamic \n\t\tfor (int i = 0 ; i< output.length ; i++) {\n\t\t\tif (bma(searchedItem,inputArr[i][searchedField-1])) {\n\t\t\t\toutput[outputIndex]= inputArr[i][0] + \" - \" + inputArr[i][1] + \" - \" +inputArr[i][2] + \" - \" + inputArr[i][3];\n\t\t\t\toutputIndex = outputIndex +1;\n\t\t\t\toutputItems = outputItems +1;\n\t\t\t}\n\t\t}\n\n\n\t\t// Print output array\n\t\tfor (int i=0 ; i < outputItems ; i++) {\n\t\t\tSystem.out.println(output[i]);\n\t\t}\n\t\tif (outputItems==0) {\n\t\t\tSystem.out.println(\"No items found\");\n\t\t}\n\n\n\n\t}", "public static void init() {\r\n\t\twines = read();\r\n\t\tread_tasteNotes(wines);\r\n\t\tidSorted = duplicate(wines);\r\n\t}", "void readNutrients(String filename) throws FileNotFoundException {\n\t\t//reads the file, computes the number of unique nutrient objects\n\t\t//uses StringBuilder to append the unique Nutrient_Code\n\t\tScanner input=new Scanner(new File(filename));\n\t\tint numOfRow=0;\n\t\tStringBuilder uniqueNutrient=new StringBuilder();\n\t\twhile(input.hasNextLine()) {\n\t\t\tString row0=input.nextLine();\n\t\t\tString[] split0=row0.split(((char)34+\",\"+(char)34));\n\t\t\tif(!uniqueNutrient.toString().contains(split0[1]+\",\")) {\n\t\t\t\tuniqueNutrient=uniqueNutrient.append(split0[1]+\",\");\n\t\t\t\tnumOfRow++;\n\t\t\t}\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\t//keep only the unique nutrient objects\n\t\tnutrients=new Nutrient[numOfRow-1];\n\t\tScanner input2=new Scanner(new File(filename));\n\t\tinput2.nextLine();\n\t\tint i=0;\n\t\tStringBuilder uniqueNutrien2=new StringBuilder();\n\t\twhile(input2.hasNextLine()) {\n\t\t\tString row=input2.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tif(!uniqueNutrien2.toString().contains(split1[1]+\",\")) {\n\t\t\t\tuniqueNutrien2.append(split1[1]+\",\");\n\t\t\t\tnutrients[i++]=new Nutrient(split1[1], split1[2], split1[5]);\n\t\t\t}\n\t\t}\n\n\t\t//reads the file, computes the number of unique productNutrient objects\n\t\tScanner input3 =new Scanner(new File(filename));\n\t\tinput3.nextLine();\n\t\tint numOfRowProductNutrient=0;\n\t\twhile(input3.hasNextLine()) {\n\t\t\tnumOfRowProductNutrient++;\n\t\t\tinput3.nextLine();\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\tproductNutrients=new ProductNutrient[numOfRowProductNutrient];\n\t\tScanner input4=new Scanner(new File(filename));\n\t\tinput4.nextLine();\n\t\tint i2=0;\n\t\twhile(input4.hasNextLine()) {\n\t\t\tString row=input4.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tproductNutrients [i2++]=new ProductNutrient(split1[0].substring\n\t\t\t\t\t(1, split1[0].length()), split1[1], split1[2], \n\t\t\t\t\tFloat.parseFloat(split1[4]),split1[5].substring(0, split1[5].length()-1));\n\t\t}\n\t\t//close the input\n\t\tinput.close();\n\t\tinput2.close();\n\t\tinput3.close();\n\t\tinput4.close();\n\t}", "public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\t\n\t\tScanner scan = new Scanner(new File(\"input.txt\"));\n\t\t\n\t\tParser parse;\n\t\tCode code = new Code();\n\t\tSymbolTable st = new SymbolTable();\n\t\t\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString inCode = scan.nextLine();\t\n\t\t\tparse = new Parser(inCode);\n\t\t}\n\t\t\n\t}", "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "public static void startup() {\n\t\tString thisLine;\n\t\tString currentName = \"\";\n\t\tboolean next = true;\n\n\t\t// DEBUG\n\t\t// System.out.println(\"entered here\");\n\n\t\t// Loop across the arguments\n\n\t\t// Open the file for reading\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(GIGA_WORD));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// .replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tString[] wordNumber = str.split(\"[ ]{2,}\");\n\t\t\t\tString word = wordNumber[0].toLowerCase();\n\t\t\t\tint cnt = Integer.parseInt(wordNumber[1]);\n\t\t\t\tgigaMap.put(word, cnt);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t\tbr = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tif (str.equals(\"[Term]\")) {\n\t\t\t\t\tnext = true;\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"name:\")) {\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tcurrentName = str.replaceAll(\"name: \", \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"synonym:\")) {\n\t\t\t\t\tif (str.contains(\"EXACT\") || str.contains(\"NARROW\")) {\n\t\t\t\t\t\t// synonym..\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"synonym:.*\\\"(.*)\\\".*\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(str);\n\t\t\t\t\t\t// DEBUG\n\t\t\t\t\t\t// System.err.println(str);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tString syno = matcher.group(1);\n\t\t\t\t\t\t\tif (!currentName.equals(\"\")) {\n\t\t\t\t\t\t\t\t// System.err.format(\"%s:%s.\\n\", currentName,\n\t\t\t\t\t\t\t\t// syno);\n\n\t\t\t\t\t\t\t\tadd(currentName, syno);\n\t\t\t\t\t\t\t\tadd(syno, currentName);\n\t\t\t\t\t\t\t\trecursiveAddSyno(currentName, syno);\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\tbr.close();\n\t\t\tbr = null;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error: \" + e);\n\t\t}\n\t}", "public Roster(String fileName){\n players = new ArrayList<>();\n try {\n Scanner input = new Scanner(new File(fileName));\n\n // Loop will cycle through all the \"words\" in the text file\n while (input.hasNext()){\n // Concatenates the first and last names\n String name = input.next();\n name += \" \" + input.next();\n double attackStat = input.nextDouble();\n double blockStat = input.nextDouble();\n // Creates a new Player object and stores it in the players ArrayList\n players.add(new Player(name, attackStat, blockStat));\n }\n }\n catch (IOException e) {\n System.out.println(\"IO Exception \" + e);\n }\n\n }", "private static void initializeRegatta(String[] data) {\n\t\t// Just command was used, we need input file.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.print(\"\\nOops, looks like you didn't specify an input file.\\n\");\n\t\t\tinitializeInput(getFilename());\n\t\t}\n\t\t\n\t\t// Input file specified but the file was invalid. Need to get another.\n\t\tif(data.length == 2) {\n\t\t\tif(!isValidFileName(data[1])) {\n\t\t\t\tSystem.out.println(\"\\nOops, your filename is invalid.\");\n\t\t\t\tinitializeInput(getFilename());\n\t\t\t} else {\n\t\t\t\tinitializeInput(data[1]);\n\t\t\t}\n\t\t}\n\t\tprocessRegatta(getRegattaName());\n\t}", "public void readFromFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\Project\\\\src\\\\Railway.txt\");\r\n\t\t\tScanner s = new Scanner(f);\r\n\t\t\tpersons = new Person2 [50]; \r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine()){\r\n\t\t\t\tString a = s.nextLine();\r\n\t\t\t\tString b = s.nextLine();\r\n\t\t\t\tString c = s.nextLine();\r\n\t\t\t\tString d = s.nextLine();\r\n\t\t\t\tString e = s.nextLine();\r\n\t\t\t\tString g = s.nextLine();\r\n\t\t\t\tString h = s.nextLine();\r\n\t\t\t\tString j = s.nextLine();\r\n\t\t\t\tPerson2 temp = new Person2 (a,b,c,d,e,g,h,j);\r\n\t\t\t\tpersons[i] = temp;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public void university(){\n\t\tSystem.out.println(\"Name:\");\n\t\tString nameRegistered = reader.nextLine();\n\t\tSystem.out.println(\"Nit:\");\n\t\tString nit = reader.nextLine();\n\t\tSystem.out.println(\"Address:\");\n\t\tString address = reader.nextLine();\n\t\tSystem.out.println(\"Contact number:\");\n\t\tString contactNumber = reader.nextLine();\n\t\tSystem.out.println(\"Number of employees:\");\n\t\tint employees = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Value of the actives:\");\n\t\tdouble value = reader.nextDouble();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Legal representative:\");\n\t\tString legalRepresentative = reader.nextLine();\n\t\tSystem.out.println(\"Constitution date:\");\n\t\tSystem.out.println(\"Day:\");\n\t\tint day = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Month:\");\n\t\tint month = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Year:\");\n\t\tint year = reader.nextInt();\n\t\treader.nextLine();\n\t\tDate constitution = new Date(day, month, year);\n\t\tSystem.out.println(\"floors of the building\");\n\t\tint rows = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Type:\");\n\t\tString type = reader.nextLine();\n\t\tSystem.out.println(\"Registry:\");\n\t\tString registry = reader.nextLine();\n\t\tSystem.out.println(\"Number of years accredited:\");\n\t\tint accreditedYears = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Rector name:\");\n\t\tString rectorName = reader.nextLine();\n\t\tSystem.out.println(\"Number of students in stratum 1 and 2:\");\n\t\tint studentsStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Number of students:\");\n\t\tint students = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Position in the saberPro test:\");\n\t\tint nationalPositionPro = reader.nextInt();\n\t\treader.nextLine();\n\t\tUniversity toAdd = new University(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, registry, accreditedYears, rectorName, studentsStratum, students, nationalPositionPro);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "public static void main(String[] args) throws FileNotFoundException {SlopeOne sdao = new SlopeOne(new File(\"test.txt\"));\n////\t\tsdao.input();\n////\t\tSystem.out.println(sdao);\n////\t\tSystem.out.println(\"=====================================\");\n//\t\t\n//\t\tsdao = new SlopeOne(new File(\"test2.txt\"));\n//\t\tsdao.input();\n//\t\tSystem.out.println(sdao);\n//\t\tSystem.out.println(\"=====================================\");\n////\t\t\n//\t\tsdao = new SimpleDataAccessObject1(new File(\"test3.txt\"));\n//\t\tsdao.input();\n//\t\tSystem.out.println(sdao);\n//\t\tSystem.out.println(\"=====================================\");\n//\t\t\n\t}", "public static void parseUserInput(String fileLocation){\n\n\t\t// Initialize instructor list and null string.\n\t\tinstructorList = new ArrayList <Instructor>();\n\t\tString line = null;\n\n\t\t// Open a buffered/file reader to read the input file.\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + \"/\" + fileLocation));\n\t\t\t// Read to the end of the file\n\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t// Split based on comma in line (CSV file)\n\t\t\t\tString[] dataLine = line.split(\",\");\n\t\t\t\t// # at beginning of line means comment\n\t\t\t\tif(dataLine[0].charAt(0) != '#'){\n\t\t\t\t\t// Add the instructor information to the ArrayList.\n\t\t\t\t\tinstructorList.add(new Instructor(dataLine[0], dataLine[1], dataLine[2], dataLine[3], Integer.parseInt(dataLine[4])));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close the buffered reader\n\t\t\tbr.close();\n\n\t\t\t// Catch the exceptions and print the corresponding results.\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found. Exiting program.\");\n\t\t\tSystem.exit(1);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception. Exiting program.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public ZipDatabase() throws IOException {\r\n int line = 0;\r\n InputStream is = this.getClass().getResourceAsStream(\"zip.txt\");\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String input;\r\n // parses entries of the form:\r\n // 03064,NH,NASHUA\r\n try {\r\n while ((input = br.readLine()) != null) {\r\n line++;\r\n StringTokenizer st = new StringTokenizer(input, \",\");\r\n if (st.countTokens() == 3) {\r\n String zip = st.nextToken();\r\n String state = st.nextToken();\r\n String city = st.nextToken();\r\n city = fixupCase(city);\r\n zipDB.put(zip, new ZipInfo(zip, city, state));\r\n } else {\r\n throw new IOException(\"Bad zip format, line \" + line);\r\n }\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n }", "public static void main(String[] args) {\n\t\t\t\t\n\t\t//Displays assignment info\n\t\tSystem.out.println(\"COP3538 Project 3 - Xudong Liu\\n\\nStacks and Priority Queues\");\n\t\n\t\t//Locate file, must be in same directory\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter the file Name: \");\n\t\tString file = keyboard.next();\n\t\tkeyboard.close();\n\t\t\n\t\t//Read file and parse for input\n\t\tint i = 0;//counter\n\t\tint newEngCount=0, midAtlCount=0, southCount=0;\n\t\tStack stateStackList=new Stack();\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = br.readLine(); //Reads and bypasses header\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\tString[] split = line.split(\",\");\n\t\t\t\t\t\tState nextState = new State(split[0], split[1], split[2], Integer.parseInt(split[3]), split[4], Integer.parseInt(split[5])); \t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (nextState.getRegion().equalsIgnoreCase(\"New England\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; newEngCount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nextState.getRegion().equalsIgnoreCase(\"Middle Atlantic\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; midAtlCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nextState.getRegion().equalsIgnoreCase(\"South\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; southCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\ti++;\n\t\t\t\t}\t\n\t\t\t\tbr.close();\n\t\t\t\t\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\tSystem.out.format(\"\\nFile was not found. The application will terminate.\\n\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tSystem.out.format(\"\\nThere were %s state records put on the stack.\\n\", southCount + midAtlCount+ newEngCount);\n\t\tSystem.out.println(\"\\nStack Contents:\");\n\t\tSystem.out.printf(\"%-17s\", \"\\nState Name\");\n\t\tSystem.out.printf(\"%-16s\", \"Capital City\");\n\t\tSystem.out.printf(\"%-12s\", \"State Abbr\");\n\t\tSystem.out.printf(\"%-18s\", \"State Population\");\n\t\tSystem.out.printf(\"%-10s\", \"\\tRegion\");\n\t\tSystem.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\tstateStackList.printStackedList();\n\t\tQueue queuedList = new Queue();\n\t\tint counter = 0;\n\t\twhile(!stateStackList.isEmpty()){\n\t\t\tif(counter %2 ==0 ){\n\t\t\t\tqueuedList.insertFront(stateStackList.pop());\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tqueuedList.insertEnd(stateStackList.pop());\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Queue Contents:\");\n\t\tSystem.out.printf(\"%-17s\", \"\\nState Name\");\n\t\tSystem.out.printf(\"%-16s\", \"Capital City\");\n\t\tSystem.out.printf(\"%-12s\", \"State Abbr\");\n\t\tSystem.out.printf(\"%-18s\", \"State Population\");\n\t\tSystem.out.printf(\"%-10s\", \"\\tRegion\");\n\t\tSystem.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t queuedList.printQueue();\n\t\t \n\t\t queuedList.findDelete(\"Massachusetts\");\n\t\t queuedList.findDelete(\"New Hampshire\");\n\t\t queuedList.findDelete(\"Rhode Island\");\n\t\t queuedList.findDelete(\"Maryland\");\n\t\t queuedList.findDelete(\"New Jersey\");\n\t\t queuedList.findDelete(\"Pennsylvania\");\n\t\t queuedList.findDelete(\"Alabama\");\n\t\t queuedList.findDelete(\"Kentucky\");\n\t\t queuedList.findDelete(\"North Carolina\");\n\t\t \n\t\t System.out.println(\"Queue Contents:\");\n\t\t System.out.printf(\"%-17s\", \"\\nState Name\");\n\t\t System.out.printf(\"%-16s\", \"Capital City\");\n\t\t System.out.printf(\"%-12s\", \"State Abbr\");\n\t\t System.out.printf(\"%-18s\", \"State Population\");\n\t\t System.out.printf(\"%-10s\", \"\\tRegion\");\n\t\t System.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t\t queuedList.printQueue();\n\t\t\t i=1;\n\t\t\t while(!queuedList.isEmpty()){\n\t\t\t\t\n\t\t\t\t if(i%2!=0){\n\t\t\t\t\tstateStackList.push(queuedList.removeFront().stateObject);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tstateStackList.push(queuedList.removeEnd().stateObject);\n\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\t \n\t\t System.out.println(\"\\nStack Contents:\");\n\t\t System.out.printf(\"%-17s\", \"\\nState Name\");\n\t\t System.out.printf(\"%-16s\", \"Capital City\");\n\t\t System.out.printf(\"%-12s\", \"State Abbr\");\n\t\t System.out.printf(\"%-18s\", \"State Population\");\n\t\t System.out.printf(\"%-10s\", \"\\tRegion\");\n\t\t System.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t\t\tstateStackList.printStackedList();\n\t\t System.exit(0);\n\t}", "public static void createTopology()\r\n\t{\r\n\t\tSystem.out.println(\"==============STARTING TO CREATE TOPOLOGY=================\");\r\n\t\tint row = 0, col = 0;\r\n\t\ttry {\r\n\t\t\tscan = new Scanner(System.in);\r\n\t\t\tSystem.out.println(\"\\nPlease enter the file name <name.txt>\");\r\n\t\t\tString s_t_r = scan.nextLine();\r\n\t\t\tFile inFile = new File(s_t_r); // Connecting to the input file\r\n\t\t\t\r\n\t\t\tScanner in = new Scanner(inFile);\r\n\t\t\tString lines[] = in.nextLine().trim().split(\"\\\\s+\"); // line count estimation\r\n\t\t\tin.close(); // Closing the input file\r\n\t\t\t\r\n\t\t\trouters = lines.length;\r\n\t\t\tgraph = new int[routers][routers]; // declaring the adjacency matrix\r\n\t\t\t\r\n\t\t\tin = new Scanner(inFile); // scanner for each line in the input file\r\n\t\t\tint lineCount = 0;\r\n\t\t\twhile (in.hasNextLine()) // Checking the size of the matrix input\r\n\t\t\t{\r\n\t\t\t\tString currentLine[] = in.nextLine().trim().split(\"\\\\s+\"); // read each line\r\n\t\t\t\tfor (int i = 0; i < currentLine.length; i++) {\r\n\t\t\t\t\tgraph[lineCount][i] = Integer.parseInt(currentLine[i]);\r\n\t\t\t\t}\r\n\t\t\t\tlineCount++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) { // Catching exception for error in reading the file\r\n\t\t\tSystem.out.println(\"Error in reading the file\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"\\nReview the original topology \");\r\n\t\tfor (row = 0; row < routers; row++) {\r\n\t\t\tfor (col = 0; col < routers; col++)\r\n\t\t\t\tSystem.out.print(graph[row][col] + \"\\t\"); // Printing the topology that is created\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public int makePersonStructures(File inputFile) throws FileNotFoundException{\n\t\tArrayList<String> inputFileLines = new ArrayList<String>();\r\n\t\tScanner lineScanner = new Scanner(inputFile);\r\n\t\twhile(lineScanner.hasNextLine()){\r\n\t\t\tinputFileLines.add(lineScanner.nextLine());\r\n\t\t}\r\n\t\tlineScanner.close();\r\n\t\t\r\n\t\t//Now split those up by commas. \r\n\t\tfor(int i = 0; i < inputFileLines.size(); i++){\r\n\t\t\tScanner currentLineScanner = new Scanner(inputFileLines.get(i));\r\n\t\t\tcurrentLineScanner.useDelimiter(\",\");\r\n\t\t\tString personName = currentLineScanner.next();\r\n\t\t\tPerson toBeAdded = new Person();\r\n\t\t\ttoBeAdded.name = personName; //Put in the name.\r\n\t\t\t//Handle everything past the name:\r\n\t\t\tint numberOfBools = 0; //For making sure the input is formatted correctly.\r\n\t\t\tint numberOfTrues = 0; //For tracking how many available time slots there are for this person.\r\n\t\t\twhile(currentLineScanner.hasNext()){\r\n\t\t\t\tString currBool = currentLineScanner.next();\r\n\t\t\t\tint yesNoResult = yesOrNo(currBool);\r\n\t\t\t\tif(yesNoResult == 1){\r\n\t\t\t\t\ttoBeAdded.availabilityBooleans.add(true);\r\n\t\t\t\t\tnumberOfTrues++;\r\n\t\t\t\t}\r\n\t\t\t\telse if(yesNoResult == 0){\r\n\t\t\t\t\ttoBeAdded.availabilityBooleans.add(false);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcurrentLineScanner.close();\r\n\t\t\t\t\treturn -1; //Since one of the answers wasn't yes or no or whatever.\r\n\t\t\t\t}\r\n\t\t\t\tnumberOfBools++;\t\t\r\n\t\t\t}\r\n\t\t\tif(numberOfBools != toursInTheWeek){\r\n\t\t\t\tcurrentLineScanner.close();\r\n\t\t\t\treturn -2; //Since this person didn't have the right number of answers for availability. \r\n\t\t\t}\r\n\t\t\t//Update the number of available time slots for this person. \r\n\t\t\ttoBeAdded.numOfAvailableSlots = numberOfTrues;\r\n\t\t\tpersonList.add(toBeAdded);\r\n\t\t\tcurrentLineScanner.close();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public YelpDB(String restaurants, String reviews, String users) throws IOException {\n\n this.gson = new Gson();\n this.restaurantMap = new ConcurrentHashMap<String, Restaurant>();\n this.reviewMap = new ConcurrentHashMap<String, Review>();\n this.userMap = new ConcurrentHashMap<String, YelpUser>();\n\n // Process restaurants\n try (BufferedReader reader = new BufferedReader(new FileReader(restaurants))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Restaurant r = gson.fromJson(line, Restaurant.class);\n String business_id = r.getID();\n this.restaurantMap.put(business_id, r);\n }\n }\n\n // Process reviews\n try (BufferedReader reader = new BufferedReader(new FileReader(reviews))) {\n String line;\n while ((line = reader.readLine()) != null) {\n Review r = gson.fromJson(line, Review.class);\n String review_id = r.getID();\n this.reviewMap.put(review_id, r);\n }\n }\n\n // Process users\n try (BufferedReader reader = new BufferedReader(new FileReader(users))) {\n String line;\n while ((line = reader.readLine()) != null) {\n YelpUser u = gson.fromJson(line, YelpUser.class);\n String user_id = u.getID();\n this.userMap.put(user_id, u);\n }\n }\n }", "public MapProcessor(String mapFile) throws IOException\n {\n validateReflexMapFile(mapFile);\n\n if (reflexValidated)\n {\n //Set the map file parameter\n this.mapFile = mapFile;\n\n //Initialize the map scanner\n mapScanner = new Scanner(new File(mapFile));\n\n //Tell the user everything is honky dory for the scanner\n System.out.println(\"\\nLoaded your file: \" + mapFile);\n\n //The name of the file with the modification in the name\n String partialFileName = mapFile.substring(0, mapFile.length() - 4);\n\n //Initialize the file writer\n mapWriter = new FileWriter(partialFileName + \"_BrushShifted.map\");\n\n //Tell the user everything is honky dory for the writer\n System.out.println(\"Initialized empty map file for writing: \" + partialFileName + \"_BrushShifted.map\");\n\n lines = new String[lineCount()];\n System.out.println(\"Created array of lines with size \" + lines.length + \"\\n\");\n }\n }", "public static void main(String[] args) {\n\n String inputFile = \"data/input.txt\";\n String outputFile = \"data/output.txt\";\n String studentInfo = \"data/students_info.txt\";\n String studentData = \"\";\n BufferedReader reader = null;\n String[] data = null;\n boolean sex = false;\n try {\n reader = new BufferedReader(new FileReader(studentInfo));\n studentData = reader.readLine();\n data = studentData.split(\" \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n \n if (data[3].equals(\"1\")) {\n sex = true;\n }\n\n Student testStudent1 = new Student(Integer.parseInt(data[0]),data[1],sex,Integer.parseInt(data[3]));\n\n testStudent1.doHomework(inputFile,outputFile,\"Со\");\n\n }", "protected abstract List<O> parseFileForObservations(Scanner scn);", "public SYEParser(InputStream input, String name) throws FileNotFoundException {\n super(input);\n this.filename = name;\n }", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "public static void initializeInventory(File initialInventory,\n CS145LinkedList<BookData> inventory) {\n Scanner input = null;\n\n // Try opening file object for initial listing of inventory\n try {\n input = new Scanner(initialInventory);\n\n // If failure occurs throw exception\n } catch (FileNotFoundException ex) {\n System.out.println(\"Error: File \" + initialInventory.getName()\n + \"not found. Terminating Program.\");\n }\n // Otherwise begin reading file\n while(input.hasNextLine()) {\n\n String line = input.nextLine();\n Scanner lineScanner = new Scanner(line);\n\n // Read lines of txt file as tokes delimited by commas\n lineScanner.useDelimiter(\",\");\n\n // Try reading tokens of lines and save data to BookData Objects\n // of inventory\n try {\n String title = lineScanner.next();\n String ISBN = lineScanner.next();\n double price = lineScanner.nextDouble();\n String format = lineScanner.next();\n int stock = lineScanner.nextInt();\n\n // Create new book object using collected data\n Book aNewBook = new Book(title,ISBN,price,format);\n aNewBook.changeStock(stock);\n\n // Pass created Book object to new BookData object\n inventory.add(new BookData(aNewBook));\n\n // If failure occurs trying to save tokens in given way occurs,\n // throw InputMismatchException\n } catch (InputMismatchException ex) {\n System.out.println(\"Line : \" + line);\n System.out.println(\"Mismatched Token\" + lineScanner.next());\n }\n }\n }", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n while (scanner.hasNext()) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int d = scanner.nextInt();\n countNumbersOfEachPolygons(a, b, c, d);\n }\n System.out.println(countRectangle + \" \" + countSquare + \" \" + countPolygon);\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 Mapper() {\n\t\t\n\t\tmirMap = scanMapFile(\"mirMap.txt\");\n\t\tgeneMap = scanMapFile(\"geneMap.txt\");\n\t\t\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\r\n \r\n Directory d = new Directory();\r\n \r\n if (args.length != 1) {\r\n System.out.println(\"Usage: java CSVReaderTest <filename>\");\r\n }\r\n else {\r\n FileReader fr = new FileReader(args[0]);\r\n BufferedReader c = new BufferedReader(fr);\r\n\r\n int lineNum = 0;\r\n boolean eof = false;\r\n \r\n while (!eof) {\r\n String line = c.readLine();\r\n \r\n if (line == null) {\r\n eof = true;\r\n }\r\n else{\r\n // Allocate an array of the necessary size to return the strings\r\n String[] values = new String[4];\r\n // Start beginIndex at the beginning of the String, position 0\r\n int beginIndex = 0;\r\n\r\n for (int i = 0; i < 3; i++) {\r\n int endIndex;\r\n endIndex = line.indexOf(',', beginIndex);\r\n\r\n // if the argument begins and ends with quotes, remove them\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(endIndex - 1) == '\"') {\r\n values[i] = line.substring(beginIndex + 1, endIndex - 1);\r\n\r\n } else {\r\n values[i] = line.substring(beginIndex, endIndex);\r\n }\r\n\r\n beginIndex = endIndex + 1;\r\n }\r\n\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(line.length() - 1) == '\"') {\r\n values[3] = line.substring(beginIndex + 1, line.length() - 1);\r\n } else {\r\n values[3] = line.substring(beginIndex, line.length());\r\n }\r\n \r\n if (lineNum > 1) {\r\n lineNum = lineNum + 1;\r\n Student s = new Student(values[0]);\r\n s.setFirstName(values[1]);\r\n s.setLastName(values[2]);\r\n s.setPhoneNumber(values[3]);\r\n d.addStudent(s);\r\n System.out.println(s);\r\n }\r\n\r\n }\r\n }\r\n c.close();\r\n }\r\n \r\n Student c = new Student(\"mengl1\");\r\n c.setFirstName(\"Meng\");\r\n c.setLastName(\"Li\");\r\n c.setPhoneNumber(\"412-807-0153\");\r\n \r\n Student a = new Student(\"mengl2\");\r\n a.setFirstName(\"Mengl\");\r\n a.setLastName(\"Li\");\r\n a.setPhoneNumber(\"412-807-0154\");\r\n \r\n Student b = new Student(\"terryhong\");\r\n b.setFirstName(\"terry\");\r\n b.setLastName(\"hong\");\r\n b.setPhoneNumber(\"412-464-475\");\r\n\r\n d.addStudent(c);\r\n d.addStudent(a);\r\n d.addStudent(b);\r\n \r\n //System.out.println(d.searchByAndrewId(\"mengl2\"));\r\n //d.deleteStudent(\"terryhong\");\r\n System.out.println(d.size());\r\n // System.out.println(d.searchByLastName(\"Li\"));\r\n\r\n }", "private void initHotelsAndReservations() \n\t{\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(\"Hotels.txt\");\n\t\t\tScanner fs = new Scanner(fis);\n\t\t\twhile(fs.hasNextLine())\n\t\t\t{\n\t\t\t\tScanner is = new Scanner(fs.nextLine());\n\t\t\t\tis.useDelimiter(\",\");\n\t\t\t\tint id = Integer.parseInt(is.next().trim());\n\t\t\t\tString name = is.next().trim();\n\t\t\t\tString address = is.next().trim();\n\t\t\t\tString city = is.next().trim();\n\t\t\t\tString state = is.next().trim();\n\t\t\t\tint pricePerNight = Integer.parseInt(is.next().trim());\n\t\t\t\th = new Hotel (id, name, address, city, state, pricePerNight);\n\t\t\t\thotels.add(h);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * The catch block checks to make sure that the file is found\n\t\t */\n\t\tcatch( FileNotFoundException fnfe)\n\t\t{\n\t\t\tSystem.err.println(\"File not found!\");\n\t\t}\n\n\t\t/**\n\t\t * Binding hotel reservations to model/JComboBox\n\t\t */\n\t\tfor(Hotel h1: hotels)\n\t\t\thotelsModel.addElement(h1);\n\t\t/**\n\t\t * Binding hotel reservations to model/JList\n\t\t */\n\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\tfor(Reservation r1 : selectedHotel.getReservations())\n\t\t\treservationsModel.addElement(r1);\n\t}", "public void organize() throws FileNotFoundException {\n\t\tScanner fileReader = new Scanner(new File(\"src/input.txt\"));\n\t\tint numLines = 0;\n\t\twhile (fileReader.hasNextLine()) {\n\t\t\tfileReader.nextLine();\n\t\t\tnumLines++;\n\n\t\t}\n\t\tfileReader.close();\n\t\t\n\t\t/* Creates array of object Car */\n\t\tCar[] cars = new Car[numLines];\n\n\t\t/* Creates variable counter to track number of cars in analysis */\n\t\tint counter = 0;\n\n\t\tint i = 0;\n\t\t\n\t\t/* Creates variables for specs of each car */\n\t\tint year;\n\t\tString make;\n\t\tint mileage;\n\n\t\tfileReader = new Scanner(new File(\"src/input.txt\"));\n\t\t\n\t\t/* Loops through file, line by line */\n\t\twhile (fileReader.hasNextLine()) {\n\t\t\t\n\t\t\t/* Lets program know first Int represents year, following String is make, following Int is mileage */\n\t\t\tyear = fileReader.nextInt();\n\t\t\tmake = fileReader.next();\n\t\t\tmileage = fileReader.nextInt();\n\n\t\t\tcars[i] = new Car(year, make, mileage);\n\t\t\ti++;\n\n\t\t}\n\t\tfileReader.close();\n\t\t\n\t\t\n\t\t/* Performs analysis on file\n\t\t * Count how many cars in lot as new as 2005 with over 75,000 miles on it\n\t\t */\n\t\tfor (int j = 0; j < numLines; j++) {\n\t\t\tif (cars[j].year >= 2005) {\n\t\t\t\tif (cars[j].mileage >= 75000) {\n\t\t\t\t\tcounter++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/* Prints analysis into console */\n\t\tSystem.out.println(\"Cars as new as 2005 with over 75,000 miles: \"\n\t\t\t\t+ counter + \" cars\");\n\t}", "public static void processDataFile() {\n final String INPUT_FILENAME = \"input/assn6input1.txt\";\n File inputFile = null;\n Scanner inputScanner = null;\n System.out.println(\"Reading data from file: \" + INPUT_FILENAME);\n System.out.println();\n try {\n inputFile = new File(INPUT_FILENAME);\n inputScanner = new Scanner(inputFile);\n } catch(FileNotFoundException e) {\n System.err.println(\"Error opening file \" + INPUT_FILENAME);\n }\n while(inputScanner.hasNext()) {\n String[] dataLine = inputScanner.nextLine().split(\",\");\n // Is the first token \"REALTOR\"?\n if(dataLine[0].toUpperCase().equals(\"REALTOR\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addRealtor(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteRealtor(dataLine[2]);\n }\n else {\n \n }\n }\n // Is the first token \"PROPERTY\"?\n else if(dataLine[0].toUpperCase().equals(\"PROPERTY\")) {\n if(dataLine[1].toUpperCase().equals(\"ADD\")) {\n addProperty(dataLine);\n }\n else if(dataLine[1].toUpperCase().equals(\"DEL\")) {\n //deleteProperty(Integer.parseInt(dataLine[2]));\n }\n else {\n \n }\n } else {\n // not realtor or property in the first token\n System.out.println(\"\\tNeither realtor, nor property in first\"\n + \" token\");\n }\n }\n inputScanner.close();\n }", "public static void main(String args[]){\n FileInputStream textFile = null;\n Graph graph = new Graph();\n try {\n textFile = new FileInputStream(\"/Users/DoMinhHai/Documents/12_Cousera/Algorithm2/src/week1/edges.txt\");\n Scanner inFile = new Scanner (textFile);\n System.out.println(\"File data.txt has been opened.\");\n String oneLine = inFile.nextLine();\n String first_line[] = oneLine.split(\" \");\n Integer numberOfVerticles = Integer.parseInt(first_line[0]);\n Integer numberOfEdges = Integer.parseInt(first_line[1]);\n\n for(int i=0; i< numberOfEdges; i++) {\n String line = inFile.nextLine();\n String ed[] = line.split(\" \");\n Integer v1 = Integer.parseInt(ed[0]);\n Integer v2 = Integer.parseInt(ed[1]);\n Integer distance = Integer.parseInt(ed[2]);\n Edge e = new Edge(v1, v2, distance);\n graph.addEdge(e);\n }\n System.out.println(graph.verticles.size() + \"--\" + numberOfVerticles);\n System.out.println(graph.edges.size() + \"--\" + numberOfEdges);\n\n MST(graph);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n //FileInputStream textFile = new FileInputStream (\"/Users/DoMinhHai/Documents/12_Cousera/Algorithm2/src/week1/test2.txt\");\n }", "public static void main(String[] args) throws IOException\r\n\t{\n\t\tScanner input = new Scanner(System.in);\r\n\t\tFile f1 = new File(\"C:\\\\Users\\\\DELL\\\\Desktop\\\\zwayam.txt\");\r\n\t\tFileReader fr = new FileReader(f1);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\tString str = \"\";\r\n\t\tString st;\r\n\t\twhile((st = br.readLine()) != null)\r\n\t\t{\r\n\t\t\tstr = str + st;\r\n\t\t}\r\n\t\tfr.close();\r\n\t\tbr.close();\r\n\t\t//System.out.println(str);\r\n\t\tString s = \"\";\r\n\t\tArrayList<String> as = new ArrayList<String>();\r\n\t\tfor(int iter = 0; iter < str.length() ;iter++)\r\n\t\t{\r\n\t\t\tif(str.charAt(iter) == ' ')\r\n\t\t\t{\r\n\t\t\t\tif(s.length() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tas.add(s);\r\n\t\t\t\t\ts = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ts = s + str.charAt(iter);\r\n\t\t\t\tif(iter == str.length()-1)\r\n\t\t\t\t{\r\n\t\t\t\t\tas.add(s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tZwayam_Placement zp = new Zwayam_Placement();\r\n\t\tzp.maxOccuringString(as);\r\n\t}", "public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }", "public Staff (String firstName, String lastName, String cpr, String type, \n String[] address, String phoneNr, String password, int hours, \n double salary, int vacation, int accessLevel) \n {\n this.firstName = firstName;\n this.lastName = lastName;\n this.cpr = cpr;\n this.type = type;\n this.address = address;\n this.phoneNumber = phoneNr;\n this.password = password;\n this.hours = hours;\n this.salary = salary;\n this.vacation = vacation;\n this.accessLevel = accessLevel;\n }", "private void loadFactory(Scanner sc){\n\t\tString factoryLine = sc.nextLine();\n\t\t\n\t\twhile(!(factoryLine.equals(\"#\"))){\n\t\t\tString [] split = factoryLine.split(\",\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tdouble x = Double.parseDouble(split[1]);\n\t\t\t\tdouble y = Double.parseDouble(split[2]);\n\t\t\t\tFactory factory = new Factory(split[0], x, y);\n\t\t\t\tfactoryMap.put(split[0], factory);\n\t\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.out.println(\"Data can't be loaded\");\n\t\t\t}\n\t\t\tfactoryLine = sc.nextLine();\n\t\t}\n\t}", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "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) throws IOException, InterruptedException {\n\n if (args.length != 2) {\n stdErr.println(\"Please input two filenames\\n\");\n } else {\n\n StudentDatabase studentDatabase = null;\n\n ScholarshipDatabase scholarshipDatabase = null;\n\n try {\n StudentLoader studentLoader = new FileStudentLoader();\n\n SchlorshipLoader schlorshipLoader = new FileSchlorshipLoader();\n\n studentDatabase = studentLoader.loadStudent(args[0]);\n\n scholarshipDatabase = schlorshipLoader.loadSchlorship(args[1]);\n } catch (FileNotFoundException fnfe) {\n\n stdErr.println(\"The file does not exit\");\n\n System.exit(1);\n } catch (DataFormatException dfe) {\n\n stdErr.println(\"The file contains malformed data :\" + dfe.getMessage());\n\n System.exit(1);\n }\n\n NPUSchlarshipSystem app = new NPUSchlarshipSystem(\n studentDatabase, scholarshipDatabase);\n\n app.run();\n }\n }", "public NameInfo(String inFirst, String inLast)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\t\tlastName = inLast;\n\n\t}", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFile f11 = new File(\"Usama's 1st file.txt\");\n\t\t\tScanner myReader = new Scanner(f11);\n\t\t\t\n\t\t\twhile(myReader.hasNextLine())\n\t\t\t{\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tSystem.out.println(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An unexpected error has been occured! :(\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}" ]
[ "0.6647836", "0.6458033", "0.6050866", "0.59091544", "0.5662602", "0.563121", "0.5622026", "0.56080294", "0.5570638", "0.55380803", "0.5500132", "0.54716897", "0.5433282", "0.5425204", "0.54093957", "0.5380393", "0.5379179", "0.5367588", "0.5364661", "0.53522587", "0.5350815", "0.53502095", "0.53462416", "0.5312755", "0.528298", "0.52817154", "0.52641344", "0.5263675", "0.5234698", "0.5232598", "0.5224265", "0.51985526", "0.519111", "0.5190596", "0.51726663", "0.5171291", "0.51603365", "0.51588446", "0.51537764", "0.51444113", "0.51253426", "0.511473", "0.5110192", "0.5099888", "0.50840926", "0.50837845", "0.50774854", "0.50738156", "0.5068346", "0.50627774", "0.5061959", "0.50501096", "0.5049159", "0.5044874", "0.50430465", "0.50335413", "0.5026453", "0.50221103", "0.5019523", "0.50169253", "0.5009181", "0.5000559", "0.4996659", "0.49864468", "0.4983728", "0.49824896", "0.49774742", "0.49699304", "0.49635744", "0.49532282", "0.49490806", "0.49490654", "0.49469438", "0.49437034", "0.49432734", "0.49390596", "0.49370804", "0.49315953", "0.49307343", "0.49284568", "0.49254963", "0.49250808", "0.4924173", "0.49241486", "0.4919557", "0.491375", "0.49132118", "0.49098086", "0.49034408", "0.48964277", "0.48948705", "0.48921588", "0.48913673", "0.48882806", "0.4885103", "0.48836648", "0.48829475", "0.48779455", "0.48720023", "0.48666546" ]
0.6639606
1
/ Accessors and Mutators: Any accessor returns the value of the private field which it is responsible for to the class calling it. Any mutator returns sets the value of the fields to a given input which the user declares.
public int getMaxRegions() { return maxRegions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetterAndSetter() {\n UDDIOperationInput uddiOperationInput = new UDDIOperationInput();\n\n //Test Get and Set ElementType\n QName qName = new QName(UDDI_NS_URI, \"input\");\n assertNotNull(\"getElementType was null\",\n uddiOperationInput.getElementType());\n assertTrue(\"getElementType was incorrect\",\n uddiOperationInput.getElementType().equals(qName));\n\n //Test Get and Set Required\n uddiOperationInput.setRequired(isRequired);\n assertFalse(\"getRequired returned true\",\n uddiOperationInput.getRequired());\n isRequired = true;\n uddiOperationInput.setRequired(isRequired);\n assertTrue(\"getRequired returned false\",\n uddiOperationInput.getRequired());\n\n //Test Get and Set BusinessName\n uddiOperationInput.setBusinessName(businessName);\n assertTrue(\"getBusinessName incorrect\",\n uddiOperationInput.getBusinessName().equals(businessName));\n\n //Test Get and Set ServiceName\n uddiOperationInput.setServiceName(serviceName);\n assertTrue(\"getServiceName incorrect\",\n uddiOperationInput.getServiceName().equals(serviceName));\n }", "public void setInput(String input);", "public String getUser1()\n {\n return userInput1;\n }", "public void setInput(String input) { this.input = input; }", "public abstract Object getInput ();", "Input getObjetivo();", "String setValue();", "public int getOfYourChoiceInput() {\n return ofYourChoiceInput;\n }", "public int getInput1() {\n return input1;\n }", "public void setAge(int age) { this.age = age; }", "protected abstract void getInput();", "public void setInput(Input input) {\n this.input = input;\n }", "public void setColl(){\n System.out.println(\"Enter the student's college: \");\n this.college = input.nextLine();\n }", "public void getInfo() {\n Scanner scanner = new Scanner(System.in);\n //get values from the user using scanner and sets class variables appropriately\n System.out.print(\"Enter the first name: \");\n setFirstName(scanner.nextLine());\n\n System.out.print(\"Enter the last name: \");\n setLastName(scanner.nextLine());\n\n System.out.print(\"Enter the ZIP code: \");\n setZipcode(scanner.nextLine());\n\n System.out.print(\"Enter the employee ID: \");\n setEmployeeID(scanner.next());\n }", "public String getUser2()\n {\n return userInput2;\n }", "private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }", "public void setInput(String input){\n this.input = input;\n }", "public int getAge() {return age;}", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}", "public void takeUserInput() {\n\t\t\r\n\t}", "public abstract void userValues();", "public String getInput1() {\n return input1;\n }", "public Circle getInputJack(){\n return inputJack;\n }", "public void setAge(int age);", "public abstract void input();", "public static void main(String[] args) {\n Student s1 = new Student();\r\n \r\n //set the age for the student \r\n// s1.age = -500; \r\n// System.out.println(\"Age: \"+s1.age);\r\n\r\n s1.setAge(-500);\r\n System.out.println(s1.getAge()); //23 \r\n\r\n \r\n }", "public int getAge(){\n return age;\n }", "public CharacterDTO updateCharacter(CharacterDTO myCharacter){\n //I am calling the UserView class method \"prompt\" which takes in a String and outputs the same String\n String name = view.prompt(\"What is your character's name?\");\n int age = view.promptInt(\"What is your character's age?\");\n String hairColor = view.prompt(\"What is your character's hair color?\");\n String rank = view.prompt(\"What is your character's rank?\");\n\n// I'm not creating a character here, instead i'm updating my character\n// and so i don't need to instantiate my DTO\n \n //Now i'm putting some small logic here to set the object with the values the user gave me\n myCharacter.setName(name);\n myCharacter.setAge(age);\n myCharacter.setHairColor(hairColor);\n myCharacter.setRank(rank);\n \n //I have to return the myCharacter object (the DTO)\n return myCharacter;\n }", "@Test\n public void test_setUsername() {\n String value = \"new_value\";\n instance.setUsername(value);\n\n assertEquals(\"'setUsername' should be correct.\",\n value, TestsHelper.getField(instance, \"username\"));\n }", "public String getInput() {\n return input;\n }", "public String getInputUser() {\n return inputUser;\n }", "public abstract void inputChange( int value );", "public int getx(){\r\n return z;\r\n}", "@Override // kotlin.jvm.functions.Function0\n public Unit invoke() {\n RdsInputItemPresenterImpl.access$setupNewValue(this.a, this.b, \"\", this.c);\n return Unit.INSTANCE;\n }", "@Test\n public void test_setFirstName() {\n String value = \"new_value\";\n instance.setFirstName(value);\n\n assertEquals(\"'setFirstName' should be correct.\",\n value, TestsHelper.getField(instance, \"firstName\"));\n }", "@Override\n\tpublic void input() {\n\t\t\n\t}", "protected SelectionText input() {\n return inputter;\n }", "@Test\n public void test_setLastName() {\n String value = \"new_value\";\n instance.setLastName(value);\n\n assertEquals(\"'setLastName' should be correct.\",\n value, TestsHelper.getField(instance, \"lastName\"));\n }", "void setAge(int age);", "public GetterSetterInliner(CodeAttrInfoEditor codeAttrInfoEditor,\n boolean allowAccessModification)\n {\n this.codeAttrInfoEditor = codeAttrInfoEditor;\n this.allowAccessModification = allowAccessModification;\n }", "public int getf(){\r\n return f;\r\n}", "public Client askUpdate(Client toUpdate){\n System.out.println(\"Set a name of a client: \");\n String name = in.nextLine();\n System.out.println(\"Set a surname of a client: \");\n String surname = in.nextLine();\n System.out.println(\"Set a city of a client: \");\n String city = in.nextLine();\n \n toUpdate.setName(name);\n toUpdate.setSurname(surname);\n toUpdate.setCity(city);\n \n return toUpdate;\n }", "@Override\n\tpublic void setInput(Input arg0) {\n\t\t\n\t}", "public void setPrice(double price){this.price=price;}", "private static void setValue(Object object, String fieldName, Object fieldValue) \n throws NoSuchFieldException, IllegalAccessException {\n \n Class<?> studentClass = object.getClass();\n while(studentClass != null){\n Field field = studentClass.getDeclaredField(fieldName);\n field.setAccessible(true);\n field.set(object, fieldValue);\n //return true;\n } \n //return false;\n }", "@Override\n public void invoke(Stack stack) {\n try {\n StackEffect se = (StackEffect) stack.pop().object;\n Symbol fieldName = (Symbol) stack.pop().object;\n Object instance = stack.pop().object;\n Object value = stack.pop().object;\n CheckedType className = se.getOutputTypes().get(0);\n\n Field field = Class.forName(className.toSymbol().symbol).getField(fieldName.symbol);\n field.set(instance,value);\n stack.push( new JavaType(instance.getClass()), instance );\n } catch (NoSuchFieldException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Unable to set instance field.\",e);\n }\n }", "public void setAmount(double amount) {\nloanAmount = amount;\n}", "public void setMaj(){\n System.out.println(\"Enter the student's major: \");\n this.major = input.nextLine();\n }", "public double getA(){\n return a;\n }", "public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }", "public static Course addCourse() {\n\n Course newCourse = new Course();\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the name of course\");\n String courseName = scan.nextLine();\n newCourse.setCourseName(courseName);\n\n System.out.println(\"Enter course ID number\");\n String numberID = scan.nextLine();\n newCourse.setCourseID(numberID);\n\n System.out.println(\"Enter the first and last name of teacher\");\n String name = scan.nextLine();\n\n// newCourse.setTaughtBy(name);\n\n System.out.println(\"Enter the first and last name of student\");\n String name2 = scan.nextLine();\n\n// newCourse.setTakenBy(name2);\n\n\n return newCourse;\n\n }", "public int getAge()\r\n {\r\n return age;\r\n }", "private void getUserInput() {\n getUserTextInput();\n getUserPhotoChoice();\n getUserRoomChoice();\n getUserBedroomsChoice();\n getUserBathroomsChoice();\n getUserCoownerChoice();\n getUserIsSoldChoice();\n getUserTypeChoice();\n mAmenitiesInput = Utils.getUserAmenitiesChoice(mBinding.chipGroupAmenities.chipSchool,\n mBinding.chipGroupAmenities.chipShop, mBinding.chipGroupAmenities.chipTransport,\n mBinding.chipGroupAmenities.chipGarden);\n }", "public double getSalary(){\r\n return salary;\r\n }", "public int get () { return rating; }", "public void set(Object requestor, String field);", "interface InputField {\r\n\r\n /**\r\n * Since the solve() method must be placed in a class implementing the\r\n * InputField interface, I need a reference to the Console where output,\r\n * solveInfo, tuProlog engine and the ProcessInput thread are placed.\r\n *\r\n * This behaviour will change as soon as there will be no need of\r\n * separate input components for .NET and Java2, i.e. as soon as\r\n * the AltGr bug in Thinlet, preventing the use of italian keycombo\r\n * AltGr + '?' and AltGr + '+' to write '[' and ']', will be solved.\r\n */\r\n void setConsole(ConsoleManager console);\r\n\r\n /**\r\n\t * Get the goal displayed in the input field.\r\n\t * @return The goal displayed in the input field.\r\n\t */\r\n public String getGoal();\r\n\r\n /**\r\n * Add the displayed goal to the history of the requested goals.\r\n */\r\n //public void addGoalToHistory();\r\n\r\n /**\r\n * Enable or disable the possibility of asking for goals to be solved.\r\n *\r\n * @param flag true if the query device has to be enabled, false otherwise.\r\n */\r\n //public void enableSolveCommands(boolean flag);\r\n\r\n}", "public void get() {\n }", "private static BookingCustomer customerDetailsInput()\n\t{\n\t\t//constructor with initial values for the customer's informations\n\t\tBookingCustomer aClient = new BookingCustomer(\"Paludo\", 21, true);\n\t\t\n\t\t//new scanner\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\t//asks the user to enter his/her information and uses the set methods to build the object\n\t\tSystem.out.println(\"Please enter your name:\");\n\t\taClient.setName(input.nextLine());\n\t\t\n\t\tSystem.out.println(\"Please enter your age:\");\n\t\taClient.setAge(input.nextInt());\n\t\t\n\t\t//asks if the student is a student\n\t\tSystem.out.println(\"Are you a student? (Y/N)\");\n\t\tchar yesNo = input.next().charAt(0);\n\t\t\n\t\t//if the answer is y\n\t\tif (yesNo == 'Y' || yesNo == 'y')\n\t\t{\n\t\t\t//is a student\n\t\t\taClient.setStudent(true);\n\t\t}\n\t\t//if the answer is n\n\t\telse if (yesNo == 'N' || yesNo == 'n')\n\t\t{\n\t\t\t//is not a student\n\t\t\taClient.setStudent(false);\n\t\t}\n\t\t\n\t\t//returns the client object\n\t\treturn\n\t\t\t\taClient;\n\t}", "public void setX(int x) { this.x=x; }", "private CustomersDTO getDataFromInputToDTO(CustomersInputDTO inputCustomer, CustomersDTO dtoCustomer) {\n // set value for fields of DTO if input not null\n Arrays.asList(CustomersInputDTO.class.getDeclaredFields()).stream().forEach(field -> {\n if (field.getName().equals(ConstantsCustomers.FIELD_CUSTOMER_DATA)) {\n return;\n }\n String methodGet = METHOD_GET_PREFFIX\n .concat(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, field.getName()));\n String methodSet = METHOD_SET_PREFFIX\n .concat(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, field.getName()));\n try {\n Method inputMethod = CustomersInputDTO.class.getMethod(methodGet);\n if (inputMethod.invoke(inputCustomer) != null) {\n Method outMethod = CustomersDTO.class.getMethod(methodSet, inputMethod.getReturnType());\n outMethod.invoke(dtoCustomer, inputMethod.getReturnType().cast(inputMethod.invoke(inputCustomer)));\n }\n } catch (Exception e) {\n return;\n }\n });\n dtoCustomer.setUpdatedUser(jwtTokenUtil.getEmployeeIdFromToken());\n return dtoCustomer;\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public Value restrictToGetter() {\n checkNotPolymorphicOrUnknown();\n if (getters == null)\n return theNone;\n Value r = new Value();\n r.getters = getters;\n return canonicalize(r);\n }", "public abstract void setInput(boolean value);", "protected Object getInitialInput() {\n return this;\n }", "@Override\n\tpublic void setInput(Input arg0) {\n\n\t}", "public void setGivenNum(double input) {\n givenNum = input;\n }", "protected abstract Actor getAccessor();", "public String getSex(){ //\"public\" access allows other classes to retrieve the value of \"sex\", but since there\n // is no setter it cannot be changed from outside the class = Encapsulation/Inkapsling\n return this.sex;\n }", "default MutateNda<V> mut() { return getMut(); }", "public void setInput1(int input1) {\n this.input1 = input1;\n }", "public abstract void mutate();", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public int getNumber(){return number;}", "public double getLoY() {\r\n\treturn fieldLoY;\r\n}", "public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}", "@Override\n public void visitFieldInsn(int opcode, String owner, String name, String desc) {\n if(!isFinal(owner, name)) {\n if (isFieldRead(opcode)) {\n callBeforeGetField(opcode, owner, name, getClassName(), getMethodName(), getLastLineNumber());\n } else if(isFieldUpdate(opcode)) {\n callBeforeSetField(opcode, owner, name, Type.getType(desc), getClassName(), getMethodName(), getLastLineNumber());\n }\n }\n\n super.visitFieldInsn(opcode, owner, name, desc);\n }", "public static Input getInput() {\r\n return input;\r\n }", "public void setU(String f){\n u = f;\n}", "public static void main(String[] args) {\n\tSystem.out.println(\" My name is : \" + \" \" +AcceesModifier1.studentName );\n\tSystem.out.println(\" my age is : \"+ \"\"+ AcceesModifier1.age);\n\t\n\t// this is the non static variable i call by object\n\t\n\tAcceesModifier1 ace = new AcceesModifier1();\n\tSystem.out.println (\" My company name is :\" + \"\"+ace.companyName );\n\t\n\t// protected also we call by class name \n\t\n\tSystem.out.println( \" my salary is :\" + \" \" +AcceesModifier1.salary );\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t}", "public int geti(){\r\n return i;\r\n}", "String getInput();", "@Test\n public void test_getAndSetFieldName_Methods() throws Exception {\n System.out.println(\"test_getAndSet_FieldName_Methods\");\n // FieldSet test values\n\n\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED formRequired_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED(executeInfo, null);\n\n formRequired_FieldSet.schemaInfo_Positioned = schemaInfoFieldSet_formRequired;\n\n\n\n\n // Test the Special Field-Value Get & Set methods______________________________________________________________\n\n\n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_IsRequired\", Symbol.class, \"set_IsRequired__Special\", \"get_IsRequired\",\n notRequired, null, null, notRequired); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_RequiredImagePath\", String.class, \"set_RequiredImagePath__Special\", \"get_RequiredImagePath\",\n \"\\test\\required.gif\", null, null, \"/images/required.gif\"); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_ImageHeight\", Integer.TYPE, \"set_ImageHeight__Special\", \"get_ImageHeight\",\n 11, -1, -1, 6); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_ImageWidth\", Integer.TYPE, \"set_ImageWidth__Special\", \"get_ImageWidth\",\n 12, -1, -1, 7); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n\n }", "public BigDecimal getInputPrice() {\r\n return inputPrice;\r\n }", "public interface UsersInput {\n\n /**\n * Return user's input on a given line.\n * @param outForUser given line.\n * @return user's input.\n * @throws IOException IOException.\n */\n String getUsersInput(String outForUser) throws IOException;\n}", "public abstract void update(Input input);", "public int getAge()\n {\n return age;\n }", "public int getlife(){\r\n return life;\r\n}", "public void input() {\r\n System.out.print(\"Enter your employee ID number: \");\r\n ID = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Gross Pay: \");\r\n grosspay = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your State Tax: \");\r\n Statetax = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Federal Tax: \");\r\n Fedtax = enter.nextDouble(); }", "public void carInput()\n\t{\n\t\tSystem.out.println(\"Enter passenger number of car:\");\n\t\tobjCar.setCarPassengerNumber(sc.nextInt());\n\t}", "@Override\n public void setField (String fieldToModify, String value, Double duration) {\n\n }", "public void set(Object requestor, String field, JComponent comp);", "private interface Valuable extends Base {\n\t\tString getValue();\n\t\tvoid setValue(String value);\n\t}", "@Test\n public void testSetDob() {\n System.out.println(\"setDob\");\n Member instance = member;\n \n String dob = \"2000-01-01\"; \n instance.setDob(dob);\n \n String expResult = dob;\n String result = instance.getDob();\n \n assertEquals(expResult,result);\n }", "private void addAccessor(ThreadContext context, String internedName, Visibility visibility, boolean readable, boolean writeable) {\n assert internedName == internedName.intern() : internedName + \" is not interned\";\n \n final Ruby runtime = context.getRuntime();\n \n if (visibility == PRIVATE) {\n //FIXME warning\n } else if (visibility == MODULE_FUNCTION) {\n visibility = PRIVATE;\n // FIXME warning\n }\n final String variableName = (\"@\" + internedName).intern();\n if (readable) {\n addMethod(internedName, new JavaMethodZero(this, visibility, CallConfiguration.FrameNoneScopeNone) {\n private RubyClass.VariableAccessor accessor = RubyClass.VariableAccessor.DUMMY_ACCESSOR;\n public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) {\n IRubyObject variable = (IRubyObject)verifyAccessor(self.getMetaClass().getRealClass()).get(self);\n \n return variable == null ? runtime.getNil() : variable;\n }\n \n private RubyClass.VariableAccessor verifyAccessor(RubyClass cls) {\n RubyClass.VariableAccessor localAccessor = accessor;\n if (localAccessor.getClassId() != cls.hashCode()) {\n localAccessor = cls.getVariableAccessorForRead(variableName);\n accessor = localAccessor;\n }\n return localAccessor;\n }\n });\n callMethod(context, \"method_added\", runtime.fastNewSymbol(internedName));\n }\n if (writeable) {\n internedName = (internedName + \"=\").intern();\n addMethod(internedName, new JavaMethodOne(this, visibility, CallConfiguration.FrameNoneScopeNone) {\n private RubyClass.VariableAccessor accessor = RubyClass.VariableAccessor.DUMMY_ACCESSOR;\n public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg1) {\n verifyAccessor(self.getMetaClass().getRealClass()).set(self, arg1);\n return arg1;\n }\n \n private RubyClass.VariableAccessor verifyAccessor(RubyClass cls) {\n RubyClass.VariableAccessor localAccessor = accessor;\n if (localAccessor.getClassId() != cls.hashCode()) {\n localAccessor = cls.getVariableAccessorForWrite(variableName);\n accessor = localAccessor;\n }\n return localAccessor;\n }\n });\n callMethod(context, \"method_added\", runtime.fastNewSymbol(internedName));\n }\n }", "private Get() {}", "private Get() {}", "protected void saveInput() {\r\n value = valueText.getText();\r\n }", "public int getJackpot(){ return amount; }", "public void setName (String newName)\n {\n this.name = newName; \n }", "public int setValue (int val);" ]
[ "0.5888228", "0.5879175", "0.5856162", "0.5807113", "0.57252043", "0.5678455", "0.5671894", "0.55822355", "0.5580943", "0.55577374", "0.5546576", "0.55439967", "0.5532792", "0.5525253", "0.5498553", "0.5498239", "0.5490696", "0.54760665", "0.5469989", "0.5467814", "0.5438953", "0.54117066", "0.54089457", "0.5399268", "0.536435", "0.53553957", "0.535108", "0.5346324", "0.5343486", "0.5343214", "0.53298485", "0.5327219", "0.5319716", "0.53181714", "0.5316848", "0.5311743", "0.531085", "0.5310376", "0.52930284", "0.52746534", "0.52734816", "0.52706504", "0.52615714", "0.5259609", "0.52558887", "0.5254777", "0.5253338", "0.5244403", "0.52301323", "0.5220775", "0.52134514", "0.52119213", "0.52067304", "0.5205103", "0.51959723", "0.5194455", "0.5191072", "0.5187626", "0.518452", "0.51826435", "0.5179538", "0.5177438", "0.5176998", "0.5167209", "0.516316", "0.51577455", "0.51574457", "0.5156665", "0.5155048", "0.51537484", "0.51493686", "0.51457417", "0.51411474", "0.51392496", "0.51322967", "0.51286477", "0.51282483", "0.5126969", "0.51250535", "0.5122942", "0.51158017", "0.5108409", "0.51054317", "0.51003027", "0.50943655", "0.50916624", "0.50867325", "0.5085688", "0.50849676", "0.5073432", "0.50708383", "0.5069247", "0.50679094", "0.5063688", "0.50623125", "0.50598246", "0.50598246", "0.50573844", "0.50538075", "0.50442386", "0.504186" ]
0.0
-1
/ FILE I/O loadRegionList: takes the name of the file as a parameter (String) and reads the file; creating a list of initialized Region objects. Before this method can be used, the list of Staff must be loaded and initialized in the Zoo first.
public void loadRegionList(String fileName) { try { BufferedReader in = new BufferedReader(new FileReader(fileName)); maxRegions = Integer.parseInt(in.readLine()); regionList = new Region[maxRegions]; int numRegionsInFile = Integer.parseInt(in.readLine()); for (int i = 0; i < numRegionsInFile; i++) { String type = in.readLine(); /* createAmazonRainforest, createArctic, and createAquarium are void static methods which takes in the BufferedReader and initializes all Region objects in the RegionList array using the Regions.txt file */ if (type.equals("Amazon Rainforest")) { createAmazonRainforest(in); } else if (type.equals("Arctic")) { createArctic(in); } else if (type.equals("Aquarium")) { createAquarium(in); } if (i == 2) { regionList[i].toString(); //temp } } } catch (IOException iox) { System.out.println("Error reading " + fileName); } catch (NumberFormatException ex) { System.out.println("Problem with file formatting. Please check the file and try again."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Regions loadFromFile() throws IOException {\n try (InputStream in = StreamUtils.getInputStream(this.localRegions)) {\n JsonObject json = Json.createReader(in).readObject();\n Regions regions = new RegionsJSON().parseRegions(json);\n // regions loaded\n LOGGER.fine(\"Loaded ANSS Authoritative Regions from \"\n + this.localRegions\n + \", last modified=\" + XmlUtils.formatDate(\n new Date(this.localRegions.lastModified())));\n return regions;\n }\n }", "public void loadStaffList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxStaff = Integer.parseInt(in.readLine());\n staffList = new Staff[maxStaff];\n int numStaffInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numStaffInFile; i++){\n \n String staffType = in.readLine();\n if (staffType.equals(\"Labourer\")) {\n staffList[i] = new Labourer(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()));\n numStaff++;\n } else if (staffType.equals(\"Manager\")) /*;*/\n {\n staffList[i] = new Manager(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()));\n numStaff++;\n }\n }\n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n \n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "private static List<Student> loadStudentList(File file) throws IOException {\n return loadStudentList(new FileInputStream(file));\n }", "private void createAmazonRainforest (BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int tempMaxStaff = Integer.parseInt(in.readLine());\n int tempNumStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n \n for (int i = 0; i < tempNumStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n \n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int tempMaxAnimals = Integer.parseInt(in.readLine());\n int tempNumAnimals = Integer.parseInt(in.readLine());\n \n Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals;\n \n for (int i = 0; i < tempNumAnimals; i++) {\n readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n RegionSpec tempSpec = new RegionSpec (tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()),\n Double.parseDouble(in.readLine()));\n \n regionList[numRegions] = new AmazonRainforest(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()),\n Boolean.parseBoolean(in.readLine()), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()),\n Integer.parseInt(in.readLine())); \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++;\n }", "private void createArctic(BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int maxStaff = Integer.parseInt(in.readLine());\n int numStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[maxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n for (int i = 0; i < numStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int maxAnimals = Integer.parseInt(in.readLine());\n int numAnimals = Integer.parseInt(in.readLine());\n \n Animal[] animals = new Animal[numAnimals]; //creating a local array of Animals;\n for (int i = 0; i < numAnimals; i++) {\n animals[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n regionList[this.numRegions] = new Arctic(readStaffList, animals, tempRegionName, new RegionSpec(numStaff, maxStaff, numAnimals, maxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())), \n Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine()), Double.parseDouble(in.readLine()), Boolean.parseBoolean(in.readLine()));\n //constructor call \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++; //updates the global field numRegions\n }", "public List<Region> listRegions() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Region.class);\n\t}", "public void readRegions( String filename ) {\r\n\t\ttry {\r\n\t\t\ts.readRegions(filename, ignoreY);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void load(String inFN) throws FileNotFoundException\n {\n String check = \" \";\n \tfile = new Scanner(new FileReader(inFN));\n \n \t// Rip apart the string and find the number of cities\n \t// Save it to a misc string named fileInfo\n \twhile (!check.equals(\"NODE_COORD_SECTION\"))\n {\n \tcheck = file.next();\n \t// Get the number of cities from the file\n \tif (check.equals(\"DIMENSION\"))\n \t{\n \t\t// Removes the character ':'\n \t\tcheck = file.next();\n \t\tfileInfo = fileInfo + check + \" \";\n \t\t\n \t\t// Extracts the number of cities\n \t\tcityNumber = file.nextInt();\n \t\tfileInfo = fileInfo + cityNumber + \" \";\n \t}\n \t\n \t// Dumps the fileinfo into one string\n \tfileInfo = fileInfo + check + \" \";\n }\n\n \t// Now that we have the number of cities, use it to\n \t// initialize an array\n \tcity = new City[cityNumber];\n \t\n \t// Loads the city data from the file into the city array\n \tfor (int i = 0; i < cityNumber; i++)\n {\n \t\tfile.nextInt();\n \tcity[i] = new City(i, file.nextDouble(), file.nextDouble());\n \t}\n }", "private static List<GenomeSegment> loadSegments() {\n JamLogger.info(\"Loading genome segments...\");\n\n ArrayList<GenomeSegment> segments =\n new ArrayList<GenomeSegment>();\n\n DataReader reader =\n DataReader.open(resolveDefinitionFile(),\n DEFINITION_FILE_COMMENT);\n\n try {\n for (String line : reader)\n segments.add(parseSegment(line));\n }\n finally {\n reader.close();\n }\n\n segments.trimToSize();\n return Collections.unmodifiableList(segments);\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "public SLList readFile(String file) {\n\t\t// Read it back in\n\t\tObjectInputStream i = null;\n\t\tSLList temp = null;\n\n\t\ttry {\n\t\t\ti = new ObjectInputStream(new FileInputStream(file));\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\n\t\t/**\n\t\t * try/catch to verify file has been restored\n\t\t */\n\t\t\n\t\ttry {\n\t\t\ttemp = (SLList) i.readObject();\n\t\t\t//System.out.println(temp);\n\t\t\tSystem.out.println(\"Successfully restored data from file!\");\n\t\t} catch (ClassNotFoundException 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\ttry {\n\t\t\ti.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\treturn temp;\n\t}", "public static void loadCountries(String filePath){\n File inputFile = new File(filePath);\n // Scans the file if the file path is correctly formatted.\n // If not, returns an error message.\n Scanner scanner = null;\n try {\n scanner = new Scanner(inputFile);\n } catch (FileNotFoundException e){\n System.err.println(e);\n System.exit(1);\n }\n \n // Skips the first line of indicator names\n scanner.nextLine();\n \n // Creates a new Country object for each line and adds it to the countryList.\n while (scanner.hasNextLine()){\n String line = scanner.nextLine();\n Country country = new Country(line);\n countryList.add(country);\n }\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static ArrayList<Tweet> load(String fname) {\n\t\tArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t\n\t\ttry {\n\t\t FileInputStream fin = new FileInputStream(fname);\n\t\t ObjectInputStream ois = new ObjectInputStream(fin);\n\t\t tweets = (ArrayList<Tweet>) (ois.readObject());\n\t\t ois.close();\n\t\t} catch (FileNotFoundException ex) {\n\t\t ex.printStackTrace();\n\t\t} catch (IOException ioex) {\n\t\t ioex.printStackTrace();\n\t\t}\n\t\tcatch (ClassNotFoundException classex) {\n\t\t classex.printStackTrace();\n\t\t}\n\t\treturn tweets;\n }", "public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }", "private List<Region> stataRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36218276352746, -71.08994364738464);\n\t\tr.addVertex(42.36207970542849, -71.08879566192627);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\trs.add(r);\n\n\t\t// Region 2\n\t\tr = new Region(\"Stata-2\");\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\trs.add(r);\n\n\t\t// Region 3\n\t\tr = new Region(\"Stata-3\");\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36131865577206, -71.08895659446716);\n\t\tr.addVertex(42.361366221645646, -71.08989000320435);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36196871959442);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 1 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361659543737126);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 2 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36140585984613);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 3 is in region %s\", getRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }", "private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }", "public Zoo(String f1Name, String f2Name) {\n numRegions = 0;\n numStaff = 0;\n loadStaffList(f1Name);\n loadRegionList(f2Name);\n }", "@Override\n\tpublic List<Region> getAllRegionsByIdList(List<String> idList) {\n\t\treturn null;\n\t}", "public void read() {\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(\"studentData.dat\");\n\n\t\t\tObjectInputStream ois;\n\t\t\ttry {\n\t\t\t\tois = new ObjectInputStream(fis);\n\t\t\t\ttry {\n\t\t\t\t\tstudentList = (ArrayList<Student>) ois.readObject();\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tois.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\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}", "public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }", "public static ArrayList<Student> read(String filename){\n\t\t\n\t\tArrayList<Student> students = new ArrayList<>();\n\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.contains(\" \")){\n\t\t\t\t\tstudents.add(new Student(getGpaFromLine(line), getSatFromLine(line)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn students;\n\t}", "public List<String> load();", "@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 }", "private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }", "public List<State> JsonReader() {\n ObjectMapper mapper = new ObjectMapper();\n List<State> stateList = new ArrayList<>();\n try {\n stateList = mapper.readValue(new File(\"stateList.json\"), new TypeReference<List<State>>(){});\n return stateList;\n } catch (IOException e) {\n System.err.println(\"stateList.json not found or is empty.\");\n System.err.println(\"stateList.json will be initialized.\");\n JSONWriter(stateList);\n } finally {\n System.out.print(\"\");\n }\n return stateList;\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public ArrayList<String> loadRead() {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public void loadMap(Maps map) throws FileNotFoundException{\n ArrayList<Station> stat; \n stat = new ArrayList<>();\n \n try {\n String hodnoty; //do premennej hodnoty budem nacitavat riadky z textaka\n int stanica_na_zapis = 1; //counter pre stanice\n \n //---------------------------------------- zaciatok nacitavania\n hodnoty = br.readLine(); //nacitam riadok z textaka\n int x,y; //x, y budu sluzit pre nacitane suradnice\n String nazov; \n String[] split; //split je pole stringov...tu rozdelim riadok na jednotlive hodnoty\n split = hodnoty.split(\"\\\\s+\"); //delim podla medzery\n nazov = split[0]; //nazov stanice bude prvy string\n x = Integer.parseInt(split[1]); //nasleduje konverzia suradnic\n y = Integer.parseInt(split[2]);\n \n Station st = new Station(nazov,stanica_na_zapis,x,y); //vytvorim novu stanicu\n \n stat.add(st); //a pridam do zoznamu stanic\n \n while(!\"\".equals(hodnoty = br.readLine())){ //toto robim, az kym nie som na prazdnom riadku\n stanica_na_zapis++;\n split = hodnoty.split(\"\\\\s+\");\n nazov = split[0];\n x = Integer.parseInt(split[1]);\n y = Integer.parseInt(split[2]);\n st = new Station(nazov,stanica_na_zapis,x,y); \n stat.add(st);\n }\n } catch (IOException ex) {\n Logger.getLogger(Maps.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n stations_loaded = stat.size(); \n map.setStations(stat); //nakoniec ukladam nahrany zoznam stanic\n }", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "public void readFromEmployeeListFile()\r\n {\r\n try(ObjectInputStream fromEmployeeListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/employeelist.dta\")))\r\n {\r\n employeeList = (EmployeeList) fromEmployeeListFile.readObject();\r\n employeeList.setSavedStaticEmpRunNR(fromEmployeeListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av ansatt \"\r\n + \"objektene.\\nOppretter tomt ansattregister.\\n\"\r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public void readFile() {\n try\n {\n tasksList.clear();\n\n FileInputStream file = new FileInputStream(\"./tasksList.txt\");\n ObjectInputStream in = new ObjectInputStream(file);\n\n boolean cont = true;\n while(cont){\n Task readTask = null;\n try {\n readTask = (Task)in.readObject();\n } catch (Exception e) {\n }\n if(readTask != null)\n tasksList.add(readTask);\n else\n cont = false;\n }\n\n if(tasksList.isEmpty()) System.out.println(\"There are no todos.\");\n in.close();\n file.close();\n }\n\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public void readFromFile(String path) {\n try {\n ArrayList<String> list = new ArrayList<>(Files.readAllLines(Paths.get(path)));\n\n for (String info: list) {\n AddressEntry entry = new AddressEntry();\n ArrayList<String> entryList = new ArrayList<>(Arrays.asList(info.split(\",\")));\n entry.setFirstName(entryList.get(0).trim());\n entry.setLastName(entryList.get(1).trim());\n entry.setStreet(entryList.get(2).trim());\n entry.setCity(entryList.get(3).trim());\n entry.setState(entryList.get(4).trim());\n entry.setZip(Integer.parseInt(entryList.get(5).trim()));\n entry.setPhone(entryList.get(6).trim());\n entry.setEmail(entryList.get(7).trim());\n add(entry);\n }\n\n System.out.println(\"Read in \" + list.size() + \" new Addresses. Successfully loaded\");\n System.out.println(\"There are currently \" + addressEntryList.size() + \" Addresses in the Address Book.\");\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }", "private ObservableList<Saucer> loadSaucers(){\r\n try {\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileInputStream fis = new FileInputStream(file);\r\n ObjectInputStream input = new ObjectInputStream(fis);\r\n List<Saucer> list = (List<Saucer>) input.readObject();\r\n ObservableList<Saucer> saucers = FXCollections.observableArrayList(list);\r\n\r\n return saucers;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return null;\r\n }\r\n }", "public void loadMembers(String filename) {\n try {\r\n Scanner input = new Scanner(new File(filename));\r\n // keep going until the end \r\n while (input.hasNext()) {\r\n String name = input.nextLine();\r\n String address = input.nextLine();\r\n String onLoan = input.nextLine();\r\n // add the member \r\n addMember(name, address);\r\n \r\n if (!onLoan.equals(\"NONE\")) {\r\n \r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n // print an error message \r\n System.err.println(\"File not found\");\r\n }\r\n }", "private void loadSavedSchedules() {\n scheduleList = new ScheduleList(new ArrayList<>());\n try {\n scheduleList = reader.readSchedules();\n } catch (IOException e) {\n System.err.println(\"Schedule File Missing\");\n } catch (JSONException je) {\n System.err.println(\"Empty File - Schedule\");\n System.out.println(je);\n }\n }", "public static Vector<Beacon> parseBeaconList( String filename ) throws FileNotFoundException\r\n {\r\n File f = new File( filename );\r\n return parseBeaconList( f );\r\n }", "public void loadList(String name){\n }", "public List<Stock> readFile() throws IOException\n {\n \t //System.out.println(\"hhh\");\n \t //List<Stock> listStock = mapper.readValue(file, new TypeReference<List<Stock>>() {});\n \t \n \t List<Stock> listStock = mapper.readValue(file, new TypeReference<List<Stock>>(){});\n \t\n\t\treturn listStock;\n }", "public void loadList () {\r\n ArrayList<String> list = fileManager.loadWordList();\r\n if (list != null) {\r\n for (String s : list) {\r\n addWord(s);\r\n }\r\n }\r\n }", "public static void read(String fname){\r\n\t\t\t\r\n\t\t\tString line = \"\";\r\n\t\t\ttry {\r\n\t // FileReader reads text files in the default encoding.\r\n\t FileReader fileReader = new FileReader(fname);\r\n\t \r\n\t // Always wrap FileReader in BufferedReader.\r\n\t BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t header=bufferedReader.readLine();\r\n\t \r\n\t data = new ArrayList<alldata>();\r\n\r\n\t while((line = bufferedReader.readLine()) != null) {\r\n\t \t\r\n\t //parse line and divide data by comma\r\n\t \r\n\t \t\r\n\t \tString[] lineStr = line.split(\",\");\r\n\t \t\r\n\t //create object row into which data from each line is stored and then added to array list\t\r\n\t \t\r\n\t if(lineStr.length >0) {\r\n\t \talldata row = new alldata();\r\n\t \trow.Name = lineStr[0]+ \",\" + lineStr[1];\r\n\t \trow.Num = lineStr[2];\r\n\t \trow.State = lineStr[3];\r\n\t \trow.Zip = lineStr[4];\r\n\t \trow.Age = Integer.parseInt(lineStr[6]);\r\n\t \trow.Sex = lineStr[7];\r\n\t \t\r\n\t \tdata.add(row);\r\n\t }\r\n\t \r\n\t \r\n\t } \r\n\t bufferedReader.close(); // Always close files. \r\n\t }catch(FileNotFoundException ex) {\r\n\t System.out.println(\"Unable to open file '\" + fname + \"'\"); \r\n\t }catch(IOException ex) {\r\n\t System.out.println(\"Error reading file '\" + fname + \"'\"); \r\n\t }\r\n\t\t\tSystem.out.println(\"Finish reading data from file \"+ fname);\r\n\t\t}", "private static void readUserListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"users.json\")) {\n\n\t\t\tJSONArray userListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < userListJSON.size(); i++) {\n\t\t\t\tJSONObject user = (JSONObject) userListJSON.get(i);\n\t\t\t\tString name = (String) user.get(\"name\");\n\t\t\t\tString surname = (String) user.get(\"surname\");\n\t\t\t\tString username = (String) user.get(\"username\");\n\t\t\t\tString password = (String) user.get(\"password\");\n\t\t\t\tString account = (String) user.get(\"account\");\n\n\t\t\t\tif(account.equals(\"employee\")) {\n\t\t\t\t\tMain.userList.add(new Employee(username, name, surname, password));\n\t\t\t\t} else {\n\t\t\t\t\tMain.userList.add(new Customer(username, name, surname, password));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "@Override\n public int importRegionFromJsonFile(String path) {\n ObjectMapper mapper = new ObjectMapper();\n int length = 0;\n try {\n // Convert JSON string from file to Object\n List<Region> regions = mapper.readValue(new File(path), new TypeReference<List<Region>>(){});\n for(Region region: regions){\n regionRepository.save(region);\n }\n length = regions.size();\n } catch (JsonGenerationException e) {\n e.printStackTrace();\n } catch (JsonMappingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return length;\n }", "protected static void loadFromFile(File worldsFile, Server server) {\n\t\tfinal FileConfiguration configuration = YamlConfiguration.loadConfiguration(worldsFile);\n\t\t\n\t\tfor (final String worldName : configuration.getStringList(\"worlds\")) {\n\t\t\tworlds.add(server.getWorld(worldName));\n\t\t}\n\t}", "@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 }", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public void readFromFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\Project\\\\src\\\\Railway.txt\");\r\n\t\t\tScanner s = new Scanner(f);\r\n\t\t\tpersons = new Person2 [50]; \r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine()){\r\n\t\t\t\tString a = s.nextLine();\r\n\t\t\t\tString b = s.nextLine();\r\n\t\t\t\tString c = s.nextLine();\r\n\t\t\t\tString d = s.nextLine();\r\n\t\t\t\tString e = s.nextLine();\r\n\t\t\t\tString g = s.nextLine();\r\n\t\t\t\tString h = s.nextLine();\r\n\t\t\t\tString j = s.nextLine();\r\n\t\t\t\tPerson2 temp = new Person2 (a,b,c,d,e,g,h,j);\r\n\t\t\t\tpersons[i] = temp;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}", "public static ListOfMedicine loadListOfMedicine(String savefile) {\n // crate mapper object\n\t\tObjectMapper mapp = new ObjectMapper();\n\t\tListOfMedicine medicines = null;\n\n\t\ttry {\n //load the data from file\n\t\t\tmedicines = mapp.readValue(new File(savefile), ListOfMedicine.class);\n\t\t} catch (Exception e) {\n e.printStackTrace();\n }\n\n\t\treturn medicines ;\n }", "private void createAquarium (BufferedReader in) { \n try {\n String tempRegionName = in.readLine();\n int tempMaxStaff = Integer.parseInt(in.readLine());\n int tempNumStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor\n \n for (int i = 0; i < tempNumStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int tempMaxAnimals = Integer.parseInt(in.readLine());\n int tempNumAnimals = Integer.parseInt(in.readLine());\n \n Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals;\n \n for (int i = 0; i < tempNumAnimals; i++) {\n readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n RegionSpec tempSpec = new RegionSpec(tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()), \n Double.parseDouble(in.readLine()));\n \n regionList[numRegions] = new Aquarium(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()), \n Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()),\n Integer.parseInt(in.readLine()));\n //maybe we left out regionName in the constructor for saving and loading the files\n \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n numRegions++; //check over this /updates the global field numRegions\n \n \n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Student> retrieveAllStudentObjects() {\r\n\t\tList<Student> listOfStudents = new ArrayList<Student>();\r\n\r\n\t\ttry {\r\n\t\t\tlistOfStudents = readSerializedObject();\r\n\r\n\t\t\tif (listOfStudents == null) {\r\n\t\t\t\tSystem.out.println(\"Unable to read from file!\");\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn listOfStudents;\r\n\t}", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void fetchRegions () {\n try {\n // try loading from geoserve\n this.regions = loadFromGeoserve();\n } catch (Exception e) {\n LOGGER.log(Level.WARNING,\n \"Error fetching ANSS Regions from geoserve\",\n e);\n try {\n if (this.regions == null) {\n // fall back to local cache\n this.regions = loadFromFile();\n }\n } catch (Exception e2) {\n LOGGER.log(Level.WARNING,\n \"Error fetching ANSS Regions from local file\",\n e);\n }\n }\n }", "protected void parseZones(File file) {\r\n\t\tScanner scanner = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(file);\r\n\t\t\tString line;\r\n\t\t\tif(scanner.hasNext()) \r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\t\taddToSupplyZoneLines(line);\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif (scanner != null) scanner.close();\r\n\t\t}\r\n\t}", "public static void loadStudRecsFromFile(File file) {\r\n\t\ttry {\r\n\t\t\tJAXBContext context = JAXBContext\r\n\t\t\t\t\t.newInstance(StudRecsWrapper.class);\r\n\t\t\tUnmarshaller um = context.createUnmarshaller();\r\n\t\t\t\r\n\t\t\tStudRecsWrapper wrapper = (StudRecsWrapper) um.unmarshal(file);\r\n\t\t\t\r\n\t\t\tstudRecs.clear();\r\n\t\t\tstudRecs.addAll(wrapper.getStudRecs());\r\n\t\t\tSystem.out.println(\"File loaded!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Cannot load file, does it exist?\");\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static List<Transaction> readObject(String filename){\n\n\t\tlogger.finer(\" Reading object (Deserializtion) used\");\n\t\tList<Transaction> transactionList = null;\n\n\t\ttry(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename))){\n\t\t\ttransactionList = (List<Transaction>)ois.readObject();\n\t\t}\n\t\tcatch(IOException | ClassNotFoundException ioe){\n\n\t\t\tSystem.out.println(\"Exception occurred during deserialization\");\n\t\t} \n\n\t\t//\t\tpresentFileContents(transactionList);\n\n\t\treturn (List<Transaction>) transactionList;\n\t}", "public void load(){\n\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open Streams\n\t\t\tFileInputStream inFile = new FileInputStream(\"user.ser\");\n\t\t\tObjectInputStream objIn = new ObjectInputStream(inFile);\n\t\t\t\n\t\t\t// Load the existing UserList at the head\n\t\t\tthis.head = (User)objIn.readObject();\n\t\t\t\n\t\t\t// Close Streams\n\t\t\tobjIn.close();\n\t\t\tinFile.close();\n\t\t}\n\n\t\tcatch(Exception d) {\n\t\t System.out.println(\"Error loading\");\n\t\t}\n\n\t}", "private void loadLists() {\n }", "public static List<String> loadListFromFile(File file) throws InstantiationException, IllegalAccessException {\n\t\n\tList<String> list = new ArrayList<String>();\n\t\n\tif (file.exists()) {\n\t try {\n\t\tScanner s = new Scanner(file);\n\t\twhile (s.hasNext())\n\t\t list.add(s.next());\n\t } catch (FileNotFoundException ex) {\n\t\t// This should never be thrown because we have an if to check it...\n\t }\n\t \n\t}\n\t\n\treturn list;\n\t\n }", "public void sortRegions(List<Mdr13Record> list) {\n \t\tSort sort = getConfig().getSort();\n \t\tList<SortKey<Mdr13Record>> keys = new ArrayList<SortKey<Mdr13Record>>();\n \t\tfor (Mdr13Record reg : list) {\n \t\t\tSortKey<Mdr13Record> key = sort.createSortKey(reg, reg.getName(), reg.getMapIndex());\n \t\t\tkeys.add(key);\n \t\t}\n \n \t\tCollections.sort(keys);\n \n \t\tString lastName = \"\";\n \t\tint record = 0;\n \t\tMdr28Record mdr28 = null;\n \t\tfor (SortKey<Mdr13Record> key : keys) {\n \t\t\trecord++;\n \t\t\tMdr13Record reg = key.getObject();\n \n \t\t\t// If this is new name, then create a mdr28 record for it. This\n \t\t\t// will be further filled in when the other sections are prepared.\n \t\t\tString name = reg.getName();\n \t\t\tif (!name.equals(lastName)) {\n \t\t\t\tmdr28 = new Mdr28Record();\n \t\t\t\tmdr28.setName(name);\n \t\t\t\tmdr28.setStrOffset(reg.getStrOffset());\n \t\t\t\tmdr28.setMdr14(reg.getMdr14());\n \t\t\t\tmdr28.setMdr23(record);\n\t\t\t\tlastName = name;\n \t\t\t}\n \n \t\t\tassert mdr28 != null;\n \t\t\treg.setMdr28(mdr28);\n \n\t\t\tregions.add(reg);\n \t\t}\n \t}", "public List<String> loadFromFile(String fileName) {\n String line;\n List<String> listValuesFieldsEmployees = new ArrayList<>();\n\n try (FileReader fileReader = new FileReader(fileName);\n BufferedReader reader = new BufferedReader(fileReader)) {\n while ((line = reader.readLine()) != null) {\n listValuesFieldsEmployees.add(line);\n }\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return listValuesFieldsEmployees;\n }", "public static ArrayList<Student> loadListOfStudents(String fileName) {\n ArrayList<Student> students = new ArrayList<>();\r\n String str = TextReader.StringFromFile(fileName);//Uses the method that returns a complete string with newlines for each studentline.\r\n if (validateInput(str)) {//Uses the validation method to check that the input is valid.\r\n String[] lines = str.split(\"\\n\");\r\n String[] lineParameters;\r\n int countFor = 0;\r\n for (String line : lines) {\r\n if(countFor > 1){\r\n lineParameters = line.split(\",\");\r\n Vote vote = new Vote(new Subject(lineParameters[1]), new Subject(lineParameters[2]), new Subject(lineParameters[3]), new Subject(lineParameters[4]));\r\n Student newStudent = new Student(lineParameters[0], vote);\r\n students.add(newStudent);\r\n }\r\n countFor++;\r\n }\r\n }\r\n\r\n return students;\r\n }", "public static ArrayList<Player> readPlayersFromFile() \r\n {\r\n //Inisialize Arraylist \r\n ArrayList<Player> players = new ArrayList<Player>();\r\n //Inisialize FileInputStream\r\n FileInputStream fileIn = null;\r\n\r\n try \r\n {\r\n //Establish connection to file \r\n fileIn = new FileInputStream(\"players.txt\");\r\n while (true) \r\n {\r\n //Create an ObjectOutputStream \r\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\r\n //Read a Player object from the file and add it to the ArrayList\r\n players.add((Player)objectIn.readObject());\r\n }//end while\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e);\r\n }\r\n finally \r\n {\r\n usernamesTaken.clear();\r\n\r\n for(int i = 0; i < players.size(); i++)\r\n {\r\n usernamesTaken.add(players.get(i).getUsername());\r\n }//end for\r\n\r\n //Try to close the file and return the ArrayList\r\n try\r\n {\r\n //Check if the end of the file is reached\r\n if (fileIn != null)\r\n { \r\n //Close the file \r\n fileIn.close();\r\n //Return the ArrayList of players\r\n return players;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e)\r\n }//end try \r\n\r\n //Return null if there is an excetion \r\n return null;\r\n }//end try \r\n }", "private void readRacesFromFile(String racesFileName) {\n\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd.MM.yyyy\");\n\n URL url = Thread.currentThread().getContextClassLoader()\n .getResource(racesFileName);\n try (Stream<String> stream = Files.lines(Paths.get(url.getPath()))) {\n stream\n .skip(1)\n .map(s -> s.split(\";\"))\n .map(a -> new Race(Long.parseLong(a[0]), a[1], LocalDate.parse(a[2], formatter)))\n //.forEach(System.out::println);\n .forEach(em::persist);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public ArrayList<Event> readSerFile() {\n\n ArrayList<Event> events = new ArrayList<>();\n try {\n FileInputStream file = new FileInputStream(filename);\n ObjectInputStream storedEvents = new ObjectInputStream(file);\n\n events = (ArrayList<Event>) storedEvents.readObject();\n\n storedEvents.close();\n file.close();\n\n return events;\n\n } catch (FileNotFoundException e) {\n System.out.println(filename + \" is missing\");\n } catch (IOException | ClassNotFoundException e) {\n return events;\n }\n\n return events;\n }", "public void loadJobDataFromFile(File file) {\n try {\n\n JAXBContext context = JAXBContext.newInstance(JobListWrapper.class);\n Unmarshaller um = context.createUnmarshaller();\n\n // Reading XML from the file and unmarshalling.\n JobListWrapper wrapper = (JobListWrapper) um.unmarshal(file);\n\n jobData.clear();\n jobData.addAll(wrapper.getJobs());\n\n // Save the file path to the registry.\n setJobFilePath(file);\n\n } catch (Exception e) { // catches ANY exception\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"Could not load data\");\n alert.setContentText(\"Could not load data from file:\\n\" + file.getPath());\n\n alert.showAndWait();\n }\n }", "public static List<Polyomino> openFile() {\n \tString basePath = new File(\"\").getAbsolutePath();\n Path path = Paths.get(basePath, \"polyominoesINF421.txt\");\n Charset charset = Charset.forName(\"UTF-8\");\n List<Polyomino> polyominos = new LinkedList<Polyomino>();\n\t\ttry {\n\t\t\tList<String> lines = Files.readAllLines(path, charset);\n\t\t\tfor (String line : lines) {\n\t\t\t\tpolyominos.add(new Polyomino(line));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n return polyominos;\n }", "public void readFromHotelRoomListFile()\r\n {\r\n try(ObjectInputStream fromHotelRoomListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/hotelRoomlist.dta\")))\r\n {\r\n hotelRoomList = (HotelRoomList) fromHotelRoomListFile.readObject();\r\n hotelRoomList.getSavedStaticPrice(fromHotelRoomListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n hotelRoomList = new HotelRoomList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av hotelrom \"\r\n + \"objektene.\\nOppretter ny liste for \"\r\n + \"hotelrommene.\\n\" + cnfe.getMessage(), \r\n \"Feilmelding\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n hotelRoomList = new HotelRoomList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter ny liste for hotelrommene.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n hotelRoomList = new HotelRoomList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter ny liste for hotelrommene.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public void readPatientListFromFile()\r\n\t{\n\t\tnextPatientLocation = 0;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Makes file reader objects and passes filename\r\n\t\t\tFileReader fr = new FileReader(patientMasterfile);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\t//reads first line and makes a blank patient \r\n\t\t\tString aReadLine = br.readLine();\r\n\t\t\tPatient tempRead = new Patient();\r\n\t\t\t//loops through all lines in the file\r\n\t\t\twhile(aReadLine != null)\r\n\t\t\t{\r\n\t\t\t\t//resets patient to null\r\n\t\t\t\ttempRead = new Patient();\r\n\t\t\t\t//Splits the read in data and assigns that data to the appropriate attribute \r\n\t\t\t\tString[] splitPatientData = aReadLine.split(\"~~\");\r\n\r\n\t\t\t\ttempRead.patientID = splitPatientData[0];\r\n\t\t\t\ttempRead.forename = splitPatientData[1];\r\n\t\t\t\ttempRead.surname = splitPatientData[2];\r\n\t\t\t\ttempRead.username = splitPatientData[3];\r\n\t\t\t\ttempRead.password = splitPatientData[4];\r\n\t\t\t\ttempRead.houseNumber = splitPatientData[5];\r\n\t\t\t\ttempRead.postcode = splitPatientData[6];\r\n\t\t\t\ttempRead.telephoneNumber = splitPatientData[7];\r\n\t\t\t\ttempRead.dob = splitPatientData[8];\r\n\t\t\t\ttempRead.mode = splitPatientData[9];\r\n\t\t\t\t//adds patient to list and gets the next line\r\n\t\t\t\taddPatientToList(tempRead);\r\n\t\t\t\taReadLine = br.readLine();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//catches any exceptions trown by reading \r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error reading file, \");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public List<Student> importStudent(String filename) throws FileNotFoundException {\n List<Student> students = new ArrayList<>();\n FileReader fileReader = new FileReader(DATA_PATH + filename);\n Scanner scanner = new Scanner(fileReader);\n //skip first line\n String firstLine = scanner.nextLine();\n Log.i(\"first line: \" + firstLine);\n\n while (scanner.hasNextLine()) {\n String[] s = scanner.nextLine().split(\",\");\n String fullName = s[0];\n int yearLevel = Integer.parseInt(s[1]);\n Student student = new Student(fullName, yearLevel);\n students.add(student);\n }\n\n scanner.close();\n return students;\n }", "private ArrayList<Habit> loadFromFile(final String fileName) {\r\n ArrayList<Habit> habitArray = new ArrayList<Habit>();\r\n try {\r\n FileInputStream fis = openFileInput(fileName);\r\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\r\n Gson gson = new Gson();\r\n\r\n // Code from http://stackoverflow.com/questions/12384064/gson-convert-from-json-to-a-typed-arraylistt\r\n Type typeHabit = new TypeToken<ArrayList<Habit>>(){}.getType();\r\n\r\n habitArray = gson.fromJson(in, typeHabit);\r\n\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n saveInFile(fileName, new ArrayList<Habit>());\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n }\r\n return habitArray;\r\n }", "public static List<Restaurant> retrieveRestaurantsFromWorkBook(final File file)\r\n\t\t\tthrows InvalidFormatException, IOException {\r\n\t\tfinal Workbook workbook = WorkbookFactory.create(file);\r\n\t\tfinal List<Restaurant> restaurants = new ArrayList<Restaurant>();\r\n\r\n\t\tfinal Sheet sheet = workbook.getSheetAt(0);\r\n\r\n\t\tfor (final Row row : sheet) {\r\n\r\n\t\t\tif (null != row.getCell(0)) {\r\n\t\t\t\tfinal String name = row.getCell(0).getStringCellValue();\r\n\t\t\t\tfinal String address = row.getCell(1).getStringCellValue();\r\n\t\t\t\tfinal String city = row.getCell(2).getStringCellValue();\r\n\t\t\t\tfinal String state = row.getCell(3).getStringCellValue();\r\n\t\t\t\tfinal String zipCode = StringUtils.doubleToString(row.getCell(4).getNumericCellValue());\r\n\t\t\t\tfinal String telephoneNumber = row.getCell(5).getStringCellValue();\r\n\t\t\t\tfinal String website = row.getCell(6).getStringCellValue();\r\n\r\n\t\t\t\tfinal Restaurant restaurant = new Restaurant(name, address, city, state, zipCode, telephoneNumber,\r\n\t\t\t\t\t\twebsite);\r\n\r\n\t\t\t\trestaurants.add(restaurant);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn restaurants;\r\n\t}", "private void ReadFile (String filename)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner input = new Scanner(new FileReader(filename));\n\t\t\tScanner line = new Scanner(input.nextLine());\n\t\t\twhile (input.hasNextLine() || line.hasNext())\n\t\t\t{\n\t\t\t\tPolygon polygon = new Polygon ();\n\t\t\t\twhile (line.hasNextDouble())\n\t\t\t\t{\n\t\t\t\t\tdouble tmpX = line.nextDouble(),\n\t\t\t\t\t\t\ttmpY = line.nextDouble(),\n\t\t\t\t\t\t\ttmpZ = line.nextDouble();\n\t\t\t\t\tpolygon.add(new Vec4(tmpX, tmpY, tmpZ));\n\t\t\t\t}\n\t\t\t\tif (input.hasNextLine())\n\t\t\t\t{\n\t\t\t\t\tline = new Scanner(input.nextLine());\n\t\t\t\t}\n\t\t\t\tobject.add(polygon);\n\t\t\t}\n\t\t\tinput.close();\n\t\t\tline.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Schedule loadSchedules(File file) {\n\n return readWrite.loadSchedules(file, this);\n }", "public void readFromBookingListFile()\r\n {\r\n try(ObjectInputStream fromBookingListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/bookinglist.dta\")))\r\n {\r\n bookingList = (BookingList) fromBookingListFile.readObject();\r\n bookingList.setSavedStaticBookingRunNr(fromBookingListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av booking \"\r\n + \"objektene.\\nOppretter tomt bookingregister.\\n\" \r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public static Superuser load() throws IOException, ClassNotFoundException {\n\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(storeDir + File.separator + storeFile));\n\t\tSuperuser userList = (Superuser) ois.readObject();\n\t\tois.close();\n\t\treturn userList;\n\t\t\n\t}", "private static void readWineListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"wines.json\")) {\n\n\t\t\tJSONArray wineListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < wineListJSON.size(); i++) {\n\t\t\t\tJSONObject wine = (JSONObject) wineListJSON.get(i);\n\t\t\t\tString name = (String) wine.get(\"name\");\n\t\t\t\tint year = Integer.valueOf(wine.get(\"year\").toString());\n\t\t\t\tString description = (String) wine.get(\"description\");\n\t\t\t\tString vine = (String) wine.get(\"vine\");\n\t\t\t\tint quantity = Integer.valueOf(wine.get(\"quantity\").toString());\n\t\t\t\tdouble price = (double) wine.get(\"price\");\n\n\t\t\t\t// Add the JSON object to the wine list\n\t\t\t\tMain.wineList.add(new Wine(name, year, description, vine, quantity, price));\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public List<RegionServer> regionServers() {\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tList<RegionServer> list = new ArrayList<>();\n\t\ttry {\n\t\t\tURL url = new URL(HBase.HTTP + SystemConfig.getProperty(\"hive.cube.hbase.master\") + HBase.HBASE_REGION_SERVER_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject tmpBuf = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONObject object = (JSONObject) JSON.parseArray(tmpBuf.getString(\"beans\")).get(0);\n\t\t\tString[] liveRegionServers = object.getString(\"tag.liveRegionServers\").split(\";\");\n\t\t\tfor (String node : liveRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(true);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] deadRegionServers = object.getString(\"tag.deadRegionServers\").split(\";\");\n\t\t\tfor (String node : deadRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(false);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Filter[Region] HBase JMX has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public void loadUsersFromFile(String fileName) {\n\t\ttry {\n\t\t\tusers = UserRecordIO.readUserRecords(fileName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to read file \" + fileName);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic CopyOnWriteArrayList<User> importUserList() throws IOException, ClassNotFoundException, FileNotFoundException {\r\n\t\tObjectInputStream in;\r\n\t\tCopyOnWriteArrayList<User> tmpUserList = new CopyOnWriteArrayList<User>();\r\n\t\tin= new ObjectInputStream(\r\n\t\t\t\tnew BufferedInputStream(\r\n\t\t\t\t\t\tnew FileInputStream(\"userList.dat\")));\r\n\t\ttmpUserList= (CopyOnWriteArrayList<User>)in.readObject();\r\n\t\tin.close();\r\n\t\treturn tmpUserList;\r\n\t}", "public void fillList (File file) throws FileNotFoundException {\n\t\tif (!file.getName().endsWith(\".srt\")) {\n\t\t\tthrow new IllegalArgumentException(\"Only .srt files supported\");\n\t\t}\n\n\t\t//create file reader tied to the .srt file, used JUST to count the # of lines\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e; //let it propogate up\n\t\t}\n\n\t\tint numOfBlocks = countNumberOfStringBlocks();\n\t\t\n\t\t//don't directly copy into stringList, as there could be errors reading file.\n\t\t//don't want to overwrite current stringList until entire file is read succesfully.\n\t\tStringBlock[] stringListBuffer = new StringBlock[numOfBlocks];\t\t//instantiate the array of stringblocks to the size needed\n\t\t//end of file reached during countNumberOfStringBlocks();\n\t\t\n\t\treader.close();\n\t\t\n\t\tcurrentLineNum = 0;\n\t\t//return reader back to top of the file, to begin parsing/storing chunks\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\tStringBlock stringBlock;\n\t\tint index = 0;\n\t\t\n\t\t//read in stringblocks, and store them in order\n\t\ttry{\n\t\t\twhile ((stringBlock = parseNextStringBlock()) != null) {\n\t\t\t\tstringListBuffer[index] = stringBlock;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t//end of file reached successfully\n\t\t\t\n\t\t\tstringList = stringListBuffer;\n\t\t} catch (IllegalStateException e) {\n\t\t\tthrow e; //let it propogate all the way up to the method where the file is selected\n\t\t}\n\t\t\n\t\t//close reader\n\t\treader.close();\n\t}", "static Schedules load(String fileName) throws RBEConfigObjectException\n {\n\n try\n {\n FileReader fis = new FileReader(fileName);\n\t\t return new Schedules(fis);\n } catch (Exception ioe) {\n throw new RBEConfigObjectException(ioe.toString());\n }\n }", "public void importRoles(String filename) throws Exception {\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\twhile(true) {\r\n\t\t\tString line = br.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tbreak;\r\n\t\t\tString[] tokens = line.split(\",\");\r\n\t\t\tString roleName = tokens[0].trim();\r\n\t\t\tString rightName = tokens[1].trim();\r\n\t\t\t\r\n\t\t\tRole role = findRole(roleName);\r\n\t\t\tif (role == null) {\r\n\t\t\t\trole = new Role();\r\n\t\t\t\trole.setName(roleName);\r\n\t\t\t\tem.persist(role);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tRight right = Right.valueOf(rightName);\r\n\t\t\t\tSet<Right> rights = role.getRights();\r\n\t\t\t\tif (rights == null) {\r\n\t\t\t\t\trole.setRights(EnumSet.noneOf(Right.class));\r\n\t\t\t\t\trights = role.getRights();\r\n\t\t\t\t}\r\n\t\t\t\trights.add(right);\r\n\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t//no role for name;\r\n\t\t\t\tSystem.out.println(\"ERROR : no right for name: \" + rightName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tbr.close();\r\n\t\tfr.close();\r\n\t}", "public List<Task> load(){\n try {\n List<Task> tasks = getTasksFromFile();\n return tasks;\n }catch (FileNotFoundException e) {\n System.out.println(\"☹ OOPS!!! There is no file in the path: \"+e.getMessage());\n List<Task> tasks = new ArrayList();\n return tasks;\n }\n }", "public void loadTilemap(File fileToLoad) \n {\n File levelFile = fileToLoad;\n boolean roverPainted = false; //Used to check if rover is painted twice\n try\n {\n Scanner scanner = new Scanner(levelFile);\n //Strict capture, instead of hasNextLine()\n // to enforce level grid size\n //Collect data for each column in row, then go to next row\n // 0 = surface, 1 = rover, 2 = rock, 3 = mineral\n for(int y = 0; y < Level.MAX_ROWS; y++)\n {\n for(int x = 0; x < Level.MAX_COLUMNS; x++)\n {\n if(scanner.hasNext())\n {\n tilemap[x][y] = scanner.nextInt();\n \n //Check if this tile paint was a rover\n if(tilemap[x][y] == 1)\n {\n //If rover has already been painted\n if(roverPainted)\n {\n System.out.println(\"WARNING: Multiple rovers exist. \"\n + \"Please fix level file. \");\n }\n roverPainted = true; //Set roverPainted to true\n }\n }\n else\n {\n tilemap[x][y] = 0;\n }\n }\n }\n scanner.close();\n repaint();\n }\n catch (FileNotFoundException e) \n {\n System.out.println(\"Invalid Level File\");\n e.printStackTrace();\n }\n }", "private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}", "public void importStudents(String fileName) throws FileNotFoundException\n {\n Scanner inf = new Scanner(new File(fileName));\n while(inf.hasNextLine())\n {\n String first = inf.nextLine();\n String last = inf.nextLine();\n String password = inf.nextLine();\n String p1 = inf.nextLine();\n String p2 = inf.nextLine();\n String p3 = inf.nextLine();\n String p4 = inf.nextLine();\n String p5 = inf.nextLine();\n String p6 = inf.nextLine();\n String p7 = inf.nextLine();\n String p8 = inf.nextLine();\n \n students.add(new Student(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8, this));\n }\n }", "TraceList read(File file) throws IOException;", "public void createStudents(String fileContents) {\r\n\t\tplot = false;\r\n\t\tif (this.students != null) {\r\n\t\t\tstudents.clear();\r\n\t\t}\r\n\t\tdates.clear();\r\n\t\tattendancePos = 0;\r\n\t\tdataLoaded = 0;\r\n\t\tthis.students = new ArrayList<Student>();\r\n\t\tString[] studentString = fileContents.split(\"\\n\");\r\n\t\tfor (int i=0; i<studentString.length; i++) {\r\n\t\t\tString[] studentInfo = studentString[i].split(\",\");\r\n\t\t\tArrayList<Integer> attendance = new ArrayList<Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tStudent toAdd = new Student(studentInfo[0], studentInfo[1], studentInfo[2], studentInfo[3], studentInfo[4], studentInfo[5], attendance);\r\n\t\t\t\tstudents.add(toAdd);\r\n\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"File Format is incorrect\", \"Error\", 2);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "public void readFile(String file) throws FileNotFoundException {\n\t\tsc = new Scanner(new File(file));\n\t\tString firstLine = sc.nextLine();\n\t\tString [] breakFirstLine = firstLine.split(\" \");\n\t\tvillages = Integer.parseInt(breakFirstLine[0]);\n\t\tlines = Integer.parseInt(breakFirstLine[1]);\n\t\tSystem.out.println(\"villages: \" + villages + \"\\nlines: \" + lines);\n\t\tString line = \"\"; // current line\n\t\twhile(sc.hasNextLine()) { \n\t\t\tline = sc.nextLine();\n\t\t\tSystem.out.println(line);\n\t\t\tString[] breaks = line.split(\" \");\n\t\t\tString city1 = breaks[0];\n\t\t\tString city2 = breaks[1];\n\t\t\tString col = breaks[2];\n\t\t\tcolor = color(col);\n\t\t\tString route = breaks[3];\n\t\t\ttransit = transit(route);\n\t\t\tVillage a = new Village(city1);\n\t\t\tVillage b = new Village(city2);\n\t\t\t\n\t\t\tEdge e = new Edge(a, b, transit, color);\n\t\t\ta.addEdge(e);\n\t\t\tb.addEdge(e);\n\t\t\tg.addEdge(e);\n\t\t\t\n\t\t\tvertices.add(a);\n\t\t\tlast_transit = transit;\n\t\t\tlast_color = color;\n\t\t}\n\t}", "public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}", "public List<Task> load() throws DukeException {\n List<Task> tasks = new ArrayList<>();\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(filePath));\n\n String line;\n while ((line = reader.readLine()) != null) {\n String[] tokens = line.split(\"\\\\|\");\n\n Task task = StorageSerializer.deserialize(tokens);\n tasks.add(task);\n }\n\n reader.close();\n } catch (FileNotFoundException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } catch (IOException e) {\n throw new IoDukeException(\"Error closing file reader\");\n } catch (ParseException e) {\n throw new IoDukeException(\"Error parsing date in task file\");\n }\n\n return tasks;\n }", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "private ArrayList<String> readRouteList(String filename) {\n FileInputStream fstream = null;\n ArrayList<String> list = new ArrayList();\n try {\n fstream = new FileInputStream(filename);\n BufferedReader br = new BufferedReader(new InputStreamReader(new DataInputStream(fstream)));\n while (true) {\n String readLine = br.readLine();\n String s = readLine;\n if (!(readLine == null || s.length() == 0)) {\n list.add(s);\n }\n try {\n fstream.close();\n break;\n } catch (IOException e) {\n }\n }\n } catch (IOException e2) {\n } catch (Throwable th) {\n if (fstream != null) {\n try {\n fstream.close();\n } catch (IOException e3) {\n }\n }\n }\n return list;\n }" ]
[ "0.6210797", "0.6185997", "0.5982558", "0.5715593", "0.5586146", "0.5536495", "0.5536137", "0.5529208", "0.54800236", "0.54305345", "0.5427051", "0.5408401", "0.5374747", "0.534505", "0.5342199", "0.5326471", "0.53234357", "0.53188026", "0.52806574", "0.5277911", "0.52343094", "0.52180487", "0.5209363", "0.5203979", "0.5180155", "0.5142905", "0.5122119", "0.5119105", "0.50855273", "0.5085236", "0.50654453", "0.5056744", "0.5030721", "0.50192416", "0.50055933", "0.4990764", "0.4979385", "0.49611068", "0.49509522", "0.4950186", "0.49454978", "0.49399555", "0.49258423", "0.49228668", "0.49146894", "0.48953345", "0.48896554", "0.48799387", "0.48798937", "0.48790216", "0.48697615", "0.4867317", "0.48662278", "0.48596632", "0.48537424", "0.48321524", "0.48313478", "0.48291904", "0.48224473", "0.48178303", "0.48167437", "0.4813509", "0.48020542", "0.47952598", "0.4793859", "0.47927606", "0.4792175", "0.47919348", "0.47906727", "0.4790504", "0.47833773", "0.47816446", "0.4770595", "0.47582284", "0.47531676", "0.47434396", "0.4734672", "0.47283614", "0.47223014", "0.47204673", "0.47195134", "0.471892", "0.47172126", "0.4703343", "0.470182", "0.4698768", "0.46983033", "0.4696895", "0.4694288", "0.46939304", "0.46799168", "0.46791083", "0.46764246", "0.46755883", "0.46717674", "0.46677753", "0.4663284", "0.46575704", "0.4652136", "0.46510577" ]
0.7151371
0
/ saveRegionList: writes all fields of the RegionList into the Regions.txt file
public void saveRegionList(String fileName) { try { BufferedWriter out = new BufferedWriter(new FileWriter(fileName)); out.write(maxRegions+"\r\n"); out.write(numRegions+"\r\n"); for (int i = 0; i < numRegions; i++) { out.write(regionList[i].toFile()); } out.close(); } catch (IOException iox) { System.out.println("Error saving to " + fileName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveListToFile() {\n try {\n PrintStream out = new PrintStream(\n openFileOutput(LIST_FILENAME, MODE_PRIVATE)\n );\n\n for (int i = 0; i < listArr.size(); i++) {\n out.println(listArr.get(i));\n }\n\n out.close();\n\n } catch (IOException ioe) {\n Log.e(\"saveListToFile\", ioe.toString());\n }\n }", "public List<Reservation> saveToFile() {\n\t\treturn rList;\n\t}", "public void save(List<Task> list) throws IOException {\n FileWriter writer = new FileWriter(file);\n StringBuilder output = new StringBuilder();\n for (Task t : list) {\n output.append(formatTask(t));\n output.append(\"\\n\");\n }\n writer.write(output.toString());\n writer.close();\n }", "public void writeToHotelRoomListFile()\r\n {\r\n\ttry(ObjectOutputStream toHotelRoomListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/hotelroomlist.dta\")))\r\n\t{\r\n toHotelRoomListFile.writeObject(hotelRoomList);\r\n hotelRoomList.saveStaticPrice(toHotelRoomListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Hotelrom objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public void saveListToFile() {\r\n\t\ttry {\r\n\t\t\tObjectOutputStream oos = null;\r\n\t\t\ttry {\r\n\t\t\t\toos = new ObjectOutputStream(new FileOutputStream(FTP_LIST_FILE));\r\n\t\t\t\toos.writeObject(FTPList.self);\r\n\t\t\t\toos.flush();\r\n\t\t\t} finally {\r\n\t\t\t\toos.close();\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void saveList() throws Exception {\n JournalEntries.saveList(JournalList,ReconcileCur.ReconcileNum);\n }", "private void saveRegionsCitiesPositions(Bundle listPositions, Bundle addressSavedStateBundle) {\n listPositions.putInt(RestConstants.REGION, addressSavedStateBundle.getInt(RestConstants.REGION));\n listPositions.putInt(RestConstants.CITY, addressSavedStateBundle.getInt(RestConstants.CITY));\n listPositions.putInt(RestConstants.POSTCODE, addressSavedStateBundle.getInt(RestConstants.POSTCODE));\n }", "public void saveAllVehiclesToFile(ArrayList<DeliveryVehicle> vehicleList) throws java.io.IOException {\n\n // write object to file\n FileOutputStream fos = new FileOutputStream(_filePath); //object to hold a file, e.g. EmployeeData.txt\n PrintStream writer = new PrintStream(fos); //object to write data\n\n //For loop to read each employee and write them to the file\n for(DeliveryVehicle vehicle : vehicleList){\n writer.println(vehicle);\n }\n\n writer.close();//close the writer\n fos.close();//close the file\n\n }", "public void writeToEmployeeListFile()\r\n {\r\n\ttry(ObjectOutputStream toEmployeeListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/employeelist.dta\")))\r\n\t{\r\n toEmployeeListFile.writeObject(employeeList);\r\n employeeList.saveStaticEmpRunNr(toEmployeeListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Ansatt objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic void writeSerializedObject(List list) {\r\n\t\tFileOutputStream fos = null;\r\n\t\tObjectOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tfos = new FileOutputStream(System.getProperty(\"user.dir\") + \"\\\\Databases\\\\students.dat\");\r\n\t\t\tout = new ObjectOutputStream(fos);\r\n\t\t\tout.writeObject(list);\r\n\t\t\tout.close();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public static void saveBlockESPList(){\n try {\n \tCE_ForgeLoader.instance().log(\"Writting BlockESP block list configuration file...\");\n File file = new File( someDir, \"\" );\n BufferedWriter bufferedwritter = new BufferedWriter( new FileWriter( file ) );\n for( int i : BlockESP.espList ) {\n bufferedwritter.write( i + \"\\r\\n\" );\n }\n bufferedwritter.close( );\n\n } catch( Exception ex ) {\n \tCE_ForgeLoader.instance().log(\"Can't write BlockESP configuration file! Custom blocks for X-Ray will be disabled!\");\n \tCE_ForgeLoader.instance().log(\"Error in CE init: \" + ex.toString( ) );\n }\n }", "private void rewriteLocationList(List<Location> newLocationList) {\n Log.d(\"debugMode\", \"writing new contents\");\n for (Location location : newLocationList) {\n String line = \"\\n\" + location.returnFull();\n byte[] bytes = line.getBytes();\n\n FileOutputStream out;\n try {\n Log.d(\"debugMode\", location.returnFull());\n out = openFileOutput(\"Locations.txt\", MODE_APPEND);\n out.write(bytes);\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void saveBranches(ArrayList<Branch> branchList2) {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos = new FileOutputStream(BRANCH_FILEPATH);\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t\tint size = branchList2.size();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\toos.writeObject(branchList2.get(i));\r\n\t\t\t}\r\n\t\t\toos.close();\r\n\t\t}\r\n\t\tcatch (EOFException e) {\r\n\t\t\tSystem.out.println(\"End of file reached.\");\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n }\r\n\t}", "public void saveTaskList(TaskList taskList) throws ChandlerException {\n try {\n FileWriter fileWriter = new FileWriter(filePath);\n for (int i = 0; i < taskList.getSize(); i++) {\n Task currTask = taskList.getIndex(i);\n fileWriter.write(currTask.getSavingString());\n }\n fileWriter.close();\n } catch (IOException e) {\n throw new ChandlerException(ui.saveDataError());\n }\n }", "public void writeToBookingListFile()\r\n {\r\n\ttry(ObjectOutputStream toBookingListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/bookinglist.dta\")))\r\n\t{\r\n toBookingListFile.writeObject(bookingList);\r\n bookingList.saveStaticBookingRunNr(toBookingListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Booking objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "void writeRecordsToFile(List<IRecord> recordList) throws IOException;", "public void writeToConferenceRoomListFile()\r\n {\r\n\ttry(ObjectOutputStream toConferenceRoomListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/conferenceroomlist.dta\")))\r\n\t{\r\n toConferenceRoomListFile.writeObject(conferenceRoomList);\r\n conferenceRoomList.saveStaticPrice(toConferenceRoomListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Konferanserom objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}", "public void writeList() {\n try{\n PrintWriter out = new PrintWriter(new FileWriter(\"OutFile.txt\"));\n\n for (int i = 0; i < SIZE; i++) {\n // The get(int) method throws IndexOutOfBoundsException, which must be caught.\n out.println(\"Value at: \" + i + \" = \" + list.get(i));\n }\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "protected void saveToFile(final File regionsFile, final JsonObject json) throws IOException {\n LOGGER.fine(\"Storing ANSS Authoritative Regions to \" + regionsFile);\n // save regions if needed later\n FileUtils.writeFileThenMove(\n new File(regionsFile.toString() + \".temp\"),\n regionsFile,\n json.toString().getBytes());\n LOGGER.finer(\"Stored ANSS Regions to \" + regionsFile);\n }", "private void saveCarListings() {\r\n try {\r\n Writer writer = new Writer(new File(CARLISTINGS_FILE));\r\n writer.write(cars);\r\n writer.close();\r\n System.out.println(\"Car Listings saved to file \" + CARLISTINGS_FILE);\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to save Car Listings to \" + CARLISTINGS_FILE);\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void writeFile(List<Stock>listStock) throws IOException\n {\n \t //StockImplement implement=new StockImplement();\n \t \n \t mapper.defaultPrettyPrintingWriter().writeValue(file, listStock);\n \t// mapper.writeValue(file, listStock);\n\t\t\n \t \n }", "public static void ser(ArrayList<Task> taskList) {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"taskList.ser\"); // create a space for serializing the ArrayList object\n ObjectOutputStream out = new ObjectOutputStream(fileOut); // object for serializing the ArrayList object\n out.writeObject(taskList); // writing/serializing the ArrayList object (has all the user's task variables)\n out.close(); // closing the serializing object\n fileOut.close(); // closing the serialized file\n System.out.println(\"Tasks saved.\"); // printing that the save was successful\n } catch (IOException ioe) { \n System.err.println(\"Java IO Exception: \" + ioe);\n }\n }", "private void saveIds(ArrayList<String> idList) {\n\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream = context.openFileOutput(\n\t\t\t\t\tSAVE_FILE, Context.MODE_PRIVATE);\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(\n\t\t\t\t\tfileOutputStream);\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tgson.toJson(idList, outputStreamWriter); // Serialize to Json\n\t\t\toutputStreamWriter.flush();\n\t\t\toutputStreamWriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeToFile(String filename, List<String> list) {\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(filename); \n\t\t\tfor(String str: list) {\n\t\t\t writer.write(str.trim() + System.lineSeparator());\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}", "private static void mostrarRegiones (List<Regions> list)\n\t{\n\t\tIterator<Regions> it = list.iterator();\n\t\tRegions rg;\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\trg = it.next();\n\t\t\tSystem.out.println(rg.getRegionName() + \" \" +rg.getRegionId());\n\t\t\tSet<Countries> paises = rg.getCountrieses();\n\t\t\tSystem.out.println(\"PAISES\");\n\t\t\tIterator<Countries> it_paises = paises.iterator();\n\t\t\t\n\t\t\twhile (it_paises.hasNext())\n\t\t\t{\n\t\t\t\tCountries country = it_paises.next();\n\t\t\t\tSystem.out.println(country.getCountryName());\n\t\t\t}\n\t\t}\n\t}", "public void JSONWriter(List<State> stateList) {\n PrintWriter writer = null;\n\n try {\n ObjectMapper mapper = new ObjectMapper();\n String jsonStateList = mapper.writeValueAsString(stateList);\n writer = new PrintWriter(new FileWriter(\"stateList.json\"));\n writer.println(jsonStateList);\n } catch (IOException e) {\n System.err.println(\"IOException caught: \" + e.getMessage());\n } finally {\n if(writer != null) {\n writer.flush();\n writer.close();\n }\n }\n }", "public void save() {\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(\"studentData.dat\");\n\n\t\t\tObjectOutputStream oos;\n\t\t\ttry {\n\t\t\t\toos = new ObjectOutputStream(fos);\n\n\t\t\t\toos.writeObject(studentList);\n\t\t\t\toos.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\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}\n\t\tSystem.out.println(\"File is finished writing to the hard drive\");\n\t}", "public void writeData(ArrayList<Task> orderList) {\n try {\n FileWriter fw = new FileWriter(filePath, false);\n for (Task task : orderList) {\n fw.write(task.fileFormattedString() + \"\\n\");\n }\n fw.close();\n\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n }", "private void writeRowListToFile(List<String> rowList, String filePath) {\n try (BufferedWriter fileWriter = new BufferedWriter(new FileWriter(filePath))) {\n for (String row : rowList) {\n fileWriter.write(row);\n }\n } catch (IOException e) {\n LOGGER.error(e.getMessage());\n }\n }", "public void saveFile()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\t\n\t\tfor(CSVItem cItem : itemList)\n\t\t{\n\t\t\tsb.append(cItem.buildCSVString()).append(newLine);\n\t\t\t\n\t\t}\n\t\tString fileString = sb.toString();\n\t\t\n\t\t File newTextFile = new File(filePath);\n\n FileWriter fw;\n\t\ttry {\n\t\t\tfw = new FileWriter(newTextFile);\n\t\t\t fw.write(fileString);\n\t\t fw.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 \n\n\t}", "public void SerialiseList() throws IOException {\n ObjectOutputStream oStream = null;\n\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"Warehouses\" + \".dat\"));\n oStream.writeObject(Wlist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"Stores\" + \".dat\"));\n oStream.writeObject(Slist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"WarehouseAdminList\" + \".dat\"));\n oStream.writeObject(WAlist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"StoreAdminList\" + \".dat\"));\n oStream.writeObject(SAlist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n }", "public static void saveList(TaskList taskList) {\n try {\n FileWriter initialWriter = new FileWriter(\"duke.txt\");\n BufferedWriter myWriter = new BufferedWriter(initialWriter);\n for (int i = 0; i < taskList.size(); i++) {\n myWriter.write(taskList.getTask(i).typeChar() + \" \");\n myWriter.write(taskList.getTask(i).getStatusIcon() + \" \");\n if (taskList.getTask(i) instanceof Deadline || taskList.getTask(i) instanceof Events) {\n myWriter.write(taskList.getTask(i).getDesc() + \" \");\n myWriter.write(\"(\" + taskList.getTask(i).getBy() + \") \");\n } else {\n myWriter.write(taskList.getTask(i).getDesc() + \" \");\n }\n myWriter.newLine();\n }\n myWriter.close();\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "private void saveToStorage() {\n FileOutputStream fos = null;\n try {\n fos = context.openFileOutput(\"GeoFences\", Context.MODE_PRIVATE);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(currentList);\n oos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void save () {\r\n\t\tlog.debug(\"TunnelList:save()\");\r\n\t\tlog.info(\"Saving to file\");\r\n\t\tFileTunnel.saveTunnels(this);\r\n\t}", "public void saveFile(TaskList tasklist) {\n try {\n String cwd = System.getProperty(\"user.dir\");\n FileWriter fw = new FileWriter(cwd + filePath);\n for (Task task : tasklist.getTasks()) {\n String data = task.getData();\n fw.write(data + System.lineSeparator());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Something went wrong: \" + e.getMessage());\n }\n\n }", "public void saveToFile(String fileName, ArrayList<String> namesList, ArrayList<ArrayList<Double>> numList)\r\n {\r\n try\r\n {\r\n fileName = fileName + \"/\" + namesList.size() + \"Cities.txt\";\r\n FileWriter filePointer = new FileWriter(fileName, false); //false will replace what is there (append)\r\n PrintWriter output = new PrintWriter(filePointer);\r\n for(int i = 0; i < namesList.size(); i++)\r\n {\r\n String line = namesList.get(i) + \" \" \r\n + numList.get(i).get(0) + \" \" + numList.get(i).get(1) + \"\\n\";\r\n output.write(line);\r\n }\r\n output.close();\r\n }\r\n catch(IOException exp)\r\n {\r\n JOptionPane.showMessageDialog(null, \"Points not Saved\" \r\n + \"Save Error\" + JOptionPane.WARNING_MESSAGE);\r\n }\r\n }", "public void saveTaverns(ArrayList<Tavern> list){\n for (int i = 0; i < list.size(); i++){\n mapper.save(list.get(i));\n }\n }", "void saveLineItemList(List<LineItem> lineItemList);", "public void save() {\n RegionOwn.saveRegionOwner(this);\n }", "public static void viewSaveLandRegistryToBackUp() {\n\t\tboolean save_reg = getRegControl().saveToFile(getRegControl().listOfRegistrants(), REGISTRANTS_FILE);\r\n\t\tboolean save_prop = getRegControl().saveToFile(getRegControl().listOfAllProperties(), PROPERTIES_FILE);\r\n\t\t// check if one of them failed or not\r\n\t\tif (save_prop == false || save_reg == false) {\r\n\t\t\tSystem.out.println(\"Unable to save land registry.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Land Registry has been backed up to file.\");\r\n\t\t}\r\n\t}", "public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }", "protected void exportSynonymList(RepositoryItem synonymList, Locale locale) throws RepositoryException, SearchServerException {\n SolrZkClient client = getZkClient(locale);\n\n if (client != null) {\n if (isLoggingInfo()) {\n logInfo(\"Exporting synoymym list '\" + synonymList.getItemDisplayName() + \"' to ZooKeeper\");\n }\n \n \n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n PrintWriter out = new PrintWriter(byteStream);\n \n out.println(\"# This file has been auto-generated. Do not modify\");\n \n RepositoryView view = getSearchRepository().getView(SearchRepositoryItemDescriptor.SYNONYM);\n Object params[] = {new String(synonymList.getRepositoryId())};\n RepositoryItem[] synonymMappings = getSynonymRql().executeQuery(view, params);\n\n if (synonymMappings != null) {\n for (RepositoryItem synonym : synonymMappings) {\n out.println((String) synonym.getPropertyValue(SynonymProperty.MAPPING));\n }\n }\n \n out.close();\n\n String environment = \"preview\";\n\n if (getCatalogCollection().endsWith(\"Public\")) {\n environment = \"public\";\n }\n\n for (String config : Arrays.asList(getCatalogConfig(), getRulesConfig())) {\n byte[] data = byteStream.toByteArray();\n String path = new StringBuffer(\"/configs/\").append(config).append(\"/synonyms-\").append(environment).append(\"/\")\n .append(formatSynonymListFileName((String)synonymList.getPropertyValue(SynonymListProperty.FILENAME))).toString();\n\n try {\n if (!client.exists(path, true)) {\n client.makePath(path, data, CreateMode.PERSISTENT, true);\n } else {\n client.setData(path, data, true);\n }\n } catch (KeeperException ex) {\n throw create(EXPORT_SYNONYM_EXCEPTION, ex);\n } catch (InterruptedException ex) {\n throw create(EXPORT_SYNONYM_EXCEPTION, ex); \n }\n }\n }\n }", "public void saveAll(List list);", "public void writeToRestaurantFile()\r\n {\r\n\ttry(ObjectOutputStream toRestaurantFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/restaurant.dta\")))\r\n\t{\r\n toRestaurantFile.writeObject(restaurant);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Restaurant objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public WriteToFile(List<Person> peopleList){\r\n\r\n try {\r\n // write over existing file if exists or create new\r\n FileWriter myWriter = new FileWriter(\"sorted-names-list.txt\", false);\r\n for (Person person: peopleList){\r\n // Get person name in order to append to text file\r\n String wholeName = person.getFirstName() + \" \" + person.getLastName();\r\n System.out.println(wholeName);\r\n myWriter.write(wholeName);\r\n myWriter.write(\"\\n\");\r\n }\r\n myWriter.close();\r\n System.out.println(\"Successfully wrote to the file.\");\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }", "public static void savecars(){\n Cars xx = new Cars();\n System.out.println(\"save cars\");\n String outtext;\n try {\n File rentfile = new File(\"cars.csv\");\n FileWriter out = new FileWriter(rentfile);\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n String newline = System.getProperty(\"line.separator\");\n outtext = xx.getBrand()+ \";\"+ xx.getModel()+ \";\"+ xx.getReference()+ \";\"+ xx.getYear()+ newline;\n out.write(outtext);\n }\n out.close();\n System.out.println(\"cars data saved in cars.csv\");\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "public void writeFile(String file, SLList list) {\n\t\tObjectOutputStream o = null;\n\t\ttry {\n\t\t\to = new ObjectOutputStream(new FileOutputStream(file));\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\n\t\t/**\n\t\t * try/catch block to verify file has been written/created\n\t\t */\n\t\t\n\t\ttry {\n\t\t\to.writeObject(list);\n\t\t\tSystem.out.println(\"File Successfully Created!\");\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\ttry {\n\t\t\to.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}", "private static void saveStudentsList(List<Student> students, File file) throws IOException {\n saveStudentsList(students, new FileOutputStream(file));\n }", "public static void writeToFile(String fileName, ArrayList<String> linesList) throws IOException\n {\n PrintWriter printWriter = new PrintWriter(new FileWriter(fileName));\n for(String currentLine : linesList)\n {\n printWriter.println(currentLine);\n }\n printWriter.close();\n }", "public static void writeFile ( LinkedList contactsList ) {\n\t\ttry {\n PrintWriter writer = new PrintWriter ( \"contacts.txt\" );\n for ( int row = 0; row < contactsList.size ( ); row++ ) {\n \t// this is basically a toString right here, adapted to the original contacts.txt\n \tString line = contactsList.get ( row ).getFirst ( ) + \",\" + contactsList.get ( row ).getLast ( ) + \",\" + contactsList.get ( row ).getPhone ( ) \n \t\t\t+ \",\" + contactsList.get ( row ).getAddress ( ) + \",\" + contactsList.get ( row ).getCity ( ) + \",\" + contactsList.get ( row ).getZip ( );\n writer.println ( line );\n }\n writer.close();\n } catch ( FileNotFoundException fnf ) {\n System.out.println(\"File was not found.\");\n }\n\t}", "public void FileWrite(Nimsys nimSys,ArrayList<Player> list)throws IOException{\r\n\t\tOutputStream out = new FileOutputStream(\"players.dat\");\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile(aa.hasNext()){ //each line includes the information below related to the players\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tout.write(in.getUserName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getSurName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getGivenName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getGamePlay()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getWinGame()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getID()).getBytes());\r\n\t\t\tout.write('\\r');\r\n\t\t}\r\n\t}", "public void saveFile(String fileName)\n {\n try\n {\n Formatter file = new Formatter(fileName);\n for (Item item: myList)\n {\n file.format(item.getFirstName() +\"\\n\" + item.getLastName() +\"\\n\"+ item.getPhoneNumber()+\"\\n\"+ item.getEmail()+\"\\n\");\n }\n file.close();\n }\n\n catch (Exception ex)\n {\n System.out.println(\"Error saving...\");\n }\n\n System.out.println(\"\");\n }", "public void saveProgramToFile(ArrayList<String> programNameList, File file) throws IOException {\n\t\tsqlDb.saveProgramToFile(programNameList, file);\n\t}", "public static void writeToFile(java.util.List<String> list, String path) {\n\n // set file writer\n BufferedWriter out;\n try {\n // selected path\n File file = new File(path);\n out = new BufferedWriter(new FileWriter(file, true));\n for (Object s : list) {\n out.write((String) s);\n out.newLine();\n\n }\n out.close();\n } catch (IOException e) {\n // check errors and set show message dialog\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n JOptionPane.showMessageDialog(new JFrame(), errors.toString(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n\tpublic List<Region> getAllRegionsByIdList(List<String> idList) {\n\t\treturn null;\n\t}", "public void saveVehicles() throws IOException {\n //Overwrite data file\n FileWriter fw = new FileWriter(new File(VE_FILE), false);\n BufferedWriter bw = new BufferedWriter(fw);\n try {\n System.out.print(\"Vehicle is saving into data file vehicles.txt...\");\n\n //Writes number of Vehicle\n bw.write(String.valueOf(this.vehicles.size()));\n\n for (int i = 0; i < this.vehicles.size(); i++) {\n //Inits Vehicle's information\n int contractId = this.vehicles.get(i).getContractId();\n String type = this.vehicles.get(i).getType();\n String licensePlate = this.vehicles.get(i).getLicensePlate();\n String chassisId = this.vehicles.get(i).getChassisId();\n String enginesId = this.vehicles.get(i).getEnginesId();\n\n //Writes Vehicle's information into data file\n bw.newLine();\n bw.write(String.valueOf(contractId));\n bw.newLine();\n bw.write(type);\n bw.newLine();\n bw.write(licensePlate);\n bw.newLine();\n bw.write(chassisId);\n bw.newLine();\n bw.write(enginesId);\n\n }\n } finally {\n //Saves data file (from RAM into HDD)\n bw.close();\n System.out.println(\"Done!\");\n }\n }", "public void writeToServiceFile()\r\n {\r\n\ttry(ObjectOutputStream toServiceFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/servicelist.dta\")))\r\n\t{\r\n toServiceFile.writeObject(serviceList);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Service objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public void exportRegion(File folder) throws IOException\n {\n File blocks = new File(folder + \"/blocks.dat\");\n RandomAccessFile file = new RandomAccessFile(blocks, \"rw\");\n BlockPos size = this.range.getSize();\n\n this.range.write(file);\n\n for (int i = 0; i <= size.getX(); i++)\n {\n for (int j = 0; j <= size.getY(); j++)\n {\n for (int k = 0; k <= size.getZ(); k++)\n {\n this.saveBlock(file, i, j, k);\n }\n }\n }\n\n file.close();\n\n /* Save entities */\n this.saveTileEntities(folder);\n this.saveEntities(folder);\n }", "public void saveToQuestionBank(ArrayList<Question> list) {\n\n\t\tSAVE_FILE = QUESTION_BANK;\n\t\tsaveQuestions(list);\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}", "public static void writeFile(List<Task> database) {\r\n assert database != null: \"Storage.writeFile(): database cannot be null\";\r\n File dir = new File(\"./tmp/data\");\r\n try {\r\n FileWriter fw = new FileWriter(new File(dir, \"storage.txt\"));\r\n for (Task task : database) {\r\n assert task != null: \"Storage.writeFile(): task to be added cannot be null\";\r\n fw.write(task.serialize() + \"\\n\");\r\n }\r\n fw.close();\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "void saveSklepToFile(String fileName) throws Exception {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));\r\n\t\tout.writeObject(listOfAccounts);\r\n\t\tout.close();\r\n\t}", "private void writeToFile(List<Record> records) {\n try (\n FileWriter writer = new FileWriter(FILE_PATH);\n BufferedWriter bufferedWriter =\n new BufferedWriter(writer);\n PrintWriter out = new PrintWriter(bufferedWriter)\n\n ) {\n\n for (Record record : records) {\n out.format(\"%d;%s;%s;%s;%s;%s\\n\",\n record.getId(),\n record.getFirstName(),\n record.getLastName(),\n record.getPhone().getNumber(),\n record.getPhone().getType(),\n record.getCategory().getId());\n }\n// writer.close();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }", "public void sortRegions(List<Mdr13Record> list) {\n \t\tSort sort = getConfig().getSort();\n \t\tList<SortKey<Mdr13Record>> keys = new ArrayList<SortKey<Mdr13Record>>();\n \t\tfor (Mdr13Record reg : list) {\n \t\t\tSortKey<Mdr13Record> key = sort.createSortKey(reg, reg.getName(), reg.getMapIndex());\n \t\t\tkeys.add(key);\n \t\t}\n \n \t\tCollections.sort(keys);\n \n \t\tString lastName = \"\";\n \t\tint record = 0;\n \t\tMdr28Record mdr28 = null;\n \t\tfor (SortKey<Mdr13Record> key : keys) {\n \t\t\trecord++;\n \t\t\tMdr13Record reg = key.getObject();\n \n \t\t\t// If this is new name, then create a mdr28 record for it. This\n \t\t\t// will be further filled in when the other sections are prepared.\n \t\t\tString name = reg.getName();\n \t\t\tif (!name.equals(lastName)) {\n \t\t\t\tmdr28 = new Mdr28Record();\n \t\t\t\tmdr28.setName(name);\n \t\t\t\tmdr28.setStrOffset(reg.getStrOffset());\n \t\t\t\tmdr28.setMdr14(reg.getMdr14());\n \t\t\t\tmdr28.setMdr23(record);\n\t\t\t\tlastName = name;\n \t\t\t}\n \n \t\t\tassert mdr28 != null;\n \t\t\treg.setMdr28(mdr28);\n \n\t\t\tregions.add(reg);\n \t\t}\n \t}", "public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }", "public static void save() {\r\n\t\ttry {\r\n\t\t\tFile csv = new File(\"src/transaction.csv\");\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(csv, false));\r\n\t\t\tbw.write(\"type,account number,amount,year,month,date,cleared\");\r\n\t\t\tbw.newLine();\r\n\t\t\tfor (int i = 0; i < transList.size(); i++) {\r\n\t\t\t\tbw.write(transList.get(i).toFile());\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }", "public void loadRegionList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxRegions = Integer.parseInt(in.readLine()); \n regionList = new Region[maxRegions];\n int numRegionsInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numRegionsInFile; i++) {\n String type = in.readLine();\n /* createAmazonRainforest, createArctic, and createAquarium are void static\n methods which takes in the BufferedReader and initializes all Region objects \n in the RegionList array using the Regions.txt file\n */\n if (type.equals(\"Amazon Rainforest\")) {\n createAmazonRainforest(in); \n } else if (type.equals(\"Arctic\")) {\n createArctic(in);\n } else if (type.equals(\"Aquarium\")) {\n createAquarium(in);\n }\n \n if (i == 2) {\n regionList[i].toString(); //temp \n }\n }\n \n \n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "public void saveToReadID(ArrayList<String> idList) {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tsaveIds(idList);\n\t}", "private void saveTasks() {\n try {\n Writer writer = new Writer(new File(TASKS_FILE));\n for (Task t1: todoList.getListOfTasks()) {\n writer.write(t1);\n }\n writer.close();\n System.out.println(\"Tasks saved to file \" + TASKS_FILE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to save tasks to \" + TASKS_FILE);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "public void saveTasks() {\n try {\n BufferedWriter taskWriter = new BufferedWriter(new FileWriter(path));\n String tasks = \"\";\n for (Task task : TaskList.getTaskLists()) {\n tasks += task.toSaveString() + \"\\n\";\n }\n taskWriter.write(tasks);\n taskWriter.close();\n } catch (IOException e) {\n System.out.println(\"Sorry Boss, \" + e.getMessage());\n }\n }", "@SuppressWarnings({ \"unchecked\" })\n\tpublic static void writeMerchants(ArrayList<Merchant> list) {\n\t\tJSONArray array = new JSONArray();\n\t\tJSONObject jsonM;\n\t\tfor (Merchant m : list) {\n\t\t\tjsonM = new JSONObject();\n\t\t\tjsonM.put(\"name\", m.getName());\n\t\t\tjsonM.put(\"apiKey\", m.getApiKey());\n\t\t\tjsonM.put(\"description\", m.getDescription());\n\t\t\tjsonM.put(\"realm\", m.getRealm());\n\t\t\tarray.add(jsonM);\n\t\t}\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\tal.add(array.toJSONString());\n\t\ttry {\n\t\t\tFiles.write(new File(Call.class.getResource(MERCHANT_FILE).getPath()).toPath(), al,\n\t\t\t\t\tCharset.forName(\"UTF-8\"));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void serialize(String s, LinkedList<Map> maplist){\n\n\t\ttry {\n\t\t\tFileOutputStream fileOut = new FileOutputStream(s + \".ser\");\n\t\t\tObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t\t\tout.writeObject(maplist);\n\t\t\tout.close();\n\t\t\tfileOut.close();\n\t\t\tSystem.out.println(\"Serialized data is saved in \" + s + \".ser\");\n\t\t} catch(IOException i){\n\t\t\ti.printStackTrace();\n\t\t}\n\t}", "public void updateRecords(ArrayList regions, ArrayList prioritySites){\n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\" \");\n\t\t\t\t\tSystem.out.println(\"Date is December 30th // Starting System\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t// For loop to get current region\n\t\t\t\t\tfor (int f = 0; f < regions.size(); f++) {\n\t\t\t\t\t\tRegion current_region = (Region) regions.get(f);\n\t\t\t\t\t\t// for loop that gets each site and prints it\n\t\t\t\t\t\t// If the site is rated bronze it is added to the priority\n\t\t\t\t\t\t// arrayList\n\t\t\t\t\t\tfor (int i = 0; i < current_region.get_size(); i++) {\n\t\t\t\t\t\t\tSite current_site = current_region.get_site(i);\n\n\t\t\t\t\t\t\tcurrent_site.getLatestVisitorCount();\n\t\t\t\t\t\t\tSystem.out.println(\"Updated Record: \" + current_site);\n\n\t\t\t\t\t\t\tString siteRating = current_site.getSite_rating();\n\n\t\t\t\t\t\t\tif (siteRating == \"Bronze\") {\n\t\t\t\t\t\t\t\tprioritySites.add(current_site);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Lists the Priority Sites\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tSystem.out.println(\"Priority Sites\");\n\n\t\t\t\t\tfor (int i = 0; i < prioritySites.size(); i++) {\n\t\t\t\t\t\tSystem.out.println(prioritySites.get(i));\n\t\t\t\t\t}\n\n\t\t\t\t}", "public static void save()\n {\n try {\n \n \n PrintWriter fich = null;\n \n fich = new PrintWriter(new BufferedWriter(new FileWriter(\"bd.pl\", true)));\n\t\t\t//true c'est elle qui permet d'écrire à la suite des donnée enregistrer et non de les remplacé \n \n for(String auto : GestionController.listApp)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listDetFact)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listFact)\n {\n \n fich.println(auto);\n }\n fich.println();\n for(String auto : GestionController.listType)\n {\n \n fich.println(auto);\n }\n fich.println();\n fich.close();\n } catch (Exception e1) {\n printStrace(e1);\n\t\t}\n }", "public static void saveOutput(String filename, DSALinkedList list)\n {\n try\n {\n PrintWriter out = new PrintWriter(filename);\n //out.println(input);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(baos);\n PrintStream old = System.out;\n System.setOut(ps);\n //stuff goes here\n\n if(!list.isEmpty())\n {\n System.out.println(\"# All routes Traversed:\");\n Iterator<DSAQueue> itr = list.iterator();\n int counter = 0;\n while(itr.hasNext())\n {\n counter ++;\n System.out.println(\"\\n# Route number: [\" + counter + \"]\");\n itr.next().show();\n }\n }\n else\n {\n System.out.println(\"# Route list is empty. Add some more!\");\n }\n System.out.flush();\n System.setOut(old);\n out.println(baos.toString());\n\n out.close();\n }\n catch (Exception e)\n { //should do more here might not be needed\n throw new IllegalArgumentException(\"Unable to print object to file: \" + e);\n }\n\n }", "public void saveAllLists() {\n // else: create \"ToDoList\" folder\n // Get all lists and their corresponding items via a while loop that loops\n // through the ComboBox's values and creates .txt files for each list\n // Create a new .txt of name list\n // This will need some sort of nested loop, the outer looping through the lists\n // and the inner looping through the items of that list\n // Store inside of the current .txt\n // Close the .txt\n }", "public static void save(){\n\t\tif(GUIReferences.currentFile != null) {\n\t\t\txml.XMLSaver.saveSensorList(GUIReferences.currentFile);\n\t\t\tGUIReferences.saveMenuItem.setEnabled(false);\n\t\t} else {\n\t\t\tsaveAs();\n\t\t}\n\t}", "public static void saveItems(ArrayList<Item> items,String filename)\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(filename)));\r\n\t\t\toos.writeObject(items);\r\n\t\t\toos.flush();\r\n\t\t\toos.close();\r\n\t\t\tSystem.out.println(\"Saved items to disk: \" + filename);\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"Could not save backup: \" + e.getMessage());\r\n\t\t}\r\n\t}", "private void saveQuestions(ArrayList<Question> list) {\n\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream = context.openFileOutput(\n\t\t\t\t\tSAVE_FILE, Context.MODE_PRIVATE);\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(\n\t\t\t\t\tfileOutputStream);\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\n\t\t\t// Gson does not serialize/deserialize dates with milisecond\n\t\t\t// precision unless specified\n\t\t\tGson gson = builder.setDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\")\n\t\t\t\t\t.create();\n\t\t\tbuilder.serializeNulls(); // Show fields with null values\n\t\t\tgson.toJson(list, outputStreamWriter); // Serialize to Json\n\t\t\toutputStreamWriter.flush();\n\t\t\toutputStreamWriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveReadID(ArrayList<String> idList) {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tsaveIds(idList);\n\t}", "private void chatSave() {\n try{\n //create a text file to write the chatList to\n PrintStream print =\n new PrintStream(new FileOutputStream(\"log.txt\", true));\n //write each line of the array to the file \n for (String str:chatList)\n print.println(str);\n //once each record has been written to the file, close it.\n print.close();\n } catch (IOException e) {\n // exception handling\n }\n }", "public void exportLocations(List<MyLocation> locationList) {\n\n StringBuilder data = new StringBuilder();\n // Adding File Header\n data.append(\"ID,Latitude,Longitude,Provider,startTime,endTime,accuracy,adminArea,countryCode,featureName,Locality,subAdminArea,addressLine,Interactions\");\n\n // Adding Data\n for(MyLocation location : locationList) {\n data.append(\"\\n\"\n +location.getId()+\",\"\n +location.getLatitude()+\",\"\n +location.getLongitude()+\",\"\n +location.getProvider()+\",\"\n +location.getStartTime()+\",\"\n +location.getEndTime()+\",\"\n +location.getAccuracy()+\",\"\n +location.getAdminArea()+\",\"\n +location.getCountryCode()+\",\"\n +location.getFeatureName()+\",\"\n +location.getLocality()+\",\"\n +location.getSubAdminArea()+\",\"\n +location.getAddressLine()+\",\"\n +location.getNumOfInteractions());\n }\n\n try{\n // Saving file onto device\n FileOutputStream out = context.openFileOutput(\"locations_export.csv\", Context.MODE_PRIVATE);\n out.write((data.toString()).getBytes());\n out.close();\n\n // Exporting\n File fileLocation = new File(context.getFilesDir(), \"locations_export.csv\");\n Uri path = FileProvider.getUriForFile(context, \"com.kdkvit.wherewasi.provider\", fileLocation);\n Intent fileIntent = new Intent(Intent.ACTION_SEND);\n fileIntent.setType(\"text/csv\");\n fileIntent.putExtra(Intent.EXTRA_SUBJECT, \"Data\");\n fileIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n fileIntent.putExtra(Intent.EXTRA_STREAM, path);\n context.startActivity(Intent.createChooser(fileIntent, \"Export CSV\"));\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected\tvoid\tonSaveInstanceState\t(Bundle\toutState){\n Log.e(TAG, \"++ SAVING!!! ++\");\n\n //grab all the contents of each destination\n double[] listOfDestLong = new double[orderedDestinations.size()];\n double[] listOfDestLat = new double[orderedDestinations.size()];\n ArrayList<String> listOfDestNames = new ArrayList<String>();\n ArrayList<String> listOfDestAddr = new ArrayList<String>();\n for(int i=0; i<orderedDestinations.size(); i++){\n listOfDestNames.add(i,orderedDestinations.get(i).name);\n listOfDestLong[i] = orderedDestinations.get(i).longitude;\n listOfDestLat[i] = orderedDestinations.get(i).latitude;\n listOfDestAddr.add(orderedDestinations.get(i).address);\n }\n\n //Store the contents of each destination in the saved bundled\n outState.putStringArrayList(\"dName\", listOfDestNames);\n outState.putDoubleArray(\"dLong\", listOfDestLong);\n outState.putDoubleArray(\"dLat\", listOfDestLat);\n outState.putStringArrayList(\"dAddr\", listOfDestAddr);\n outState.putString(\"poly\", polylineEncodedString);\n super.onSaveInstanceState(outState);\n }", "public void saveRegion(File dir) {\n\t\tif(this.nbt.getSize() > 0) {\n\t\t\tFile file = new File(dir, this.getID() + \".dat\");\n\t\t\tthis.cache.getLocalStorageHandler().getSaveHandler().queueRegion(file, this.nbt.copy());\n\t\t} else {\n\t\t\tthis.deleteRegionFile(dir);\n\t\t}\n\t\tthis.dirty = false;\n\t}", "public void saveMap() {\n this.scanMap();\n String userHome = System.getProperty(\"user.home\");\n BinaryExporter export = BinaryExporter.getInstance();\n File file = new File(userHome + \"world.j3o\");\n try {\n export.save(this.testNode, file); \n } catch (IOException ex) {\n Logger.getLogger(mapDevAppState_2.class.getName()).log(Level.SEVERE, \"File write error\");\n }\n }", "public void writeToJsonFile(List<Page> pageList, String path) throws IOException {\n\t\tGson g = new Gson();\n\t\tWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"UTF-8\"));\n\t\tfor (Iterator<Page> iterator = pageList.iterator(); iterator.hasNext();) {\n\t\t\tout.write(g.toJson(iterator.next()) + \"\\n\");\n\t\t}\n\t\tout.close();\n\t}", "public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "public void save(List<T> data) {\n\t\ttry {\n\t\t\tFile file = new File(getFileLocation());\n\t\t\tif (!file.getParentFile().exists()) {\n\t\t\t\tfile.getParentFile().mkdirs();\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(getFileLocation());\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\tbw.write(gson.toJson(data));\n\t\t\tbw.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveWords (ArrayList <String> list) {\n if (chooser.showSaveDialog (null) == JFileChooser.APPROVE_OPTION) {\n File newFile = chooser.getSelectedFile ();\n try {\n BufferedWriter buffer = new BufferedWriter (new FileWriter (newFile));\n for (String word : list) {\n buffer.write (word + \"\\n\");\n }\n buffer.close ();\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "@Override\n\tpublic void saveBlocks() {\n\t\tint saved = 0;\n\t\ttry {\n\t\t\tsaved = ZoneVolumeMapper.saveZoneBlocksAndEntities(this, this.zone.getName());\n\t\t} catch (SQLException ex) {\n\t\t\tWar.war.log(\"Failed to save warzone \" + zone.getName() + \": \" + ex.getMessage(), Level.WARNING);\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tWar.war.log(\"Saved \" + saved + \" blocks in warzone \" + this.zone.getName() + \".\", java.util.logging.Level.INFO);\n\t\tthis.isSaved = true;\n\t}", "private void saveItems() {\n PrintWriter writer = null;\n try {\n FileOutputStream fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(\n fos)));\n\n for (int idx = 0; idx < mAdapter.getItemCount(); idx++) {\n\n writer.println(mAdapter.getItem(idx));\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (null != writer) {\n writer.close();\n }\n }\n }", "public void saveToFile(String filePath) throws IOException {\n\t\tOutputStream file = new FileOutputStream(filePath);\n\t\tOutputStream buffer = new BufferedOutputStream(file);\n\t\tObjectOutput output = new ObjectOutputStream(buffer);\n\n\t\toutput.writeObject(tagList);\n\t\toutput.close();\n\t}", "public void saveGroups() {\n String listOfCodes = \"\";\n for (Pair<String, Group> groupPair : savedGroups) {\n listOfCodes += \",\" + groupPair.first + \"|\" + groupPair.second.getCode();\n }\n prefs.setString(\"listOfCode\", listOfCodes);\n }", "public static void save()\n\t{\n writeMap();\n\t}", "public void finalSave(HashMap<UUID, UUID> list) {\n\t\tList<String> strings = new ArrayList<String>();\n\t\tfor (UUID uuid : list.keySet()) {\n\t\t\tif (!(Bukkit.getServer().getEntity(uuid) == null)) {\n\t\t\t\tstrings.add(uuid.toString());\n\t\t\t\tBukkit.getServer().getConsoleSender().sendMessage(ChatColor.DARK_RED + \"Radius of \" + strings.get(strings.size()-1) + \": \" + ChatColor.WHITE + list.get(uuid));\n\t\t\t}else {\n\t\t\t\tBukkit.getServer().getConsoleSender().sendMessage(\"Entity not found! Removed!\");\n\t\t\t}\n\t\t}\n\n\t\t// Get list from file and duplicate to ensure I don't remove current item by accident\n\t\tList<String> oldStrings = new ArrayList<String>(storagecfg.getStringList(\"Rope.Parent.IDs\"));\n\n\t\t// Update initial list with the updated list of uuids that actually exist\n\t\tstoragecfg.set(\"Rope.Parent.IDs\", new ArrayList<String>(strings));\n\n\t\t// Ensure that whatever is on the file actually exists on the server. Remove if it isn't.\n\t\tfor (String string : oldStrings) {\n\t\t\tif (!strings.contains(string)) {\n\t\t\t\tstoragecfg.set(\"Rope.\" + string, null);\n\t\t\t}else {\n\t\t\t\tstrings.remove(string);\n\t\t\t}\n\t\t}\n\n\t\tfor (String string : strings) {\n\t\t\tif(!oldStrings.contains(string)) {\n\t\t\t\tstoragecfg.set(\"Rope.\" + string + \".child\", list.get(UUID.fromString(string)).toString());\n\t\t\t}\n\t\t}\n\t\tsavecfg();\n\t}", "public static void setRegion(Long adminId, List<String> ec2RegionList) {\n\n Connection con = null;\n try {\n con = DBUtils.getConn();\n //delete region\n PreparedStatement stmt = con.prepareStatement(\"delete from ec2_region where admin_id=?\");\n stmt.setLong(1, adminId);\n stmt.execute();\n\n //insert new region\n for (String ec2Region : ec2RegionList) {\n stmt = con.prepareStatement(\"insert into ec2_region (admin_id, region) values (?,?)\");\n stmt.setLong(1, adminId);\n stmt.setString(2, ec2Region);\n stmt.execute();\n DBUtils.closeStmt(stmt);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n DBUtils.closeConn(con);\n\n\n }" ]
[ "0.63588315", "0.6356632", "0.6345334", "0.6282051", "0.6275534", "0.6232347", "0.62152815", "0.6187596", "0.61727047", "0.6156661", "0.6069121", "0.60464394", "0.60246545", "0.59965676", "0.59956604", "0.59950006", "0.59623295", "0.5946943", "0.5881612", "0.5880881", "0.58798385", "0.5845276", "0.57762796", "0.57739675", "0.5773906", "0.57521784", "0.57414454", "0.5717848", "0.57032794", "0.5694244", "0.56884086", "0.5676016", "0.5673225", "0.5673113", "0.5670741", "0.5660544", "0.56568253", "0.5645315", "0.5637656", "0.56362736", "0.56275207", "0.559301", "0.5586208", "0.55846536", "0.5571903", "0.55594975", "0.55550474", "0.55483353", "0.55473936", "0.5541472", "0.5534724", "0.5530915", "0.55272985", "0.5511882", "0.5499111", "0.5491934", "0.5489052", "0.54854184", "0.54744744", "0.5468534", "0.544513", "0.54402864", "0.5434891", "0.54085976", "0.539343", "0.53656536", "0.5365111", "0.5364471", "0.5342515", "0.533667", "0.5329157", "0.53284276", "0.5321892", "0.5286816", "0.52804136", "0.5271885", "0.5261458", "0.5255698", "0.5233885", "0.5219222", "0.52163184", "0.52153236", "0.5214938", "0.52143306", "0.52109736", "0.5210388", "0.5199289", "0.5181695", "0.51668096", "0.5166683", "0.5158508", "0.51525855", "0.5145659", "0.5144799", "0.51413476", "0.51393527", "0.5135733", "0.51243764", "0.5118131", "0.5116222" ]
0.7796822
0
/ loadStaffList: takes the name of the file as a parameter (String) and reads the file; creating a list of initialized Staff objects.
public void loadStaffList(String fileName) { try { BufferedReader in = new BufferedReader(new FileReader(fileName)); maxStaff = Integer.parseInt(in.readLine()); staffList = new Staff[maxStaff]; int numStaffInFile = Integer.parseInt(in.readLine()); for (int i = 0; i < numStaffInFile; i++){ String staffType = in.readLine(); if (staffType.equals("Labourer")) { staffList[i] = new Labourer(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine())); numStaff++; } else if (staffType.equals("Manager")) /*;*/ { staffList[i] = new Manager(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine())); numStaff++; } } } catch (IOException iox) { System.out.println("Error reading " + fileName); } catch (NumberFormatException ex) { System.out.println("Problem with file formatting. Please check the file and try again."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<Student> loadStudentList(File file) throws IOException {\n return loadStudentList(new FileInputStream(file));\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static ArrayList<Tweet> load(String fname) {\n\t\tArrayList<Tweet> tweets = new ArrayList<Tweet>();\n\t\n\t\ttry {\n\t\t FileInputStream fin = new FileInputStream(fname);\n\t\t ObjectInputStream ois = new ObjectInputStream(fin);\n\t\t tweets = (ArrayList<Tweet>) (ois.readObject());\n\t\t ois.close();\n\t\t} catch (FileNotFoundException ex) {\n\t\t ex.printStackTrace();\n\t\t} catch (IOException ioex) {\n\t\t ioex.printStackTrace();\n\t\t}\n\t\tcatch (ClassNotFoundException classex) {\n\t\t classex.printStackTrace();\n\t\t}\n\t\treturn tweets;\n }", "public void readFromEmployeeListFile()\r\n {\r\n try(ObjectInputStream fromEmployeeListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/employeelist.dta\")))\r\n {\r\n employeeList = (EmployeeList) fromEmployeeListFile.readObject();\r\n employeeList.setSavedStaticEmpRunNR(fromEmployeeListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av ansatt \"\r\n + \"objektene.\\nOppretter tomt ansattregister.\\n\"\r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n employeeList = new EmployeeList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt ansattregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public void readStaffEntry()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner reader = new Scanner(new FileReader(\"StaffEntryRecords.txt\"));\r\n\t\t\twhile (reader.hasNext())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(reader.nextLine());\r\n\t\t\t}\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"FileNotFoundException\");\r\n\t\t}\r\n\t}", "public static ArrayList<Student> loadListOfStudents(String fileName) {\n ArrayList<Student> students = new ArrayList<>();\r\n String str = TextReader.StringFromFile(fileName);//Uses the method that returns a complete string with newlines for each studentline.\r\n if (validateInput(str)) {//Uses the validation method to check that the input is valid.\r\n String[] lines = str.split(\"\\n\");\r\n String[] lineParameters;\r\n int countFor = 0;\r\n for (String line : lines) {\r\n if(countFor > 1){\r\n lineParameters = line.split(\",\");\r\n Vote vote = new Vote(new Subject(lineParameters[1]), new Subject(lineParameters[2]), new Subject(lineParameters[3]), new Subject(lineParameters[4]));\r\n Student newStudent = new Student(lineParameters[0], vote);\r\n students.add(newStudent);\r\n }\r\n countFor++;\r\n }\r\n }\r\n\r\n return students;\r\n }", "public static List<String> loadListFromFile(File file) throws InstantiationException, IllegalAccessException {\n\t\n\tList<String> list = new ArrayList<String>();\n\t\n\tif (file.exists()) {\n\t try {\n\t\tScanner s = new Scanner(file);\n\t\twhile (s.hasNext())\n\t\t list.add(s.next());\n\t } catch (FileNotFoundException ex) {\n\t\t// This should never be thrown because we have an if to check it...\n\t }\n\t \n\t}\n\t\n\treturn list;\n\t\n }", "private static void readUserListFromFile() {\n\t\tJSONParser parser = new JSONParser();\n\n\t\ttry (Reader reader = new FileReader(\"users.json\")) {\n\n\t\t\tJSONArray userListJSON = (JSONArray) parser.parse(reader);\n\n\t\t\tfor (int i = 0 ; i < userListJSON.size(); i++) {\n\t\t\t\tJSONObject user = (JSONObject) userListJSON.get(i);\n\t\t\t\tString name = (String) user.get(\"name\");\n\t\t\t\tString surname = (String) user.get(\"surname\");\n\t\t\t\tString username = (String) user.get(\"username\");\n\t\t\t\tString password = (String) user.get(\"password\");\n\t\t\t\tString account = (String) user.get(\"account\");\n\n\t\t\t\tif(account.equals(\"employee\")) {\n\t\t\t\t\tMain.userList.add(new Employee(username, name, surname, password));\n\t\t\t\t} else {\n\t\t\t\t\tMain.userList.add(new Customer(username, name, surname, password));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic CopyOnWriteArrayList<User> importUserList() throws IOException, ClassNotFoundException, FileNotFoundException {\r\n\t\tObjectInputStream in;\r\n\t\tCopyOnWriteArrayList<User> tmpUserList = new CopyOnWriteArrayList<User>();\r\n\t\tin= new ObjectInputStream(\r\n\t\t\t\tnew BufferedInputStream(\r\n\t\t\t\t\t\tnew FileInputStream(\"userList.dat\")));\r\n\t\ttmpUserList= (CopyOnWriteArrayList<User>)in.readObject();\r\n\t\tin.close();\r\n\t\treturn tmpUserList;\r\n\t}", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "public static ArrayList<Student> read(String filename){\n\t\t\n\t\tArrayList<Student> students = new ArrayList<>();\n\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.contains(\" \")){\n\t\t\t\t\tstudents.add(new Student(getGpaFromLine(line), getSatFromLine(line)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn students;\n\t}", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "@Override\n\tpublic List<StaffDTO> getStaffList(int store_id) throws Exception {\n\t\treturn dao.listAll(store_id);\n\t}", "private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }", "public List<Staff> findAllStaffMembers(){\n\t\treturn staffRepository.findAll();\n\t}", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "public void loadList () {\r\n ArrayList<String> list = fileManager.loadWordList();\r\n if (list != null) {\r\n for (String s : list) {\r\n addWord(s);\r\n }\r\n }\r\n }", "public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}", "public List<String> loadFromFile(String fileName) {\n String line;\n List<String> listValuesFieldsEmployees = new ArrayList<>();\n\n try (FileReader fileReader = new FileReader(fileName);\n BufferedReader reader = new BufferedReader(fileReader)) {\n while ((line = reader.readLine()) != null) {\n listValuesFieldsEmployees.add(line);\n }\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return listValuesFieldsEmployees;\n }", "public SLList readFile(String file) {\n\t\t// Read it back in\n\t\tObjectInputStream i = null;\n\t\tSLList temp = null;\n\n\t\ttry {\n\t\t\ti = new ObjectInputStream(new FileInputStream(file));\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\n\t\t/**\n\t\t * try/catch to verify file has been restored\n\t\t */\n\t\t\n\t\ttry {\n\t\t\ttemp = (SLList) i.readObject();\n\t\t\t//System.out.println(temp);\n\t\t\tSystem.out.println(\"Successfully restored data from file!\");\n\t\t} catch (ClassNotFoundException 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\ttry {\n\t\t\ti.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\treturn temp;\n\t}", "public void loadDataFromFile(String name) throws FileNotFoundException {\n\t\tFileReader reader = new FileReader(name);\n\t\tScanner in = new Scanner(reader);\n\t\twhile(in.hasNextLine()) {\n\t\t\tString readName = \"\";\n\t\t\tString readScore = \"\";\n\t\t\tint intScore = 0;\n\t\t\treadName = in.nextLine();\n\t\t\treadScore = in.nextLine();\n\t\t\ttry {\n\t\t\tintScore = Integer.parseInt(readScore);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tSystem.out.println(\"Incorrect format for \" + readName + \" not a valid score: \" + readScore);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstudents.add(new Student(readName,intScore));\n\t\t}\n\t}", "public List<Student> importStudent(String filename) throws FileNotFoundException {\n List<Student> students = new ArrayList<>();\n FileReader fileReader = new FileReader(DATA_PATH + filename);\n Scanner scanner = new Scanner(fileReader);\n //skip first line\n String firstLine = scanner.nextLine();\n Log.i(\"first line: \" + firstLine);\n\n while (scanner.hasNextLine()) {\n String[] s = scanner.nextLine().split(\",\");\n String fullName = s[0];\n int yearLevel = Integer.parseInt(s[1]);\n Student student = new Student(fullName, yearLevel);\n students.add(student);\n }\n\n scanner.close();\n return students;\n }", "public static synchronized void loadFriendsList() {\r\n\t\t\t\r\n\t\t\t// TODO Controllare che esista il file CONTACTS.xml\r\n\t\t\t// TODO Se esiste, caricare i contatti dal file altrimenti richiedere al sip\r\n\t\t\tArrayList<Contact> contactList = ContactListManager.getContactList(); \r\n\t\t\t\r\n\t\t\tFriendsList fl = new FriendsList(); \r\n\t\t\t\r\n\t\t\tfor(Contact contact : contactList) {\r\n\t\t\t\tfl.addFriend(contact.getFriend()); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsetFriendsList(fl); \r\n\t\t}", "public static Staff readFromXml() throws JAXBException {\n JAXBContext jaxbContext = JAXBContext.newInstance(Staff.class);\n Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();\n return (Staff)jaxbUnmarshaller.unmarshal(new File(\"test.xml\"));\n }", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "private ObservableList<Saucer> loadSaucers(){\r\n try {\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileInputStream fis = new FileInputStream(file);\r\n ObjectInputStream input = new ObjectInputStream(fis);\r\n List<Saucer> list = (List<Saucer>) input.readObject();\r\n ObservableList<Saucer> saucers = FXCollections.observableArrayList(list);\r\n\r\n return saucers;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return null;\r\n }\r\n }", "public void loadUsersFromFile(String fileName) {\n\t\ttry {\n\t\t\tusers = UserRecordIO.readUserRecords(fileName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\"Unable to read file \" + fileName);\n\t\t}\n\t}", "public void read() {\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(\"studentData.dat\");\n\n\t\t\tObjectInputStream ois;\n\t\t\ttry {\n\t\t\t\tois = new ObjectInputStream(fis);\n\t\t\t\ttry {\n\t\t\t\t\tstudentList = (ArrayList<Student>) ois.readObject();\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tois.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\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}", "public void readFromBookingListFile()\r\n {\r\n try(ObjectInputStream fromBookingListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/bookinglist.dta\")))\r\n {\r\n bookingList = (BookingList) fromBookingListFile.readObject();\r\n bookingList.setSavedStaticBookingRunNr(fromBookingListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av booking \"\r\n + \"objektene.\\nOppretter tomt bookingregister.\\n\" \r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public void importStudents(String fileName) throws FileNotFoundException\n {\n Scanner inf = new Scanner(new File(fileName));\n while(inf.hasNextLine())\n {\n String first = inf.nextLine();\n String last = inf.nextLine();\n String password = inf.nextLine();\n String p1 = inf.nextLine();\n String p2 = inf.nextLine();\n String p3 = inf.nextLine();\n String p4 = inf.nextLine();\n String p5 = inf.nextLine();\n String p6 = inf.nextLine();\n String p7 = inf.nextLine();\n String p8 = inf.nextLine();\n \n students.add(new Student(first, last, password, p1, p2, p3, p4, p5, p6, p7, p8, this));\n }\n }", "public List<String> load();", "private LinkedList<User> GetUserList() throws FileNotFoundException, IOException, ClassNotFoundException{\r\n File Users = new File(\"DataBase/Users/UsersDataBase.obj\");\r\n Users.createNewFile();\r\n try{\r\n FileInputStream InputFile = new FileInputStream(Users);\r\n ObjectInputStream InputObject = new ObjectInputStream(InputFile);\r\n\r\n LinkedList <User> UserList = (LinkedList <User>) InputObject.readObject();\r\n\r\n InputFile.close();\r\n InputObject.close();\r\n\r\n return UserList;\r\n }\r\n catch (EOFException e){\r\n return null; \r\n } \r\n }", "public static ArrayList<Player> readPlayersFromFile() \r\n {\r\n //Inisialize Arraylist \r\n ArrayList<Player> players = new ArrayList<Player>();\r\n //Inisialize FileInputStream\r\n FileInputStream fileIn = null;\r\n\r\n try \r\n {\r\n //Establish connection to file \r\n fileIn = new FileInputStream(\"players.txt\");\r\n while (true) \r\n {\r\n //Create an ObjectOutputStream \r\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\r\n //Read a Player object from the file and add it to the ArrayList\r\n players.add((Player)objectIn.readObject());\r\n }//end while\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e);\r\n }\r\n finally \r\n {\r\n usernamesTaken.clear();\r\n\r\n for(int i = 0; i < players.size(); i++)\r\n {\r\n usernamesTaken.add(players.get(i).getUsername());\r\n }//end for\r\n\r\n //Try to close the file and return the ArrayList\r\n try\r\n {\r\n //Check if the end of the file is reached\r\n if (fileIn != null)\r\n { \r\n //Close the file \r\n fileIn.close();\r\n //Return the ArrayList of players\r\n return players;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e)\r\n }//end try \r\n\r\n //Return null if there is an excetion \r\n return null;\r\n }//end try \r\n }", "public void loadMembers(String filename) {\n try {\r\n Scanner input = new Scanner(new File(filename));\r\n // keep going until the end \r\n while (input.hasNext()) {\r\n String name = input.nextLine();\r\n String address = input.nextLine();\r\n String onLoan = input.nextLine();\r\n // add the member \r\n addMember(name, address);\r\n \r\n if (!onLoan.equals(\"NONE\")) {\r\n \r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n // print an error message \r\n System.err.println(\"File not found\");\r\n }\r\n }", "public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }", "@Override\n\tpublic List<UserStaffDTO> readStaffByUserId(int user_id) throws Exception {\n\t\treturn dao.readStaffByUserId(user_id);\n\t}", "private ArrayList<User> loadUsers(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<User>>(){}.getType();\r\n\t\tArrayList<User> users = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn users;\r\n\t}", "public void loadJobDataFromFile(File file) {\n try {\n\n JAXBContext context = JAXBContext.newInstance(JobListWrapper.class);\n Unmarshaller um = context.createUnmarshaller();\n\n // Reading XML from the file and unmarshalling.\n JobListWrapper wrapper = (JobListWrapper) um.unmarshal(file);\n\n jobData.clear();\n jobData.addAll(wrapper.getJobs());\n\n // Save the file path to the registry.\n setJobFilePath(file);\n\n } catch (Exception e) { // catches ANY exception\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"Could not load data\");\n alert.setContentText(\"Could not load data from file:\\n\" + file.getPath());\n\n alert.showAndWait();\n }\n }", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "public static ArrayList<User> readUsers(String filename) throws IOException {\r\n ArrayList<User> users = new ArrayList<User>();\r\n try {\r\n BufferedReader in = new BufferedReader(\r\n new FileReader(filename));\r\n String line = in.readLine();\r\n while (line != null) {\r\n StringTokenizer t = new StringTokenizer(line, \"|\");\r\n String emailAddress = t.nextToken();\r\n String firstName = t.nextToken();\r\n String lastName = t.nextToken();\r\n User user = new User(firstName, lastName, emailAddress);\r\n users.add(user);\r\n line = in.readLine();\r\n }\r\n in.close();\r\n return users;\r\n } catch (FileNotFoundException e) {\r\n return new ArrayList<User>();\r\n }\r\n }", "public void readFromServiceFile()\r\n {\r\n try(ObjectInputStream fromServiceFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/servicelist.dta\")))\r\n {\r\n serviceList = (ServiceList) fromServiceFile.readObject();\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n serviceList = new ServiceList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av service\"\r\n + \" objektene.\\nOppretter nytt \"\r\n + \"serviceregister.\\n\" + cnfe.getMessage(), \r\n \"Feilmelding\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n serviceList = new ServiceList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter nytt serviceregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n serviceList = new ServiceList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter nytt serviceregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public void loadEmployees(String fileName)\r\n\t{\r\n\t\t//try block to attempt to open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables for the file name and data fields within the employeelist text file\r\n\t\t\t//these will all be Strings when pulled from the file, and then converted to the proper data type when they are assigned to the Employee objects\r\n\t\t\tString empID = \"\";\r\n\t\t\tString empLastName = \"\";\r\n\t\t\tString empFirstName = \"\";\r\n\t\t\tString empType = \"\";\t\r\n\t\t\tString empSalary = \"\"; //will convert to double\r\n\t\t\t\r\n\t\t\t//scan for file\r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop searching file records\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//split the field into segments with the comma (,) being the delimiter (employee ID, Last Name, First Name, employee type, and employee salary)\r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\tempID = fields[0];\r\n\t\t\t\tempLastName = fields[1];\r\n\t\t\t\tempFirstName = fields[2];\r\n\t\t\t\tempType = fields[3];\r\n\t\t\t\tempSalary = fields[4];\r\n\t\t\t\t\r\n\t\t\t\t//create a selection structure that creates the type of employee based on the empType\r\n\t\t\t\tif(empType.equalsIgnoreCase(\"H\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an HourlyEmployee and convert empSalary to a double\r\n\t\t\t\t\tHourlyEmployee hourlyEmp = new HourlyEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add hourlyEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(hourlyEmp);\r\n\t\t\t\t}//end create hourly employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create an exempt employee for E\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"E\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an exempt employee (salary) and convert the empSalary to a double\r\n\t\t\t\t\tExemptEmployee salaryEmp = new ExemptEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add salaryEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(salaryEmp);\r\n\t\t\t\t}//end create exempt (salary) employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a contractor \r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"C\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a contract employee and convert the empSalary to a double\r\n\t\t\t\t\tContractEmployee contractEmp = new ContractEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add contractEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(contractEmp);\r\n\t\t\t\t}//end create contractor employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a day laborer\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"d\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a day laborer and convert the empSalary to a double\r\n\t\t\t\t\tDayLaborer laborer = new DayLaborer(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add laborer to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(laborer);\r\n\t\t\t\t}//end create day laborer employee\r\n\t\t\t\t\r\n\t\t\t\t//else ignore the employee (looking at you Greyworm!)\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the employee type and id to return as an error\r\n\t\t\t\t\tempTypeError = empType;\r\n\t\t\t\t\tempIDError = empID;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ignore the employee \r\n\t\t\t\t\tempType = null;\r\n\t\t\t\t}//end ignore X employee\r\n\t\t\t}//end while loop cycling the records in the employeelist\r\n\t\t\t\r\n\t\t\t//close infile when done\r\n\t\t\tinfile.close();\r\n\t\t}//end of try block opening employeelist.txt file\r\n\t\t\r\n\t\t//catch block if file not found\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch for file not found\r\n\t}", "public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }", "public void readFromFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\Project\\\\src\\\\Railway.txt\");\r\n\t\t\tScanner s = new Scanner(f);\r\n\t\t\tpersons = new Person2 [50]; \r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine()){\r\n\t\t\t\tString a = s.nextLine();\r\n\t\t\t\tString b = s.nextLine();\r\n\t\t\t\tString c = s.nextLine();\r\n\t\t\t\tString d = s.nextLine();\r\n\t\t\t\tString e = s.nextLine();\r\n\t\t\t\tString g = s.nextLine();\r\n\t\t\t\tString h = s.nextLine();\r\n\t\t\t\tString j = s.nextLine();\r\n\t\t\t\tPerson2 temp = new Person2 (a,b,c,d,e,g,h,j);\r\n\t\t\t\tpersons[i] = temp;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "@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 }", "private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }", "public void readFile() {\n try\n {\n tasksList.clear();\n\n FileInputStream file = new FileInputStream(\"./tasksList.txt\");\n ObjectInputStream in = new ObjectInputStream(file);\n\n boolean cont = true;\n while(cont){\n Task readTask = null;\n try {\n readTask = (Task)in.readObject();\n } catch (Exception e) {\n }\n if(readTask != null)\n tasksList.add(readTask);\n else\n cont = false;\n }\n\n if(tasksList.isEmpty()) System.out.println(\"There are no todos.\");\n in.close();\n file.close();\n }\n\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public void loadAllUsers(String filename) throws Exception {\r\n BufferedReader br = new BufferedReader(new FileReader(filename));\r\n String name;\r\n try {\r\n while ((name = br.readLine()) != null)\r\n addUser(name);\r\n } catch (Exception e) {\r\n throw new Exception(\"Error: File not Readable\");\r\n }\r\n }", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public static void loadToDoListsFromFile() {\n\n\t\tAccount openedAccount = AccountManager.getAccount();\n\t\tFile loadListFile = new File(\n\t\t\t\tSystem.getProperty(\"user.dir\") + \"//ToDoLists//\" + openedAccount.getUserName() + \"//toDoList.txt\");\n\n\t\tif (loadListFile.exists()) {\n\n\t\t\ttry (Scanner readFromFile = new Scanner(loadListFile)) {\n\n\t\t\t\tString listName = new String();\n\t\t\t\tString taskName = new String();\n\t\t\t\tString taskDescription = new String();\n\t\t\t\tString taskTag = new String();\n\t\t\t\tString isFinished = new String();\n\t\t\t\tLocalDate dueDate;\n\t\t\t\tString[] time;\n\t\t\t\tint[] timeInt = new int[3];\n\n\t\t\t\twhile (readFromFile.hasNext()) {\n\n\t\t\t\t\tlistName = readFromFile.nextLine();\n\n\t\t\t\t\tcreateNewToDoList(listName);\n\n\t\t\t\t\tToDoList list = getToDoList(listName);\n\t\t\t\t\tFile taskFile = new File(System.getProperty(\"user.dir\") + \"//ToDoLists//\"\n\t\t\t\t\t\t\t+ openedAccount.getUserName() + \"//\" + list.getListName() + \".txt\");\n\n\t\t\t\t\ttry (Scanner readTaskFile = new Scanner(taskFile)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (readTaskFile.hasNext()) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttaskName = readTaskFile.nextLine();\n\t\t\t\t\t\t\ttaskDescription = readTaskFile.nextLine();\n\t\t\t\t\t\t\ttaskTag = readTaskFile.nextLine();\n\t\t\t\t\t\t\tisFinished = readTaskFile.nextLine();\n\t\t\t\t\t\t\ttime = readTaskFile.nextLine().split(\"-\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\t\t\t\t\t\ttimeInt[i] = Integer.valueOf(time[i]);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdueDate = LocalDate.of(timeInt[0], timeInt[1], timeInt[2]);\n\t\t\t\t\t\t\tlist.createNewTask(taskName, taskDescription, dueDate, taskTag);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (isFinished.equals(\"true\")) {\n\t\t\t\t\t\t\t\tlist.getTaskByTaskName(taskName).setFinished(true);\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} catch (IOException e) {\n\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public void load(){\n\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open Streams\n\t\t\tFileInputStream inFile = new FileInputStream(\"user.ser\");\n\t\t\tObjectInputStream objIn = new ObjectInputStream(inFile);\n\t\t\t\n\t\t\t// Load the existing UserList at the head\n\t\t\tthis.head = (User)objIn.readObject();\n\t\t\t\n\t\t\t// Close Streams\n\t\t\tobjIn.close();\n\t\t\tinFile.close();\n\t\t}\n\n\t\tcatch(Exception d) {\n\t\t System.out.println(\"Error loading\");\n\t\t}\n\n\t}", "@Test\n\tpublic void testReadFacultyRecords() throws FileNotFoundException {\n\t\t// testing valid Faculty records\n\t\ttry {\n\t\t\tLinkedList<Faculty> facultys = FacultyRecordIO.readFacultyRecords(\"test-files/faculty_records.txt\");\n\t\t\tassertEquals(8, facultys.size());\n\n\t\t\tfor (int i = 0; i < facultys.size(); i++) {\n\t\t\t\tassertEquals(validFacultys[i], facultys.get(i).toString());\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"Unexpected error reading \" + \"faculty_records.txt\");\n\t\t}\n\t\t// testing file that does not exist\n\t\tLinkedList<Faculty> facultys = null;\n\t\ttry {\n\t\t\tfacultys = FacultyRecordIO.readFacultyRecords(\"test-files/fake_file.txt\");\n\t\t\tassertEquals(0, facultys.size());\n\t\t} catch (FileNotFoundException e) {\n\t\t\tassertEquals(facultys, null);\n\t\t}\n\t\t// testing file that is empty\n\t\ttry {\n\t\t\tfacultys = FacultyRecordIO.readFacultyRecords(\"test-files/Empty_File.txt\");\n\t\t\tassertEquals(0, facultys.size());\n\t\t} catch (FileNotFoundException e) {\n\t\t\tassertEquals(facultys, null);\n\t\t}\n\t\t// testing invalid Faculty records\n\t\ttry {\n\t\t\tfacultys = FacultyRecordIO.readFacultyRecords(\"test-files/invalid_faculty_records.txt\");\n\t\t\tassertEquals(0, facultys.size());\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tassertEquals(0, facultys.size());\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Student> retrieveAllStudentObjects() {\r\n\t\tList<Student> listOfStudents = new ArrayList<Student>();\r\n\r\n\t\ttry {\r\n\t\t\tlistOfStudents = readSerializedObject();\r\n\r\n\t\t\tif (listOfStudents == null) {\r\n\t\t\t\tSystem.out.println(\"Unable to read from file!\");\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn listOfStudents;\r\n\t}", "public static void read(String fname){\r\n\t\t\t\r\n\t\t\tString line = \"\";\r\n\t\t\ttry {\r\n\t // FileReader reads text files in the default encoding.\r\n\t FileReader fileReader = new FileReader(fname);\r\n\t \r\n\t // Always wrap FileReader in BufferedReader.\r\n\t BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t header=bufferedReader.readLine();\r\n\t \r\n\t data = new ArrayList<alldata>();\r\n\r\n\t while((line = bufferedReader.readLine()) != null) {\r\n\t \t\r\n\t //parse line and divide data by comma\r\n\t \r\n\t \t\r\n\t \tString[] lineStr = line.split(\",\");\r\n\t \t\r\n\t //create object row into which data from each line is stored and then added to array list\t\r\n\t \t\r\n\t if(lineStr.length >0) {\r\n\t \talldata row = new alldata();\r\n\t \trow.Name = lineStr[0]+ \",\" + lineStr[1];\r\n\t \trow.Num = lineStr[2];\r\n\t \trow.State = lineStr[3];\r\n\t \trow.Zip = lineStr[4];\r\n\t \trow.Age = Integer.parseInt(lineStr[6]);\r\n\t \trow.Sex = lineStr[7];\r\n\t \t\r\n\t \tdata.add(row);\r\n\t }\r\n\t \r\n\t \r\n\t } \r\n\t bufferedReader.close(); // Always close files. \r\n\t }catch(FileNotFoundException ex) {\r\n\t System.out.println(\"Unable to open file '\" + fname + \"'\"); \r\n\t }catch(IOException ex) {\r\n\t System.out.println(\"Error reading file '\" + fname + \"'\"); \r\n\t }\r\n\t\t\tSystem.out.println(\"Finish reading data from file \"+ fname);\r\n\t\t}", "public static String loadStudentList() {\n\n // Variable used to organize code and allow buffered reader to close\n String bufferedStudentList = \" \"; \n\n // The try...catch block handles the possible error that may occur if \n // there was an issue with accessing the file. \n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(Constants.STUDENT_LIST));\n bufferedStudentList = bufferedReader.readLine();\n bufferedReader.close();\n } catch (IOException exception) {\n System.out.println(exception);\n } \n return bufferedStudentList; \n }", "public static void loadStudRecsFromFile(File file) {\r\n\t\ttry {\r\n\t\t\tJAXBContext context = JAXBContext\r\n\t\t\t\t\t.newInstance(StudRecsWrapper.class);\r\n\t\t\tUnmarshaller um = context.createUnmarshaller();\r\n\t\t\t\r\n\t\t\tStudRecsWrapper wrapper = (StudRecsWrapper) um.unmarshal(file);\r\n\t\t\t\r\n\t\t\tstudRecs.clear();\r\n\t\t\tstudRecs.addAll(wrapper.getStudRecs());\r\n\t\t\tSystem.out.println(\"File loaded!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Cannot load file, does it exist?\");\r\n\t\t}\r\n\t}", "public void loadList(String name){\n }", "public List<Event> fillArrayList()\r\n {\r\n List<Event> list1=new ArrayList<>();\r\n FileReader fr=null;\r\n \r\n try{\r\n \r\n fr=new FileReader(\"./event.txt\");\r\n BufferedReader bf=new BufferedReader(fr);\r\n String s;\r\n \r\n while((s=bf.readLine())!=null)\r\n {\r\n Event event=new Event();\r\n String s1[]=new String[7];\r\n for(int i=0;i<s1.length;i++)\r\n {\r\n s1=s.split(\",\");\r\n \r\n event.setId(Integer.parseInt(s1[0]));\r\n \r\n event.setName(s1[1]);\r\n \r\n event.setOrganizer(s1[2]);\r\n \r\n Date date=Date.valueOf(s1[3]);\r\n \r\n event.setDate(date);\r\n \r\n event.setFees(Double.parseDouble(s1[4]));\r\n \r\n } \r\n list1.add(event);\r\n }\r\n \r\n bf.close();\r\n \r\n }catch(Exception e){e.printStackTrace();}\r\n return list1;\r\n\r\n }", "private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}", "public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "private void loadLegitimateFollowers(String l_file) {\n\t\tL = new ArrayList<String>();\n\t\t\n\t\tFile inFile = new File(l_file);\n\n\t\tif (!inFile.isFile()) {\n\t\t\tSystem.out.println(\"Parameter is not an existing file\");\n\t\t\treturn;\n\t\t}\n\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(l_file));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\tString line = null;\n\n\t\t//Read from the original file and write to the new\n\t\t//unless content matches data to be removed.\n\t\ttry {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] followers = line.split(\",\");\n\t\t\t\tthis.L.add(followers[0]);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@PostConstruct\n private List<String> loadFortunesFile() {\n System.out.println(\">> FileFortuneService: inside method 'loadFortunesFile'.\");\n\n try {\n String fileName = \"src/com/luv2code/springdemo/fortune_data.txt\";\n BufferedReader reader = new BufferedReader(new FileReader(fileName));\n String line = null;\n while ( (line = reader.readLine()) != null) {\n fortunes.add(line);\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred during file-stream: \");\n e.printStackTrace();\n }\n return fortunes;\n\n }", "public static Set<User> loadUsersFromFile(String filePath) throws IOException\n {\n Set<User> users = new HashSet<User>();\n BufferedReader br = new BufferedReader(new FileReader(filePath));\n String line = br.readLine();\n while (line != null)\n {\n String[] userPass = line.split(\"\\\\s+\");\n User user = new User(userPass[0], userPass[1]);\n users.add(user);\n line = br.readLine();\n }\n br.close();\n return Collections.unmodifiableSet(users);\n }", "public void readPatientListFromFile()\r\n\t{\n\t\tnextPatientLocation = 0;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Makes file reader objects and passes filename\r\n\t\t\tFileReader fr = new FileReader(patientMasterfile);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\t//reads first line and makes a blank patient \r\n\t\t\tString aReadLine = br.readLine();\r\n\t\t\tPatient tempRead = new Patient();\r\n\t\t\t//loops through all lines in the file\r\n\t\t\twhile(aReadLine != null)\r\n\t\t\t{\r\n\t\t\t\t//resets patient to null\r\n\t\t\t\ttempRead = new Patient();\r\n\t\t\t\t//Splits the read in data and assigns that data to the appropriate attribute \r\n\t\t\t\tString[] splitPatientData = aReadLine.split(\"~~\");\r\n\r\n\t\t\t\ttempRead.patientID = splitPatientData[0];\r\n\t\t\t\ttempRead.forename = splitPatientData[1];\r\n\t\t\t\ttempRead.surname = splitPatientData[2];\r\n\t\t\t\ttempRead.username = splitPatientData[3];\r\n\t\t\t\ttempRead.password = splitPatientData[4];\r\n\t\t\t\ttempRead.houseNumber = splitPatientData[5];\r\n\t\t\t\ttempRead.postcode = splitPatientData[6];\r\n\t\t\t\ttempRead.telephoneNumber = splitPatientData[7];\r\n\t\t\t\ttempRead.dob = splitPatientData[8];\r\n\t\t\t\ttempRead.mode = splitPatientData[9];\r\n\t\t\t\t//adds patient to list and gets the next line\r\n\t\t\t\taddPatientToList(tempRead);\r\n\t\t\t\taReadLine = br.readLine();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//catches any exceptions trown by reading \r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error reading file, \");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public ArrayList<Task> load() throws DukeException {\n ArrayList<Task> tasks = new ArrayList<>();\n try {\n File f = new File(filePath);\n if (f.exists()) {\n Scanner sc = new Scanner(f);\n while (sc.hasNext()) {\n String next = sc.nextLine();\n Task t = parseLine(next);\n tasks.add(t);\n }\n sc.close();\n } else {\n if (!f.getParentFile().exists()) {\n f.getParentFile().mkdir();\n }\n }\n f.createNewFile();\n } catch (IOException e) {\n throw new DukeException(\"Error retrieving/reading from data file, creating new file instead.\");\n }\n return tasks;\n }", "private ArrayList<Habit> loadFromFile(final String fileName) {\r\n ArrayList<Habit> habitArray = new ArrayList<Habit>();\r\n try {\r\n FileInputStream fis = openFileInput(fileName);\r\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\r\n Gson gson = new Gson();\r\n\r\n // Code from http://stackoverflow.com/questions/12384064/gson-convert-from-json-to-a-typed-arraylistt\r\n Type typeHabit = new TypeToken<ArrayList<Habit>>(){}.getType();\r\n\r\n habitArray = gson.fromJson(in, typeHabit);\r\n\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n saveInFile(fileName, new ArrayList<Habit>());\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n }\r\n return habitArray;\r\n }", "public void adminLoad() {\n try {\n File file = new File(adminPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n String data = scanner.nextLine();\n String[]userData = data.split(separator);\n AdminAccounts adminAccounts = new AdminAccounts();\n adminAccounts.setUsername(userData[0]);\n adminAccounts.setPassword(userData[1]);\n users.add(adminAccounts);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "protected final StreamInfoList loadStreamList(FileState fstate, DBFileInfo finfo, DBDeviceContext dbCtx, boolean dbLoad) {\n\n // Check if the stream list has already been loaded\n \n StreamInfoList sList = (StreamInfoList) fstate.findAttribute(FileState.StreamsList);\n \n // If the streams list is not loaded then load it from the database\n\n if ( sList == null && dbLoad == true) { \n\n // Load the streams list from the database\n \n try {\n\n // Load the streams list\n \n sList = dbCtx.getDBInterface().getStreamsList(finfo.getFileId(), DBInterface.StreamAll);\n }\n catch (DBException ex) {\n }\n }\n \n // Return the streams list\n \n return sList;\n }", "public Staff2 ()\n {\n staffList = new StaffMember2[8];\n\n staffList[0] = new Executive2 (\"Sam\", \"123 Main Line\",\n \"555-0469\", \"123-45-6789\", 2423.07);\n\n staffList[1] = new Employee2 (\"Carla\", \"456 Off Line\",\n \"555-0101\", \"987-65-4321\", 1246.15);\n staffList[2] = new Employee2 (\"Woody\", \"789 Off Rocker\",\n \"555-0000\", \"010-20-3040\", 1169.23);\n\n staffList[3] = new Hourly2 (\"Diane\", \"678 Fifth Ave.\",\n \"555-0690\", \"958-47-3625\", 10.55);\n\n staffList[4] = new Volunteer2 (\"Norm\", \"987 Suds Blvd.\",\n \"555-8374\");\n staffList[5] = new Volunteer2 (\"Cliff\", \"321 Duds Lane\",\n \"555-7282\");\n\n staffList[6] = new Commission (\"Ron\", \"546 Mainland Dr.\",\n \t\"555-8141\", \"547-87-9845\", 11.75, .20);\n staffList[7] = new Commission (\"Sammy\", \"180 Barkley Lane\",\n \t\"555-6256\", \"695-14-3824\", 14.50, .15);\n\n ((Executive2)staffList[0]).awardBonus (500.00);\n\n ((Commission)staffList[6]).addHours(35);\n ((Commission)staffList[6]).addSales(400);\n\n ((Commission)staffList[7]).addHours(40);\n ((Commission)staffList[7]).addSales(950);\n\n ((Hourly2)staffList[3]).addHours (40);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static void readUserFile() {\n\t\ttry {\n\t\t\tObjectInputStream readFile = new ObjectInputStream(new FileInputStream(userFile));\n\t\t\tVerify.userList = (ArrayList<User>) readFile.readObject();\n\t\t\treadFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//add contents of file to separate lists\n\t\tfor (int i=0; i<Verify.userList.size(); i++) {\n\t\t\tVerify.userIds.add(Verify.userList.get(i).getUserId());\n\t\t\tVerify.usernames.add(Verify.userList.get(i).getUsername());\n\t\t\tif (Verify.userList.get(i).getAccounts() != null) {\n\t\t\t\tVerify.accountList.addAll(Verify.userList.get(i).getAccounts());\n\t\t\t}\n\t\t\tif (Verify.userList.get(i).getRequests() != null) {\n\t\t\t\tVerify.requestList.addAll(Verify.userList.get(i).getRequests());\t\n\t\t\t}\n\t\t}\n\t\tfor (Account account: Verify.accountList) {\n\t\t\tVerify.accountIds.add(account.getAccountId());\n\t\t}\n\t}", "private Account loadTestData(String dataFile) throws ParserConfigurationException, \n SAXException, IOException {\n try {\n // getting parser\n SAXParserFactory factory = SAXParserFactory.newInstance();\n factory.setNamespaceAware(true);\n SAXParser parser = factory.newSAXParser();\n XMLReader reader = parser.getXMLReader();\n \n // getting loader\n InvoiceXMLLoaderCH loader = new InvoiceXMLLoaderCH();\n \n // getting input file\n InputSource input = new InputSource(this.getClass().getResourceAsStream(dataFile));\n \n // setting content handler and parsing file\n reader.setContentHandler(loader);\n reader.parse(input);\n \n return (Account) loader.getAccountList().get(0);\n \n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n throw e;\n } catch (SAXException e) {\n e.printStackTrace();\n throw e;\n } catch (IOException e) {\n e.printStackTrace();\n throw e;\n }\n }", "public void loadFlights(InputStream stream) throws StorageException {\r\n // Get the file contents\r\n String[] lines = readFile(stream);\r\n // Parse and save flights from lines found\r\n parseFlights(lines);\r\n }", "static Student[] readStudentsFromFile(String filename, int num) {\n\t\ttry (Scanner in = new Scanner(new File(filename))) {\n\t\t\tStudent[] students = new Student[num];\n\t\t\tint index = 0; //prevents ArrayIndexOutOfBounds\n\t\t\tString line;\n\t\t\tString[] input;\n\n\t\t\twhile (in.hasNextLine()) {\n\t\t\t\tline = in.nextLine();\n\t\t\t\tinput = line.split(\",\"); //Splits each String input by the character ','\n\t\t\t\tstudents[index++] = new Student(input[0], Integer.parseInt(input[1]), input[2]);\n\t\t\t}\n\t\t\treturn students;\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public static Superuser load() throws IOException, ClassNotFoundException {\n\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(storeDir + File.separator + storeFile));\n\t\tSuperuser userList = (Superuser) ois.readObject();\n\t\tois.close();\n\t\treturn userList;\n\t\t\n\t}", "public void loadFacultyFromFile(String filename) {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tfacultyDirectory = FacultyRecordIO.readFacultyRecords(filename);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Unable to read file \" + filename);\r\n\t\t}\r\n\t}", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "private static ArrayList<User> loadInitialData(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t// From the users list get all the user names\n\t\tfor (String username:Utils.FileUtils.getFileLines(Global.Constants.LIST_OF_USERS)){ // refers \"users\" file\n\t\t\tArrayList<Directory> directories = new ArrayList<Directory>();\n\t\t\t// For a user name, read the names of directories registered\n\t\t\t// Note: All directory names are provided in the file bearing user name\n\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION + username)) { // refers to a specific user file \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // that has directories\n\t\t\t\tfor (String dir:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username)) {\n\t\t\t\t\tArrayList<String> documents = new ArrayList<String>();\n\t\t\t\t\t// For each directory, read names of files saved\n\t\t\t\t\t// Note: All file names are provided in the file bearing username$dirname\n\t\t\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION, username + \"$\" + dir)) {\n\t\t\t\t\t\tfor (String doc:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username + \"$\" + dir)) {\n\t\t\t\t\t\t\tdocuments.add(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectories.add(new Directory(dir, documents));\n\t\t\t\t}\n\t\t\t}\n\t\t\tusers.add(new User(username, directories));\n\t\t}\n\t\treturn users;\n\t}", "private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}", "private ArrayList<Person> getScores() {\n ArrayList<Person> persons = new ArrayList<>(); \n\n try {\n \t//The file is selected and then a reader is created to read the file\n File myObj = new File(\"highscores.txt\");\n Scanner myReader = new Scanner(myObj);\n\n //This constraint checks for a next available line and adds the variable data to this line. Data contains the name and score of the person. \n //The splitter is used to separate the name and score of the person, which is then added to the person Array. Then the reader is closed.\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n int splitterIndex = data.indexOf(\"-\");\n persons.add(new Person(data.substring(0, splitterIndex), parseInt((data.substring(splitterIndex + 1)))));\n }\n myReader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n return persons;\n }", "public static ArrayList<Item> readFromFile() {\n\t\t\n\t\tPath writeFile = Paths.get(\"list.txt\");\n\t\tFile file = writeFile.toFile();\n\t\tArrayList<Item> itemList = new ArrayList<Item>();\n\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\t// this is a buffer and the benefit of using this is to is to store a block of\n\t\t\t// memory that\n\t\t\t// we can read data from later -- more efficient than Scanner\n\n\t\t\tBufferedReader reader = new BufferedReader(fr);\n\t\t\t// this is attempting to read the first line from the text document\n\t\t\tString line = \"\";\n\t\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t\tString[] stringArray= line.split(\",\");\n\t\t\t\tItem item = new Item(Integer.parseInt(stringArray[0]), stringArray[1], stringArray[2],stringArray[3],Integer.parseInt(stringArray[4]),Double.parseDouble(stringArray[5]) );\n\t\t\t\titemList.add(item);\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"There were no items!\");\n\t\t}\n\t\treturn itemList;\n\t}", "public void loadStudents(File filePath){\r\n Index.resetIndex();\r\n List<Student> students = DataConvert.loadStudentsDataFromCSV(filePath);\r\n List<String> errorMessage = new ArrayList<>();\r\n students.forEach(student -> {\r\n try{\r\n addStudent(student);\r\n } catch (ValidationException ex){\r\n errorMessage.add(\"=========================================\\n\");\r\n errorMessage.add(student.toString() + \" - \" + ex.getMessage());\r\n errorMessage.add(\"=========================================\\n\");\r\n }\r\n });\r\n if(!errorMessage.isEmpty()){\r\n String error = errorMessage.stream().reduce(\"\", (s1, s2)-> s1 += s2);\r\n throw new ValidationException(error);\r\n }\r\n }", "public void saveStaffList(String fileName) {\n try {\n BufferedWriter out = new BufferedWriter(new FileWriter(fileName));\n out.write(maxStaff+\"\\r\\n\");\n \n out.write(numStaff+\"\\r\\n\");\n \n \n for (int i = 0; i < numStaff; i++) {\n if (staffList[i] instanceof Labourer) {\n out.write(staffList[i].toFile());\n } else if (staffList[i] instanceof Manager) {\n out.write(staffList[i].toFile());\n }\n }\n out.close();\n } catch (IOException iox) {\n System.out.println(\"Error saving to \" + fileName);\n }\n }", "public void load(String fileName) throws IOException{\n\t\tFileInputStream fileIn=null;\n\t try {\n\t\t\tfileIn = new FileInputStream(fileName);\n\t\t\tArrayList<User1> userList; // = new ArrayList<User1>();\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t// Tramite la funzione readValue riottengo la lista degli utenti a partire dalla stringa con codifica JSON\n\t\t\t//userList = mapper.readValue(fileIn, new TypeReference<ArrayList<User1>>());\n\t\t\tUser1[] array = mapper.readValue(fileIn, User1[].class);\n\t\t\tuserList=new ArrayList<>(Arrays.asList(array));\n\t\t\tfor(User1 userWrapped : userList) // Per ogni utente nella lista, riottengo l'oggetto User, andando a ripopolare il Realm (ripristino)\n\t\t\t{\n\t\t\t\tUser user = new User(userWrapped.getIdentifier(), userWrapped.getSecret());\n\t\t\t\trealm.getUsers().add(user); // Aggiungo l'utente alla lista\n\t\t\t}\n\t\t\tfileIn.close();\n\t\t} catch (IOException e){\n\t\t\tif(fileIn!=null)fileIn.close();\n\t \tthrow e;\n\t\t}\n\n\t}", "public static void loadRecords(String filePath) throws IOException {\n\t\t// Read file \n\t\tFileReader fr = new FileReader(filePath);\n\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\tString line = null;\n\t\t// Read line by line and store it in Array list\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\trecords.add(line);\n\t\t}\n\t\tfr.close();\n\t}", "static List<Student> loadStudentList(InputStream in) {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))\n .lines()\n .skip(1)\n .map(Student::fromCsv)\n .collect(Collectors.toList());\n }", "private ArrayList<String> load(String fileName, String initialWord)\n\t{\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\ttry{\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\t\tString word = reader.readLine();\n\t\t\twhile(word != null){\n\t\t\tif(word.length()==initialWord.length())\n\t\t\t\twords.add(word);\n\t\t\tword = reader.readLine();\n\t\t\t}\n\t\t\treader.close();\n\t\t}catch(IOException e){\n\t\t\tSystem.err.println(\"Can't find a file '\"+fileName+\"'!\");\n\t\t\tJOptionPane.showMessageDialog(null,\"Can't find a file '\"+fileName+\"'!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\treturn words;\n\t}", "public static ArrayList<String> loadFileStrings(File f) {\n\t\tArrayList<String> fileStrings = new ArrayList<String>();\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null)\n\t\t\t\tfileStrings.add(line);\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn fileStrings;\n\t}", "public DataProcessor(String filename) throws FileNotFoundException{\n\tlst = new ArrayList();\n\tScanner input = new Scanner(new FileReader(filename));\n //skip the first line of the csv file\n\tString escapedLine = input.nextLine();\n \twhile(input.hasNextLine()){\n\t recordCount++;\n\t String line = input.nextLine();\n\t //CORRECTION BLOC to skip quoted commas\n\t if (line.contains(\"\\\"\")){\n\t\tint first= line.indexOf(\"\\\"\");\n\t\twhile(first >0 ){\n\t\t String problem = line.substring(first,line.indexOf(\"\\\"\",first+1)+1);\n\t\t \tint second = line.indexOf(\"\\\"\",first+1);\n\t\t\t//look for comma between quoted\n\t\t\tif(problem.contains(\",\")){\n\t\t\t //replace comma by space not to change string indices\n\t\t\t problem=problem.replace(\",\",\" \");\n\t\t\t line=line.replace(line.substring(first,line.indexOf(\"\\\"\",first+1)+1),problem);\n\t\t\t}\n\t\t\t//look for another quote symbol\n\t\t\tfirst = line.indexOf(\"\\\"\",second+1);\n\t\t}\n\t }\n\t String[] fields = line.split(\",\");\n\t //create Person object to store the suspect's data\n\t Person suspect = new Person(fields[SEX].charAt(0),fields[RACE].charAt(0),Integer.parseInt(fields[DOB]),Integer.parseInt(fields[HEIGHTFT]),fields[EYECOLOR],fields[BUILD].charAt(0));\n\t lst.add(suspect);\n\t}\n\t//close scanner\n\tinput.close();\n }", "private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\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}", "public void readFile() throws IOException {\r\n File file = new File(\"employee_list.txt\"); //Declaration and initialization of file object\r\n Scanner textFile = new Scanner(file); //Creates Scanner object and parse in the file\r\n\r\n while(textFile.hasNextLine()){ //Stay in a loop until there is no written line in the text file\r\n String line = textFile.nextLine(); //Read line and store in a String variable 'line'\r\n String[] words = line.split(\",\"); //Split the whole line at commas and store those in a simple String array\r\n Employee employee = new Employee(words[0],words[1],words[2]); //Create Employee object\r\n this.listOfEmployees.add(employee); //Add created Employee object to listOfEmployees ArrayList\r\n if(!this.listOfDepartments.contains(words[1])){ //This just adds all the department names to an ArrayList\r\n this.listOfDepartments.add(words[1]);\r\n }\r\n }\r\n }", "static List<String> fileToList(){\n List<String> contacts = null;\n try {\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n contacts = Files.readAllLines(contactsListPath);\n } catch (IOException ioe){\n ioe.printStackTrace();\n }\n return contacts;\n }", "public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }", "public void readFromFile(String path) {\n try {\n ArrayList<String> list = new ArrayList<>(Files.readAllLines(Paths.get(path)));\n\n for (String info: list) {\n AddressEntry entry = new AddressEntry();\n ArrayList<String> entryList = new ArrayList<>(Arrays.asList(info.split(\",\")));\n entry.setFirstName(entryList.get(0).trim());\n entry.setLastName(entryList.get(1).trim());\n entry.setStreet(entryList.get(2).trim());\n entry.setCity(entryList.get(3).trim());\n entry.setState(entryList.get(4).trim());\n entry.setZip(Integer.parseInt(entryList.get(5).trim()));\n entry.setPhone(entryList.get(6).trim());\n entry.setEmail(entryList.get(7).trim());\n add(entry);\n }\n\n System.out.println(\"Read in \" + list.size() + \" new Addresses. Successfully loaded\");\n System.out.println(\"There are currently \" + addressEntryList.size() + \" Addresses in the Address Book.\");\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }", "public static ArrayList<Loan> readData(String file) throws FileNotFoundException {\n // Scanner used to read in the data from the file.\n Scanner in = new Scanner(new File(file));\n // ArrayList to store the data.\n ArrayList<Loan> list = new ArrayList<Loan>();\n // Read in the header line so it is not added to the ArrayLists.\n String header = in.nextLine();\n // Check to see if the file still has data to be read in.\n while(in.hasNextLine()) {\n \n // Read in the line of data and \n // use a space as a delimiter to separate the different columns.\n String[] line = in.nextLine().split(\",\");\n \n // Local variable containing the ID.\n int ID = Integer.parseInt(line[0]);\n \n // Local variable containing the amount.\n int amount = Integer.parseInt(line[1]);\n \n // Local variable containing the country.\n String country = line[2];\n \n // Local variable containing the lenders.\n int lenders = Integer.parseInt(line[5]);\n \n // Local variable containing the difference in days.\n int differenceInDays = Integer.parseInt(line[4])/86400;\n \n // Add the loan to the arraylist.\n list.add(new Loan(ID, amount, country, differenceInDays, lenders)); \n \n }\n // Return the completed ArrayLists.\n return list;\n }", "public static ArrayList createAllFriends(String fileName) throws IOException {\n fr = new FileReader(fileName +\".txt\");\n br = new BufferedReader(fr);\n String line;\n String friendString = \"\";\n while((line = br.readLine()) != null) {\n if(!line.equals(\";\")) {\n friendString += line;\n }\n else {\n parseFriend(friendString);\n friendString = \"\";\n }\n }\n return friends;\n }", "@GET\r\n\t@Path(\"{id}\")\r\n\t@Produces(\"application/JSON\")\r\n\tpublic ZooStaff getStaffById(@PathParam(\"id\")int id) {\r\n\t\treturn service.getStaffById(id);\r\n\t}", "public static int loadFile(File f, Data[] datas) throws IOException \n {\n Scanner scf = new Scanner(f);\n int n = 0; // number of lines read\n while (n < datas.length && scf.hasNextLine()) \n {\n String line = scf.nextLine();\n datas[n] = new Data(line);\n n++;\n }\n scf.close();\n return n;\n }", "public void populateListFromFile() \n\t{\n\t\tBufferedReader bufferedReader = null;\n\t\tallQuestions = new ArrayList<ArrayList<String>>();\n\t\tquestionAndAnswers = new ArrayList<String>();\n\n\t\ttry {\n\t\t bufferedReader = new BufferedReader(new FileReader(\"questions.txt\"));\n\t\t String line = \"\";\n\t\t \n\t\t while ((line = bufferedReader.readLine()) != null) \n\t\t {\t\t\t \t\n\t\t \tif(line.length() > 0)\n\t\t \t\tquestionAndAnswers.add(line);\n\t\t \telse if (line.length() == 0)\n\t\t \t{\n\t\t \t\tallQuestions.add(questionAndAnswers);\n\t\t \t\tquestionAndAnswers = new ArrayList<String>();\n\t\t \t}\n\t\t } \n\t\t} catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t}" ]
[ "0.6697976", "0.64717555", "0.5922553", "0.59169763", "0.5830701", "0.58131856", "0.5792546", "0.5743041", "0.5740871", "0.5722377", "0.5711966", "0.5702786", "0.5662852", "0.5655897", "0.5642117", "0.5637948", "0.5628258", "0.562698", "0.5618052", "0.5608786", "0.5598972", "0.55900705", "0.5582989", "0.55778176", "0.55634636", "0.55566627", "0.55518836", "0.5527527", "0.5525109", "0.5518978", "0.55164504", "0.5483147", "0.54830474", "0.5481997", "0.5473664", "0.5450317", "0.54407734", "0.54389876", "0.54164517", "0.53991556", "0.5389294", "0.53738874", "0.53651196", "0.53637755", "0.5360959", "0.53421026", "0.53229004", "0.5320521", "0.53128713", "0.53102595", "0.5299469", "0.5293467", "0.5292586", "0.52836186", "0.52729917", "0.52715075", "0.52580255", "0.5246641", "0.52458787", "0.5227966", "0.5223427", "0.5223388", "0.5223037", "0.52195615", "0.51920277", "0.51897", "0.5185207", "0.51795805", "0.51782626", "0.5168545", "0.5165559", "0.5158401", "0.51530874", "0.5149929", "0.51495844", "0.51383513", "0.51373386", "0.5136659", "0.51361096", "0.51287127", "0.5121781", "0.5115734", "0.5114299", "0.5110732", "0.5105288", "0.5102784", "0.5098718", "0.509811", "0.509799", "0.50890136", "0.50863105", "0.5079924", "0.50760806", "0.50745445", "0.5060986", "0.5060304", "0.5057944", "0.5055059", "0.5045926", "0.5042669" ]
0.83517796
0
/ saveStaffList: writes all the fields of each individual Staff into the Staff.txt file
public void saveStaffList(String fileName) { try { BufferedWriter out = new BufferedWriter(new FileWriter(fileName)); out.write(maxStaff+"\r\n"); out.write(numStaff+"\r\n"); for (int i = 0; i < numStaff; i++) { if (staffList[i] instanceof Labourer) { out.write(staffList[i].toFile()); } else if (staffList[i] instanceof Manager) { out.write(staffList[i].toFile()); } } out.close(); } catch (IOException iox) { System.out.println("Error saving to " + fileName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeToEmployeeListFile()\r\n {\r\n\ttry(ObjectOutputStream toEmployeeListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/employeelist.dta\")))\r\n\t{\r\n toEmployeeListFile.writeObject(employeeList);\r\n employeeList.saveStaticEmpRunNr(toEmployeeListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Ansatt objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public void save() {\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(\"studentData.dat\");\n\n\t\t\tObjectOutputStream oos;\n\t\t\ttry {\n\t\t\t\toos = new ObjectOutputStream(fos);\n\n\t\t\t\toos.writeObject(studentList);\n\t\t\t\toos.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\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}\n\t\tSystem.out.println(\"File is finished writing to the hard drive\");\n\t}", "public void saveListToFile() {\r\n\t\ttry {\r\n\t\t\tObjectOutputStream oos = null;\r\n\t\t\ttry {\r\n\t\t\t\toos = new ObjectOutputStream(new FileOutputStream(FTP_LIST_FILE));\r\n\t\t\t\toos.writeObject(FTPList.self);\r\n\t\t\t\toos.flush();\r\n\t\t\t} finally {\r\n\t\t\t\toos.close();\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void saveAllVehiclesToFile(ArrayList<DeliveryVehicle> vehicleList) throws java.io.IOException {\n\n // write object to file\n FileOutputStream fos = new FileOutputStream(_filePath); //object to hold a file, e.g. EmployeeData.txt\n PrintStream writer = new PrintStream(fos); //object to write data\n\n //For loop to read each employee and write them to the file\n for(DeliveryVehicle vehicle : vehicleList){\n writer.println(vehicle);\n }\n\n writer.close();//close the writer\n fos.close();//close the file\n\n }", "public WriteToFile(List<Person> peopleList){\r\n\r\n try {\r\n // write over existing file if exists or create new\r\n FileWriter myWriter = new FileWriter(\"sorted-names-list.txt\", false);\r\n for (Person person: peopleList){\r\n // Get person name in order to append to text file\r\n String wholeName = person.getFirstName() + \" \" + person.getLastName();\r\n System.out.println(wholeName);\r\n myWriter.write(wholeName);\r\n myWriter.write(\"\\n\");\r\n }\r\n myWriter.close();\r\n System.out.println(\"Successfully wrote to the file.\");\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }", "private static void writeToStudentsFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(STUDENTS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tIterator<StudentDetails> iter = ALL_STUDENTS.listIterator(1); //Get all StudentDetails objects from index 1 of ALL_STUDENTS. This is because the value at index 0 is just a dummy student\n\t\twhile(iter.hasNext()){\n\t\t\tStudentDetails student = iter.next();\n\t\t\tbw.write(student.ParseForTextFile()); //writes the Parsed Form of the StudentDetails object to the students.txt file\n\t\t}\n\t\t\n\t\tbw.close();\n\t}", "public void writeStaffEntry(String firstName, String lastName, String userName)\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tPrintWriter out = new PrintWriter(new FileWriter(\"StaffEntryRecords.txt\", true));\r\n\t\t\tout.println(\"First Name: \" +firstName);\r\n\t\t\tout.println(\"Last Name: \" +lastName);\r\n\t\t\tout.println(\"Username: \" +userName);\r\n\t\t\tout.println(\" \");\r\n\t\t\tout.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: Cannot open file for writing\");\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: Cannot write to file\");\r\n\t\t}\r\n\t}", "private static void saveStudentsList(List<Student> students, File file) throws IOException {\n saveStudentsList(students, new FileOutputStream(file));\n }", "public void writeToBookingListFile()\r\n {\r\n\ttry(ObjectOutputStream toBookingListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/bookinglist.dta\")))\r\n\t{\r\n toBookingListFile.writeObject(bookingList);\r\n bookingList.saveStaticBookingRunNr(toBookingListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Booking objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "private void saveListToFile() {\n try {\n PrintStream out = new PrintStream(\n openFileOutput(LIST_FILENAME, MODE_PRIVATE)\n );\n\n for (int i = 0; i < listArr.size(); i++) {\n out.println(listArr.get(i));\n }\n\n out.close();\n\n } catch (IOException ioe) {\n Log.e(\"saveListToFile\", ioe.toString());\n }\n }", "public void saveTaskList(TaskList taskList) throws ChandlerException {\n try {\n FileWriter fileWriter = new FileWriter(filePath);\n for (int i = 0; i < taskList.getSize(); i++) {\n Task currTask = taskList.getIndex(i);\n fileWriter.write(currTask.getSavingString());\n }\n fileWriter.close();\n } catch (IOException e) {\n throw new ChandlerException(ui.saveDataError());\n }\n }", "public void save(List<Task> list) throws IOException {\n FileWriter writer = new FileWriter(file);\n StringBuilder output = new StringBuilder();\n for (Task t : list) {\n output.append(formatTask(t));\n output.append(\"\\n\");\n }\n writer.write(output.toString());\n writer.close();\n }", "public static void saveList(TaskList taskList) {\n try {\n FileWriter initialWriter = new FileWriter(\"duke.txt\");\n BufferedWriter myWriter = new BufferedWriter(initialWriter);\n for (int i = 0; i < taskList.size(); i++) {\n myWriter.write(taskList.getTask(i).typeChar() + \" \");\n myWriter.write(taskList.getTask(i).getStatusIcon() + \" \");\n if (taskList.getTask(i) instanceof Deadline || taskList.getTask(i) instanceof Events) {\n myWriter.write(taskList.getTask(i).getDesc() + \" \");\n myWriter.write(\"(\" + taskList.getTask(i).getBy() + \") \");\n } else {\n myWriter.write(taskList.getTask(i).getDesc() + \" \");\n }\n myWriter.newLine();\n }\n myWriter.close();\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "private static void saveToFile(ArrayList<Favourite> allFav) {\n\t\t\n\t\tBufferedWriter writer=null;\n\t\t\n\t\ttry {\n\t\t\twriter=new BufferedWriter(new FileWriter(Constants.KEY_FAV_FILE));\n\t\t\tString save=\"\";\n\t\t\tfor(Favourite f:allFav) {\n\t\t\t\tsave+=fileFormat(f);\n\t\t\t}\n\t\t\twriter.write(save);\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\n\t\t}finally{\n\t\tif(writer!=null){\n\t\t\ttry{\n\t\t\t\twriter.close();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\n\t\n}\n\n\t\t\n\t}", "private static void writeToFileEmployees() throws IOException {\n FileWriter write = new FileWriter(path2, append);\n PrintWriter print_line = new PrintWriter(write);\n for (int i = 0; i < RegisteredEmployees.listOfEmployees.size(); i++) {\n ArrayList<Integer> list = RegisteredEmployees.getEmployeeList();\n Integer ID = list.get(i);\n textLine = String.valueOf(ID);\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic void writeSerializedObject(List list) {\r\n\t\tFileOutputStream fos = null;\r\n\t\tObjectOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tfos = new FileOutputStream(System.getProperty(\"user.dir\") + \"\\\\Databases\\\\students.dat\");\r\n\t\t\tout = new ObjectOutputStream(fos);\r\n\t\t\tout.writeObject(list);\r\n\t\t\tout.close();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public static void writeFile ( LinkedList contactsList ) {\n\t\ttry {\n PrintWriter writer = new PrintWriter ( \"contacts.txt\" );\n for ( int row = 0; row < contactsList.size ( ); row++ ) {\n \t// this is basically a toString right here, adapted to the original contacts.txt\n \tString line = contactsList.get ( row ).getFirst ( ) + \",\" + contactsList.get ( row ).getLast ( ) + \",\" + contactsList.get ( row ).getPhone ( ) \n \t\t\t+ \",\" + contactsList.get ( row ).getAddress ( ) + \",\" + contactsList.get ( row ).getCity ( ) + \",\" + contactsList.get ( row ).getZip ( );\n writer.println ( line );\n }\n writer.close();\n } catch ( FileNotFoundException fnf ) {\n System.out.println(\"File was not found.\");\n }\n\t}", "private void chatSave() {\n try{\n //create a text file to write the chatList to\n PrintStream print =\n new PrintStream(new FileOutputStream(\"log.txt\", true));\n //write each line of the array to the file \n for (String str:chatList)\n print.println(str);\n //once each record has been written to the file, close it.\n print.close();\n } catch (IOException e) {\n // exception handling\n }\n }", "public void writeToFile(TaskList tasks) {\n try {\n FileWriter fw = new FileWriter(filePath);\n for (Task t : tasks.getListOfTasks()) {\n fw.write(t.getRecordString() + \"\\n\");\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Error writing to data file.\");\n }\n }", "public void saveToDoList() {\n try {\n jsonWriter.open();\n jsonWriter.write(toDoList);\n jsonWriter.close();\n\n System.out.println(\"Saved \" + toDoList.getName() + \" to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }", "public void saveAllLists() {\n // else: create \"ToDoList\" folder\n // Get all lists and their corresponding items via a while loop that loops\n // through the ComboBox's values and creates .txt files for each list\n // Create a new .txt of name list\n // This will need some sort of nested loop, the outer looping through the lists\n // and the inner looping through the items of that list\n // Store inside of the current .txt\n // Close the .txt\n }", "public void writeToServiceFile()\r\n {\r\n\ttry(ObjectOutputStream toServiceFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/servicelist.dta\")))\r\n\t{\r\n toServiceFile.writeObject(serviceList);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Service objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public static void writeAddressBookData(IOService ioService) {\n if (ioService.equals(com.AddressBook.IOService.CONSOLE_IO))\n System.out.println(\"Employee Payroll to Details : \" + list);\n if (ioService.equals(com.AddressBook.IOService.FILE_IO))\n new AddressBookFileIOService().writeData(list);\n }", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "public void saveFile(String fileName)\n {\n try\n {\n Formatter file = new Formatter(fileName);\n for (Item item: myList)\n {\n file.format(item.getFirstName() +\"\\n\" + item.getLastName() +\"\\n\"+ item.getPhoneNumber()+\"\\n\"+ item.getEmail()+\"\\n\");\n }\n file.close();\n }\n\n catch (Exception ex)\n {\n System.out.println(\"Error saving...\");\n }\n\n System.out.println(\"\");\n }", "public void save(TaskList taskings) {\n\n try {\n FileWriter fw = new FileWriter(\"./data/duke.txt\");\n for (Task task : taskings) {\n String listOfTasks = task.toString() + System.lineSeparator();\n fw.append(listOfTasks);\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Cannot save data to disk!\");\n e.printStackTrace();\n }\n }", "private void saveTasks() {\n try {\n Writer writer = new Writer(new File(TASKS_FILE));\n for (Task t1: todoList.getListOfTasks()) {\n writer.write(t1);\n }\n writer.close();\n System.out.println(\"Tasks saved to file \" + TASKS_FILE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to save tasks to \" + TASKS_FILE);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "private void writeToFile(List<Record> records) {\n try (\n FileWriter writer = new FileWriter(FILE_PATH);\n BufferedWriter bufferedWriter =\n new BufferedWriter(writer);\n PrintWriter out = new PrintWriter(bufferedWriter)\n\n ) {\n\n for (Record record : records) {\n out.format(\"%d;%s;%s;%s;%s;%s\\n\",\n record.getId(),\n record.getFirstName(),\n record.getLastName(),\n record.getPhone().getNumber(),\n record.getPhone().getType(),\n record.getCategory().getId());\n }\n// writer.close();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }", "public static void writeUsers(ArrayList<User> userList, \r\n String filename) throws IOException {\r\n File file = new File(filename);\r\n PrintWriter out = new PrintWriter(\r\n new FileWriter(file, false));\r\n for (User user: userList) {\r\n out.println(user); \r\n }\r\n out.close();\r\n }", "public void save(){\n\t\t\n\t\ttry {\n\t\t\t\t \n\t\t\t// Open Streams\n\t\t\tFileOutputStream outFile = new FileOutputStream(\"user.ser\");\n\t\t\tObjectOutputStream outObj = new ObjectOutputStream(outFile);\n\t\t\t\t \n\t\t\t// Serializing the head will save the whole list\n\t\t\toutObj.writeObject(this.head);\n\t\t\t\t \n\t\t\t// Close Streams \n\t\t\toutObj.close();\n\t\t\toutFile.close();\n\t\t}\n\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error saving\");\n\t\t}\n\t\t\t\n\t}", "public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }", "private void saveEmployee()\n {\n Employee tempEmployee = new Employee();\n String line = \"\";\n try\n {\n PrintWriter out = new PrintWriter(fileName);\n for(int i = 0; i < employees.size(); i++)\n {\n tempEmployee = (Employee) employees.get(i);\n line = tempEmployee.getName() + \",\" + tempEmployee.getHours() + \",\" +\n tempEmployee.getRate();\n out.println(line);\n }\n out.close(); \n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public void saveFile(TaskList tasklist) {\n try {\n String cwd = System.getProperty(\"user.dir\");\n FileWriter fw = new FileWriter(cwd + filePath);\n for (Task task : tasklist.getTasks()) {\n String data = task.getData();\n fw.write(data + System.lineSeparator());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Something went wrong: \" + e.getMessage());\n }\n\n }", "private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}", "void writeRecordsToFile(List<IRecord> recordList) throws IOException;", "public static void ser(ArrayList<Task> taskList) {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"taskList.ser\"); // create a space for serializing the ArrayList object\n ObjectOutputStream out = new ObjectOutputStream(fileOut); // object for serializing the ArrayList object\n out.writeObject(taskList); // writing/serializing the ArrayList object (has all the user's task variables)\n out.close(); // closing the serializing object\n fileOut.close(); // closing the serialized file\n System.out.println(\"Tasks saved.\"); // printing that the save was successful\n } catch (IOException ioe) { \n System.err.println(\"Java IO Exception: \" + ioe);\n }\n }", "public void StoreUsers(ArrayList<User> usersList) {\r\n\t\ttry {\r\n\t\t\tfw = new FileWriter(\".\\\\data\\\\users.txt\"); // writes data into\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \\\\data\\\\books.txt\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tfor (int i = 0; i < usersList.size(); i++) { // for loop will run\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// till\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the size of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// array\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// list usersList\r\n\t\t\t\tString content = \"\"; // Content is declared as String\r\n\t\t\t\tUser user = usersList.get(i); // Gets content of the array list\r\n\t\t\t\tcontent += user.getId() + \"::\"; // Gets ID of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getName() + \"::\"; // Gets Name of the Member and\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adds ::\r\n\t\t\t\tcontent += user.getNumBooksBorrowed() + \"::\"; // Gets Number of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Books\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Borrowed of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and adds ::\r\n\t\t\t\tcontent += user.getPhone() + \"::\"; // Gets Phone Number of the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Member and adds ::\r\n\t\t\t\tcontent += user.getreturndate() + \"\\n\"; // Gets Return Date of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the Member\r\n\r\n\t\t\t\tbw.write(content); // writes the content of the Members in the\r\n\t\t\t\t\t\t\t\t\t// text file\r\n\r\n\t\t\t}\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Complete storing all users!\", \"Store Users\",\r\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE); // confirms with a message that\r\n\t\t\t\t\t\t\t\t\t\t\t\t// the Members are stored\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null)\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\tif (fw != null)\r\n\t\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void writeToHotelRoomListFile()\r\n {\r\n\ttry(ObjectOutputStream toHotelRoomListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/hotelroomlist.dta\")))\r\n\t{\r\n toHotelRoomListFile.writeObject(hotelRoomList);\r\n hotelRoomList.saveStaticPrice(toHotelRoomListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Hotelrom objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public void writeData(ArrayList<Task> orderList) {\n try {\n FileWriter fw = new FileWriter(filePath, false);\n for (Task task : orderList) {\n fw.write(task.fileFormattedString() + \"\\n\");\n }\n fw.close();\n\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n }", "public void writeData(List<EmployeePayrollData> employeePayrollList) {\n\t\tStringBuffer empBuffer=new StringBuffer();\n\t\temployeePayrollList.forEach(employee->{\n\t\t\tString emloyeeDataString=employee.toString().concat(\"\\n\");\n\t\t\tempBuffer.append(emloyeeDataString); \n\t\t});\n\t\ttry {\n\t\t\tFiles.write(Paths.get(PAYROLL_FILE_NAME),empBuffer.toString().getBytes());\n\t\t}catch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void save(String fname, ArrayList<Tweet> tw) {\n\ttry {\n\t FileOutputStream fout = new FileOutputStream(fname);\n\t ObjectOutputStream oos = new ObjectOutputStream(fout);\n\t oos.writeObject(tw);\n\t oos.close();\n\t} catch (FileNotFoundException ex) {\n\t ex.printStackTrace();\n\t} catch (IOException ioex) {\n\t ioex.printStackTrace();\n\t}\n }", "public static void serializeUsers(ListOfAllUsers list) throws FileNotFoundException, IOException {\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\toos.writeObject(list);\n\t\toos.close();\n\t\t//System.out.println(\"Serialized.\");\n\t}", "private void saveMemberList () {\r\n\t\tStringBuffer\tmembers\t\t= new StringBuffer();\r\n\t\tboolean\t\t\taddSplit\t= false;\r\n\t\t\r\n\t\tfor (String member : this.members) {\r\n\t\t\tif (addSplit)\r\n\t\t\t\tmembers.append(splitMember);\r\n\t\t\tmembers.append(member);\r\n\t\t\taddSplit = true;\r\n\t\t}\r\n\t\t\r\n\t\tstorage.setString(namedStringMembers, members.toString());\r\n\t}", "public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }", "public static void writeData(List<User> users) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = new FileOutputStream(USER_SAVE_FILE_NAME, false);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(users);\n oos.close();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n if (fos != null && oos != null) {\n try {\n oos.close();\n fos.close();\n } catch (Exception ex) {\n Logger.getLogger(Utilities.UserDataIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n\n }\n }\n }", "public List<StaffPojo> viewAllStaff() {\n\t\treturn staffDao.viewAllStaff();\n\t}", "public void saveTasks() {\n try {\n BufferedWriter taskWriter = new BufferedWriter(new FileWriter(path));\n String tasks = \"\";\n for (Task task : TaskList.getTaskLists()) {\n tasks += task.toSaveString() + \"\\n\";\n }\n taskWriter.write(tasks);\n taskWriter.close();\n } catch (IOException e) {\n System.out.println(\"Sorry Boss, \" + e.getMessage());\n }\n }", "public void writeData(TaskList tasks) throws IOException {\n FileWriter fw = new FileWriter(file);\n String tmpTxt = \"\";\n\n if (tasks.getSize() > 0) {\n for (int i = 0; i < tasks.getSize() - 1; i++) {\n tmpTxt = tmpTxt + tasks.getDukeList().get(i).format() + \"\\n\";\n }\n tmpTxt = tmpTxt + tasks.getDukeList().get(tasks.getSize() - 1).format();\n }\n\n fw.write(tmpTxt);\n fw.close();\n }", "@Override\n\tpublic List<StaffDTO> getStaffList(int store_id) throws Exception {\n\t\treturn dao.listAll(store_id);\n\t}", "static public void addEmployeesToFile(Set<Employee> company){\n\t\tfor(Employee employee : company) {\n\t\t\ttry{\n\t\t\t\tFileWriter writer = new FileWriter(employee.getDepartment() + \".txt\", true); // second argument for appending\n\t\t\t\tBufferedWriter bw = new BufferedWriter(writer);\n\t\t\t\tPrintWriter out = new PrintWriter(bw);\n\t\t\t\tout.println(employee.toFileString());\n\t\t\t\tout.close();\n\t\t\t\tbw.close();\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t\tcatch (IOException ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void writeFavorites() {\n ArrayList<String> favorites = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favorites.add(landmark.toStringForOutput());\n }\n FileManager.writeLines(favoritesPath, favorites);\n }", "public void createNewFootballClub() {\n\n\n Scanner scan2 = new Scanner(System.in);\n\n System.out.print(\"Enter the club name : \");\n clubName = scan2.nextLine();\n System.out.print(\"Enter club location : \");\n clubLocation = scan2.nextLine();\n System.out.println(\"Enter Club Id : \");\n clubID = scan2.nextInt();\n\n //adding user data to the arraylist\n displayStatistics();\n footballClubArrayList.add(new FootballClub(clubName, clubLocation,clubID, date, numOfWins, numOfDraws, numOfDefeats, numOfGoalsScored, numOfGoalReceived, numOfPoints, numOfMatchesPlayed));\n\n //adding arraylist object to the file by fileoutput stream\n try {\n FileOutputStream fOutStr = new FileOutputStream(\"clubData.txt\");\n ObjectOutputStream objOutStr = new ObjectOutputStream(fOutStr);\n objOutStr.writeObject(footballClubArrayList);\n objOutStr.close();\n fOutStr.close();\n System.out.println(\"Club added Successfully\");\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static boolean writeToTextFile(String fname, //write to txt file - \n\t\t\t ArrayList<Cats> datapulled) {\n\t\t\t try {\n PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(fname)));\n\t\t\t for (Cats m: datapulled) {\n\t\t\t pw.println(m);\n\t\t\t }\n\t\t\t pw.close();\n\t\t\t return true;\n\t\t\t } catch (Exception ex) {\n\t\t\t return false;\n\t\t\t }\n\t\t\t }", "public static void write(String fname){\r\n\t\t\ttry {\r\n\t\t\t\tFile file = new File(fname);\r\n\t\t\t\t\r\n\t\t\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\t\t//establish variable str and call to write header row\r\n\t\t\t\tString str = \"Employee Name, Employee Number, State, Zip, Age, Sex\\n\";\r\n\t\t\t\tbw.write(str);\r\n\t\t\t\t//parse the array list and retrieve data for employees of age 30 or less\r\n\t\t\t\tfor(int i=0;i<data.size();i++){\r\n\t\t\t\t\tif(data.get(i).Age <= 30) {\r\n\t\t\t\t\t//call the information stored in the arraylist in each particular index and then call to write\r\n\t\t\t\t\tbw.write(data.get(i).Name+\",\"+data.get(i).Num + \",\" + data.get(i).State + \",\" + data.get(i).Zip + \",\" + data.get(i).Age + \",\" + data.get(i).Sex + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbw.close();\r\n\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Finish writing data to file \"+ fname);\r\n\t\t}", "private void saveIds(ArrayList<String> idList) {\n\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream = context.openFileOutput(\n\t\t\t\t\tSAVE_FILE, Context.MODE_PRIVATE);\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(\n\t\t\t\t\tfileOutputStream);\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tgson.toJson(idList, outputStreamWriter); // Serialize to Json\n\t\t\toutputStreamWriter.flush();\n\t\t\toutputStreamWriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveUsers() {\n FileWriter fileWriter = null;\n PrintWriter printWriter = null;\n try {\n fileWriter = new FileWriter(pathData);\n printWriter = new PrintWriter(fileWriter);\n if (users != null) {\n \n for (Map.Entry m : users.entrySet()) {\n printWriter.println(m.getKey() + spChar + m.getValue() + \"\\n\");\n }\n }\n printWriter.close();\n } catch (IOException e) {\n }\n }", "public static void saveData(ArrayList alr){\n List alw = new ArrayList();\n for (int i = 0; i < alr.size(); i++){\n Review review = (Review)alr.get(i);\n StringBuilder stb = new StringBuilder();\n stb.append(review.getMovieID());\n stb.append(SEPARATOR);\n stb.append(review.getEmail());\n stb.append(SEPARATOR);\n stb.append(review.getComment());\n alw.add(stb.toString());\n }\n try{\n write(filename, alw);\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n }", "public void write_adm_file()\n \t{\n \t\ttry \n \t\t{\n \t\t\tFile f1 = new File(\"adm1.txt\");\n \t\t\tFileOutputStream fileOut = new FileOutputStream(f1); \n \t\t\tAppendingObjectOutputStream objectOut = new AppendingObjectOutputStream(new ObjectOutputStream(fileOut));//used to append in the output stream\n Node<Admin> pos=adm_list.getFirst();\n while(pos!=null)\n {\n \tobjectOut.writeObject(pos.getData());//traversing the whole linked list data and writing into the stream\n \tpos=pos.getNext();\n }\n objectOut.flush();//flushing the stream\n objectOut.close();//closing streams\n fileOut.close();\n \t\t} \n \t\tcatch (IOException ex) \n \t\t{\n \n \t\t}\n }", "public List<Reservation> saveToFile() {\n\t\treturn rList;\n\t}", "public void writeFile(String file, SLList list) {\n\t\tObjectOutputStream o = null;\n\t\ttry {\n\t\t\to = new ObjectOutputStream(new FileOutputStream(file));\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\n\t\t/**\n\t\t * try/catch block to verify file has been written/created\n\t\t */\n\t\t\n\t\ttry {\n\t\t\to.writeObject(list);\n\t\t\tSystem.out.println(\"File Successfully Created!\");\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\ttry {\n\t\t\to.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 exportUserList() throws IOException {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(\r\n\t\t\t\tnew BufferedOutputStream(\r\n\t\t\t\t\t\tnew FileOutputStream(\"userList.dat\")));\r\n\t\tout.writeObject(userList);\r\n\t\tout.close();\r\n\t}", "public static void savePracticeListToFile()\n throws IOException {\n JSONArray wordsToSave = new JSONArray();\n\n for (Word word : getPracticedWords()) {\n Word word2 = word;\n wordsToSave.add(word2.wordToJSONObject());\n }\n\n try (FileWriter fileWriter = new FileWriter(\"src/practiceList.json\")) {\n fileWriter.write(wordsToSave.toJSONString());\n fileWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void writeFile(List<Task> database) {\r\n assert database != null: \"Storage.writeFile(): database cannot be null\";\r\n File dir = new File(\"./tmp/data\");\r\n try {\r\n FileWriter fw = new FileWriter(new File(dir, \"storage.txt\"));\r\n for (Task task : database) {\r\n assert task != null: \"Storage.writeFile(): task to be added cannot be null\";\r\n fw.write(task.serialize() + \"\\n\");\r\n }\r\n fw.close();\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public void FileWrite(Nimsys nimSys,ArrayList<Player> list)throws IOException{\r\n\t\tOutputStream out = new FileOutputStream(\"players.dat\");\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile(aa.hasNext()){ //each line includes the information below related to the players\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tout.write(in.getUserName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getSurName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getGivenName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getGamePlay()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getWinGame()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getID()).getBytes());\r\n\t\t\tout.write('\\r');\r\n\t\t}\r\n\t}", "public void getList() {\n\n\t\tFile opFile = new File(\"/home/bridgeit/Desktop/newfile.txt\");\n\t\ttry {\n\t\t\topFile.createNewFile();\n\t\t\tFileWriter fwriter = new FileWriter(opFile);\n\n\t\t\tfor (int i = 0; i < slist.size(); i++) {\n\n\t\t\t\tfwriter.append(slist.returnItem(i) + \" \");\n\n\t\t\t}\n\t\t\tfwriter.close();\n\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}", "public void saveWords (ArrayList <String> list) {\n if (chooser.showSaveDialog (null) == JFileChooser.APPROVE_OPTION) {\n File newFile = chooser.getSelectedFile ();\n try {\n BufferedWriter buffer = new BufferedWriter (new FileWriter (newFile));\n for (String word : list) {\n buffer.write (word + \"\\n\");\n }\n buffer.close ();\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "private void writeToFile(File contactsFile) {\n\n try (BufferedWriter out = new BufferedWriter(new FileWriter(contactsFile))) {\n List<String> lines = new ArrayList<>();\n\n for (User user : contacts) {\n String line = user.getUserId() + \"|\" + user.getFirstName() + \"|\" + user.getLastName() + \"|\" + user.getEmail() + \"|\" +\n user.getAge() + \"|home_\" + user.getPhoneNumbers().get(\"home\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"home\").getNumber() + \",mobile_\" +\n user.getPhoneNumbers().get(\"mobile\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"mobile\").getNumber() + \",work_\" +\n user.getPhoneNumbers().get(\"work\").getCountryCode() + \"_\" +\n user.getPhoneNumbers().get(\"work\").getNumber() + \"|\" + user.getAddress().getStreetName() + \",\" +\n user.getAddress().getStreetNumber() + \",\" + user.getAddress().getApartmentNumber() + \",\" +\n user.getAddress().getFloor() + \",\" + user.getAddress().getZipCode() + \",\" +\n user.getAddress().getCity() + \",\" + user.getAddress().getCountry() + \"|\" +\n user.getJobTitle() + \"|\" + user.getCompany().getName() + \"_\" +\n user.getCompany().getAddress().getStreetName() + \",\" +\n user.getCompany().getAddress().getStreetNumber() + \",\" +\n user.getCompany().getAddress().getApartmentNumber() + \",\" +\n user.getCompany().getAddress().getFloor() + \",\" +\n user.getCompany().getAddress().getZipCode() + \",\" +\n user.getCompany().getAddress().getCity() + \",\" +\n user.getCompany().getAddress().getCountry() + \"|\" +\n user.isFavorite();\n\n lines.add(line);\n\n }\n\n for (String line : lines) {\n out.write(line);\n out.newLine();\n }\n\n } catch (FileNotFoundException ex) {\n System.out.println(\"File not found \" + contactsFile + \"\\n\" + ex);\n } catch (IOException ex) {\n System.out.println(\"Failed to write content to file \" + contactsFile + \"\\n\" + ex);\n }\n\n\n }", "public void SerialiseList() throws IOException {\n ObjectOutputStream oStream = null;\n\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"Warehouses\" + \".dat\"));\n oStream.writeObject(Wlist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"Stores\" + \".dat\"));\n oStream.writeObject(Slist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"WarehouseAdminList\" + \".dat\"));\n oStream.writeObject(WAlist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n try {\n oStream = new ObjectOutputStream(new FileOutputStream(\"StoreAdminList\" + \".dat\"));\n oStream.writeObject(SAlist);\n System.out.println(\"File saved\");\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n oStream.close();\n }\n }", "public void writeToRestaurantFile()\r\n {\r\n\ttry(ObjectOutputStream toRestaurantFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/restaurant.dta\")))\r\n\t{\r\n toRestaurantFile.writeObject(restaurant);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Restaurant objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public void writeList() {\n try{\n PrintWriter out = new PrintWriter(new FileWriter(\"OutFile.txt\"));\n\n for (int i = 0; i < SIZE; i++) {\n // The get(int) method throws IndexOutOfBoundsException, which must be caught.\n out.println(\"Value at: \" + i + \" = \" + list.get(i));\n }\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void saveTaverns(ArrayList<Tavern> list){\n for (int i = 0; i < list.size(); i++){\n mapper.save(list.get(i));\n }\n }", "@Override\r\n\tpublic Staff save(Staff entity) {\n\t\treturn staffDao.save(entity);\r\n\t}", "public void loadStaffList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxStaff = Integer.parseInt(in.readLine());\n staffList = new Staff[maxStaff];\n int numStaffInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numStaffInFile; i++){\n \n String staffType = in.readLine();\n if (staffType.equals(\"Labourer\")) {\n staffList[i] = new Labourer(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()));\n numStaff++;\n } else if (staffType.equals(\"Manager\")) /*;*/\n {\n staffList[i] = new Manager(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()));\n numStaff++;\n }\n }\n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n \n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "private void saveList() throws Exception {\n JournalEntries.saveList(JournalList,ReconcileCur.ReconcileNum);\n }", "public static void writeUserFile(List<User> List) {\n\t\ttry {\n\t\t\tObjectOutputStream writeFile = new ObjectOutputStream(new FileOutputStream(userFile));\n\t\t\twriteFile.writeObject(List);\n\t\t\twriteFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void saveSklepToFile(String fileName) throws Exception {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));\r\n\t\tout.writeObject(listOfAccounts);\r\n\t\tout.close();\r\n\t}", "@Override\n public boolean writeListDataToFile(String filePath, List<AccountModel> accounts, boolean isAppend) {\n if (accounts.size() < 1) {\n return false;\n }\n // if has datas to write\n PrintWriter pw = null;\n try {\n pw = new PrintWriter(new BufferedWriter(new FileWriter(filePath, isAppend)));\n for (AccountModel a : accounts) {\n pw.println(a.formatData());\n }\n } catch (IOException ex) {\n System.err.println(ex);\n } finally {\n BaseFileIO.close(pw);\n }\n return pw != null;\n }", "public void saveAll(List list);", "public void saveData(ArrayList<Task> tasks) {\r\n try {\r\n writeToFile(tasks);\r\n } catch (IOException exception) {\r\n ui.printIoExceptionErrorMessage(exception);\r\n }\r\n }", "public void saveToFile()\n\t{\t\n\t\tsetCourseToFileString(courseToFileString);\n\t\t\ttry \n\t {\n\t FileWriter fw = new FileWriter(fileName);\n\t fw.write (this.getCourseToFileString ( ));\n\t for(Student b : this.getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t}", "private void saveJobList() {\n\t\tFileLoader.saveObject(getApplicationContext(), FILE_NAME_JOBS, (Serializable) jobs);\n\t}", "public void readStaffEntry()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner reader = new Scanner(new FileReader(\"StaffEntryRecords.txt\"));\r\n\t\t\twhile (reader.hasNext())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(reader.nextLine());\r\n\t\t\t}\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"FileNotFoundException\");\r\n\t\t}\r\n\t}", "public void closeFile()\n {\n ArrayList<String> jobs = new ArrayList<String>();\n ArrayList<String> jobRecruiters = new ArrayList<String>();\n ArrayList<String> jobSeekers = new ArrayList<String>();\n ArrayList<String> notifications = new ArrayList<String>();\n for (Job job : jobList)\n {\n String jobinfo = job.getJobRecruiterUsername() + \"///\" + job.getTitle() + \"///\" + job.getDescription() + \"/// \" + job.getSalary();\n jobinfo = jobinfo + \"///\" + job.getLocation() + \"///\";\n for (String cate: job.getCategory())\n {\n jobinfo = jobinfo + cate + \",\";\n }\n jobinfo = jobinfo.substring(0,jobinfo.length()-1) + \"///\";\n for (String seek : job.getJobSeekerUsername())\n {\n jobinfo = jobinfo + seek + \",\";\n }\n jobinfo = jobinfo.substring(0,jobinfo.length()-1);\n jobs.add(jobinfo);\n }\n writeFile(\"Job.txt\", jobs);\n for (JobRecruiter recruiter : jobRecruiterList)\n {\n String recinfo = recruiter.getName() + \",\" + recruiter.getUserName() + \",\" + recruiter.getRole() + \",\" + recruiter.getGender() + \",\";\n recinfo = recinfo + recruiter.getEmail() + \",\" + recruiter.getPassword() + \",\" + recruiter.getCompanyName() + \",\" + recruiter.getLocation();\n jobRecruiters.add(recinfo);\n }\n writeFile(\"JobRecruiter.txt\", jobRecruiters);\n for (JobSeeker seeker : jobSeekerList)\n {\n String seekinfo = seeker.getName() + \",\" + seeker.getUserName() + \",\" + seeker.getRole() + \",\" + seeker.getGender() + \",\";\n seekinfo = seekinfo + seeker.getEmail() + \",\" + seeker.getPassword() + \",\";\n for(String skill : seeker.getSkillsets())\n {\n seekinfo = seekinfo + skill + \",\";\n }\n seekinfo = seekinfo.substring(0,seekinfo.length()-1);\n String notinfo = seeker.getUserName() + \"///\";\n for (String noti : seeker.getNotification())\n {\n notinfo = notinfo + noti + \",\";\n }\n notinfo = notinfo.substring(0,notinfo.length()-1);\n jobSeekers.add(seekinfo);\n notifications.add(notinfo);\n }\n writeFile(\"JobSeeker.txt\", jobSeekers);\n writeFile(\"Notification.txt\", notifications);\n }", "public static void save(List<User> pdApp) throws IOException {\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(storeDir + File.separator + storeFile));\n oos.writeObject(pdApp);\n oos.close();\n }", "public void save() throws FileNotFoundException {\n PrintWriter myWriter = new PrintWriter(\"duke.txt\");\n for (Task t : TaskList.getTasklist()) {\n myWriter.println(t.toString());\n }\n myWriter.flush();\n myWriter.close();\n }", "public static void writeToFile(String fileName, ArrayList<String> linesList) throws IOException\n {\n PrintWriter printWriter = new PrintWriter(new FileWriter(fileName));\n for(String currentLine : linesList)\n {\n printWriter.println(currentLine);\n }\n printWriter.close();\n }", "public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, finalsTerm);\n }\n }", "public static void saveData(ArrayList<String> dataList, char[][]wordSoup){\r\n // Create File\r\n try {\r\n File myObj = new File(\"sdl_01.txt\");\r\n myObj.createNewFile();\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n \r\n // Write data to file\r\n try {\r\n FileWriter myWriter = new FileWriter(\"sdl_01.txt\");\r\n // Data writing\r\n int size = wordSoup.length;\r\n for(int i = 0 ; i < size ; i++) {\r\n\t \tfor(int j = 0 ; j < size ; j++) {\r\n\t \t\tmyWriter.write(wordSoup[i][j]);\r\n System.out.print(wordSoup[i][j]);\r\n\t \t}\r\n\t \tmyWriter.write(\"\\n\");\r\n System.out.print(\"\\n\");\r\n\t }\r\n size = dataList.size();\r\n for(int i = 0 ; i < size ; i++) {\r\n myWriter.write(dataList.get(i) + \"\\n\");\r\n System.out.print(dataList.get(i) + \"\\n\");\r\n }\r\n myWriter.close();\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "public void saveMealPlanner(){\n Data.<Days>saveList(ObservableWeekList, mealPlannerFile);\n }", "private static void writeToBooksFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(BOOKS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tSet<Integer> keys = ALL_BOOKS.keySet(); //returns list of all keys in ALL_BOOKS\n\t\tfor(int key : keys){\n\t\t\tbw.write(ALL_BOOKS.get(key).ParseForTextFile()); //writes the Parsed Form of the BookDetails object to the books.txt file\n\t\t}\n\t\tbw.close();\n\t}", "public static void writeApp(ObservableList<User> myUsers) throws IOException{\n \tFileOutputStream fos = new FileOutputStream(storeFile);\n\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\tfor(User x : myUsers) {\n\t\t\toos.writeObject(x.toString());\n\t\t}\n\t}", "private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}", "public void writeToConferenceRoomListFile()\r\n {\r\n\ttry(ObjectOutputStream toConferenceRoomListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/conferenceroomlist.dta\")))\r\n\t{\r\n toConferenceRoomListFile.writeObject(conferenceRoomList);\r\n conferenceRoomList.saveStaticPrice(toConferenceRoomListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Konferanserom objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "private void writeToFile(ArrayList<Task> tasks) throws IOException {\r\n FileWriter fileWriter = new FileWriter(filePath);\r\n for (Task task : tasks) {\r\n Parser fileFormatter = new ParseToFileFormat(task);\r\n String taskData = fileFormatter.getFileFormat();\r\n fileWriter.write(taskData);\r\n }\r\n fileWriter.close();\r\n }", "@Override\n public void save(String fileName){\n FileWriter addEmployeeDetails = null;\n\n try{\n addEmployeeDetails = new FileWriter(fileName,true);\n addEmployeeDetails.append(getUsername());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPassword());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getFirstname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getLastname());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(DMY.format(getDoB()));//format,convert,save\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getContactNumber());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getEmail());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(String.valueOf(getSalary()));\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.append(getPositionStatus());\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n //************Saves the address in the file.****************\n homeAddress.save(addEmployeeDetails);\n //**********************************************************\n addEmployeeDetails.append(\"$$$\");\n addEmployeeDetails.append(System.getProperty(\"line.separator\"));\n addEmployeeDetails.close();\n addEmployeeDetails = null;\n\n }//end try\n catch (IOException ioe){}//end catch\n }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "public void saveAddressBook(File file) {\r\n try {\r\n FileWriter fw = new FileWriter(file);\r\n PrintWriter pw = new PrintWriter(fw);\r\n // inserts all the contacts with each field on a line by line basis\r\n for (AddressEntry current : contacts) {\r\n pw.println(current.getName());\r\n pw.println(current.getPostalAddress());\r\n pw.println(current.getPhoneNumber());\r\n pw.println(current.getEmail());\r\n pw.println(current.getNote());\r\n }\r\n pw.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void save(List<Task> changed){\n\n try {\n FileWriter fw = new FileWriter(path);\n for (int i = 0; i < changed.size(); i++) {\n\n String temp = (i+1) + \".\" + changed.get(i).list() + System.lineSeparator();\n fw.write(temp);\n }\n fw.close();\n }catch(IOException e){\n e.printStackTrace();\n }\n }", "public void writeToFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\ProjectModify\\\\src\\\\Railway.txt\");\r\n\t\t\tFileWriter fw = new FileWriter(f);\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\t\tif(persons[i] != null){\r\n\t\t\t\t\tfw.write(\"Name :\" +persons[i].getName());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Phone Number :\"+persons[i].getPhn()); \r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Age :\"+persons[i].getAge());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Train Name :\"+persons[i].getStrain());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Destination :\"+persons[i].getDestination());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Starting Point :\"+persons[i].getStpoint());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Seat Class :\"+persons[i].getSclass());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Fare :\"+persons[i].getFare());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfw.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public static void writeTo(String filename, List<User> users){\r\n\t\tPrintWriter pw=null;\r\n\t\ttry{\r\n\t\t\tpw=new PrintWriter(new FileOutputStream(new File(filename),false));//false because don't append,\r\n\t\t\tfor(User user : users){//it replaces all with new updated data\r\n\t\t\t\tpw.write(user+\"\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tpw.close();\r\n\t\t}\r\n\t}" ]
[ "0.6917118", "0.65708846", "0.654917", "0.6548997", "0.65142286", "0.6473535", "0.64456284", "0.6344435", "0.633824", "0.63309485", "0.62539643", "0.62380934", "0.6224446", "0.61970377", "0.6180114", "0.614894", "0.61474764", "0.6147181", "0.612744", "0.6107853", "0.6107577", "0.61067057", "0.6103236", "0.60832727", "0.6064935", "0.6052234", "0.6050767", "0.60404783", "0.6040265", "0.6030319", "0.6026532", "0.5979072", "0.5978912", "0.5961174", "0.5949075", "0.5935112", "0.5915332", "0.587733", "0.58555555", "0.5846499", "0.5841932", "0.58357215", "0.5818745", "0.5804851", "0.5799199", "0.57834685", "0.5773485", "0.5748471", "0.57400876", "0.5731597", "0.57270664", "0.57137704", "0.5708691", "0.5702658", "0.57023877", "0.5691115", "0.5690401", "0.56827486", "0.5679554", "0.56771755", "0.5677025", "0.56743085", "0.56742364", "0.5670353", "0.56693584", "0.5665939", "0.5658764", "0.56514126", "0.564863", "0.5647546", "0.5647457", "0.5643657", "0.56413925", "0.56394833", "0.5633617", "0.563137", "0.56219465", "0.5618231", "0.5617762", "0.5617618", "0.5616816", "0.5608733", "0.5602126", "0.5583226", "0.55816394", "0.5577092", "0.5559241", "0.5547301", "0.55411017", "0.554069", "0.5538249", "0.5534037", "0.55332154", "0.55286777", "0.5527857", "0.55263484", "0.5525019", "0.5518672", "0.5513284", "0.55073404" ]
0.78100073
0
/ Searching Algorithms There are two different findStaff methods; one searches the array using the staffNum (id) of the staff. Both methods use the binary search recursively. Returns a staff object or null if the staff doesn't exist.
public Staff findStaff(int staffNum, int start, int end) { //because recursive int mid = (start + end) / 2; if (end - start > 1) { if (findStaff(staffNum, start, mid) != null) { return findStaff(staffNum, start, mid); } else { return findStaff(staffNum, mid, end); } } else { if (staffList[start].getStaffNum() == staffNum) { return staffList[start]; } else if (staffList[end].getStaffNum() == staffNum) { return staffList[end]; } else { return null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Staff findStaff(String staffName, int start, int end) { //because recursive\n int mid = (start + end) / 2;\n if (end - start > 1) {\n if (findStaff(staffName, start, mid) != null) {\n return findStaff(staffName, start, mid);\n } else {\n return findStaff(staffName, mid, end);\n }\n } else {\n if (staffList[start].getStaffName().equals(staffName)) {\n return staffList[start];\n } else if (staffList[end].getStaffName().equals(staffName)) {\n return staffList[end]; \n } else {\n return null; \n }\n }\n }", "public Staff searchStaff() { //takes in inputs from user find a Staff\n while (true) { //will keep looping util returns a value\n System.out.print(\"Search by entering Name or Employee Number: \");\n String findEmp = \"\"; \n try {\n findEmp = sc.nextLine();\n if (findStaff(Integer.parseInt(findEmp), 0, numStaff - 1) != null) { //if can parse search for emp num\n return findStaff(Integer.parseInt(findEmp), 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n } catch (NumberFormatException NFX) { //if cannot parse search for emp name\n if (findStaff(findEmp, 0, numStaff - 1) != null) {\n return findStaff(findEmp, 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n }\n }\n }", "private Staff findById(String id) throws Exception{\n if(StringUtils.isBlank(id) || StringUtils.equalsIgnoreCase(id, \"0\"))\n throw new Exception(\"Invalid staff id\");\n\n try{\n Staff staff = this.em.find(Staff.class, Integer.parseInt(id));\n if(staff == null)\n throw new Exception(\"Staff not found\");\n else\n return staff;\n\n }catch (IllegalArgumentException ex){\n throw new Exception(\"Provide a valid staff entity or primary key\");\n }\n }", "@Override\r\n\tpublic Staff findOne(Long id) {\n\t\treturn staffDao.findOne(id);\r\n\t}", "public StaffPojo staffSearchById(String sid) {\n\t\treturn staffDao.staffSearchById(sid);\n\t}", "public List<StaffPojo> staffSearchByPhoneNo(String sphone) {\n\t\treturn staffDao.staffSearchByPhoneNo(sphone);\n\t}", "public List<StaffPojo> staffSearchByName(String sname) {\n\t\treturn staffDao.staffSearchByName(sname);\n\t}", "public List<Staff> searchStaff(String searchString) {\n\t\t\n\t\tArrayList<Staff> result = new ArrayList<Staff>();\n\t\t\n\t\tSQLiteDatabase db = mDbHelper.getReadableDatabase();\n\t\tCursor cursor;\n\t\t\n\t\tStaff staff;\n\t\t\n\t\tcursor = db.rawQuery(\"SELECT a.id, a.name, password_ as pwd, mobile, phone, organization_id, \"\n\t\t\t\t + \" department_id, position_id, b.name as position_name \"\n + \"FROM staff a, position_ b \"\n + \"WHERE (a.name like '%\" + searchString + \"%' OR mobile like '%\" + searchString \n + \"%' OR phone like '%\" + searchString + \"%') AND a.position_id = b.id \" \n\t\t + \" AND is_warrant = '1' AND is_departure = '0' AND is_hipe = '0' \", null);\n\t\t\n\t\twhile (cursor.moveToNext()) {\n\t\t\t\n\t\t\tstaff = new Staff();\n\t\t\t\n\t\t\tstaff.setId(cursor.getInt(cursor.getColumnIndex(\"id\")));\n\t\t\tstaff.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n\t\t\tstaff.setPwd(cursor.getString(cursor.getColumnIndex(\"pwd\")));\n\t\t\tstaff.setMobile(cursor.getString(cursor.getColumnIndex(\"mobile\")));\n\t\t\tstaff.setPhone(cursor.getString(cursor.getColumnIndex(\"phone\")));\n\t\t\tstaff.setOrganizationId(cursor.getInt(cursor.getColumnIndex(\"organization_id\")));\n\t\t\tstaff.setDepartmentId(cursor.getInt(cursor.getColumnIndex(\"department_id\")));\n\t\t\tstaff.setPositionId(cursor.getInt(cursor.getColumnIndex(\"position_id\")));\n\t\t\tstaff.setPositionName(cursor.getString(cursor.getColumnIndex(\"position_name\")));\n\t\t\tstaff.setSelected(false);\n\t\t\t\n\t\t\tresult.add(staff);\n\t\t}\n\t\t\n\t\tcursor.close();\n\t\tdb.close();\n\t\t\n\t\treturn result;\n\t}", "public ID getStaffID() {\r\n\t\t\t\r\n\t\t\treturn staffID;\r\n\t\t}", "public Staff findStaff(String email, String password) throws SQLException {\n //Find if the staff exists in the CUSTOMER TABLE\n String fetch =\"select * from IOTBAY.STAFF where EMAIL='\" + email + \"' and PASSWORD = '\" + password + \"'\";\n ResultSet rs = st.executeQuery(fetch);\n \n while(rs.next()) //goes through every row in the STAFF table\n {\n String staffEmail = rs.getString(4);\n String staffPass = rs.getString(7);\n if (staffEmail.equals(email) && staffPass.equals(password)){\n //number corresponds to the columns of the STAFF table\n String staffName = rs.getString(2);\n String staffDob = rs.getString(3);\n String staffNumber = rs.getString(5);\n String staffAddress = rs.getString(6);\n return new Staff (staffName, staffDob, staffNumber, staffEmail, staffAddress, staffPass);\n }\n }\n return null;\n }", "@Override\n\tpublic StaffVO readStaff(int staff_id) throws Exception {\n\t\treturn dao.read(staff_id);\n\t}", "public StaffPath staff() {\n if (_staff == null)\n _staff = new StaffPath(this, Keys.PAYMENT_P2007_03__PAYMENT_P2007_03_STAFF_ID_FKEY, null);\n\n return _staff;\n }", "@GET\r\n\t@Path(\"{id}\")\r\n\t@Produces(\"application/JSON\")\r\n\tpublic ZooStaff getStaffById(@PathParam(\"id\")int id) {\r\n\t\treturn service.getStaffById(id);\r\n\t}", "public int getStaffID() {\r\n\t\treturn staffID;\r\n\t}", "public Student find(int id) {\n\n\t\tfor (int i = 0; i < studentList.size(); i++) {\n\t\t\tif (studentList.get(i).getId() == id) {\n\t\t\t\treturn studentList.get(i);\n\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\n\t}", "public void searchStaff(String searchTxt) {\n assertAndType(xpathSearchTF, searchTxt);\n clickOnBtn(SEARCH_A_STAFF);\n logger.info(\"# Performed staff search for '\" + searchTxt + \"'\");\n }", "public Staff getStaffById(int patientId) {\n\t\treturn null;\n\t}", "public Region findRegion(Staff find) {\n for (int i = 0; i < numRegions; i++) {\n Staff[] temp = regionList[i].getRegionStaff();\n for (int j = 0; j < regionList[i].getRegionSpec().getNumStaff(); j++) {\n if (temp[j].equals(find)) {\n return regionList[i]; \n }\n }\n }\n return null;\n }", "@Override\n public com.ext.portlet.model.StaffMember getStaffMember(long id)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n return _staffMemberLocalService.getStaffMember(id);\n }", "public Student findStudent(String firstName, String lastName)\n\t{\n\t\tStudent foundStudent = null;\t\n\t\tfor(Student b : classRoll)\n\t\t{\n\t\t\t\n\t\t\tif (b.getStrNameFirst ( ) != null && b.getStrNameFirst().contains(firstName))\n\t\t\t{\n\t\t\t\tif(b.getStrNameLast ( ) != null && b.getStrNameLast().contains(lastName))\n\t\t\t\t{\n\t\t\t\t\tfoundStudent = b;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn foundStudent;\n\t}", "private static void searchStaffByName(){\n\t\tshowMessage(\"type the name you are looking for: \\n\");\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listEmployee(EmployeeSearch.employee(employee.getAllEmployee(),name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n //if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchStaffByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t}", "public List<Staff> findAllStaffMembers(){\n\t\treturn staffRepository.findAll();\n\t}", "public Student searchStudent(String id) {\n\t\tfor (String key : list.keySet()) {\n\t\t\tif(id.equals(key))\n\t\t\t\treturn list.get(key);\n\t\t}\n\t\treturn null;\n\t}", "public void setStaffID() {\r\n\t\t\t staffID = IDFactory.getID(\"ST\");\r\n\t\t}", "public List<StaffDTO> findByiDNumber(String iDNumber);", "@Override\n\tpublic Staff selectByPrimaryKey(Integer id) {\n\t\treturn staffMapper.selectByPrimaryKey(id);\n\t}", "public Student searchForStudent(int ID)\r\n {\r\n boolean found = false;\r\n Student student = null;\r\n Node currentNode = first_node;\r\n\r\n while(!found && currentNode != null)\r\n {\r\n if(currentNode.getData().getStudent_ID() == ID)\r\n {\r\n found = true;\r\n student = currentNode.getData();\r\n }\r\n else\r\n {\r\n currentNode = currentNode.getNextNode();\r\n }\r\n }\r\n return student;\r\n }", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public Staff2 ()\n {\n staffList = new StaffMember2[8];\n\n staffList[0] = new Executive2 (\"Sam\", \"123 Main Line\",\n \"555-0469\", \"123-45-6789\", 2423.07);\n\n staffList[1] = new Employee2 (\"Carla\", \"456 Off Line\",\n \"555-0101\", \"987-65-4321\", 1246.15);\n staffList[2] = new Employee2 (\"Woody\", \"789 Off Rocker\",\n \"555-0000\", \"010-20-3040\", 1169.23);\n\n staffList[3] = new Hourly2 (\"Diane\", \"678 Fifth Ave.\",\n \"555-0690\", \"958-47-3625\", 10.55);\n\n staffList[4] = new Volunteer2 (\"Norm\", \"987 Suds Blvd.\",\n \"555-8374\");\n staffList[5] = new Volunteer2 (\"Cliff\", \"321 Duds Lane\",\n \"555-7282\");\n\n staffList[6] = new Commission (\"Ron\", \"546 Mainland Dr.\",\n \t\"555-8141\", \"547-87-9845\", 11.75, .20);\n staffList[7] = new Commission (\"Sammy\", \"180 Barkley Lane\",\n \t\"555-6256\", \"695-14-3824\", 14.50, .15);\n\n ((Executive2)staffList[0]).awardBonus (500.00);\n\n ((Commission)staffList[6]).addHours(35);\n ((Commission)staffList[6]).addSales(400);\n\n ((Commission)staffList[7]).addHours(40);\n ((Commission)staffList[7]).addSales(950);\n\n ((Hourly2)staffList[3]).addHours (40);\n }", "@Override\n\tpublic List<UserStaffDTO> readStaffByUserId(int user_id) throws Exception {\n\t\treturn dao.readStaffByUserId(user_id);\n\t}", "public void setStaffID(int staffID) {\r\n\t\tthis.staffID = staffID;\r\n\t}", "public Employee SearchEmployee(int idEmployee)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) return emp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Student findStudent(int id);", "public static Person findID(ArrayList<Member> testMember, int inputID) {\n\t\tfor(int i = 0; i < testMember.size(); i++) {\n\t\t\tif(inputID == testMember.get(i).getID()) {\n\t\t\t\treturn testMember.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Patient[] findID(String sv)\r\n\t{\r\n\t\tPatient[] foundPatients = new Patient[999];//Creates a blank array\r\n\t\tint count = 0;\r\n\r\n\t\tfor(int i=0; arrayPatients[i]!=null ;i++)//loops through the array\r\n\t\t{\r\n\t\t\tif(arrayPatients[i].forename.contains(sv)||arrayPatients[i].surname.contains(sv))//sees if either surname or firstname contain the search term allowing for partieal searching\r\n\t\t\t{\r\n\t\t\t\tfoundPatients[count] = arrayPatients[i];//if found it adds the patient to an array\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn foundPatients;//that array is then returned\r\n\t}", "public static native int Find(long lpjFbxArrayVector2, long pElement, int pStartIndex);", "@Override\n\tpublic Employee findById(int id) {\n\t\tList<Employee> employeeList= \n\t\tlistEmployee().stream().filter((e -> e.getId()==id)).collect(Collectors.toList());\n\t\t\n\t\treturn (Employee)employeeList.get(0);\n\t}", "public Employee findById(int id) throws InvalidOperationException {\n try {\n return employeeArray[id];\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error finding employee \", e);\n }\n }", "@Override\n\tpublic int updateStaff(int staff_id) throws Exception {\n\t\treturn dao.update(staff_id);\n\t}", "private BonusMember findMember(int memberNo) {\n\t\tfor (BonusMember member : members) {\n\t\t\tif (member.getMemberNo() == memberNo)\n\t\t\t\treturn member;\n\t\t}\n\t\treturn null;\n\t}", "public int find(Base[] subseq)\n {\n return find(subseq, 0);\n }", "public NodeList<T> search(T info){\n NodeList<T> f = first;\n\n while (f != null){\n if(f.getInfo().equals(info)){\n return f;\n }\n f = f.getNext();\n }\n return null;\n }", "private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }", "Contact searchContact(String searchName){\n for(int i = 0; i < friendsCount; i++){\n if(myFriends[i].name.equals(searchName)){\n return myFriends[i];\n }\n }\n return null;\n }", "public abstract ArrayList<T> findFromReference(int id);", "public static int search(Student[] student,int studentID){\n for(int i=0;i<student.length;i++){\n if(student[i].getStudentID()==studentID){\n return i;\n } \n }\n return -1;//if there is not student id in array,this result will be -1\n }", "@GetMapping(\"/{staffId}\")\n\tpublic ResponseEntity<?> viewStaff(@PathVariable(\"staffId\") int sid) {\n\t\tUniversityStaffMember staff = universityService.viewStaff(sid);\n\t\tif (staff == null)\n\t\t\tthrow new DataNotFoundException(\"Request\", \"Staff with id \" + sid + \" not found\");\n\t\telse\n\t\t\treturn new ResponseEntity<UniversityStaffMember>(staff, HttpStatus.OK);\n\t}", "@PutMapping\n\tpublic String updateStaff(@Valid @RequestBody UniversityStaffMember staff) {\n\t\tif (universityService.updateStaff(staff))\n\t\t\treturn \"Staff data updated\";\n\t\telse\n\t\t\tthrow new DataNotFoundException(\"Update\", \"Staff with id \" + staff.getStaffId() + \" not found\");\n\t}", "@Override\r\n public Staff getStaff ()\r\n {\r\n if (super.getStaff() == null) {\r\n if (!getNotes().isEmpty()) {\r\n Note note = (Note) getNotes().get(0);\r\n setStaff(note.getStaff());\r\n }\r\n }\r\n\r\n return super.getStaff();\r\n }", "public int searchEmployeeById(int id, ArrayList<Employee> records)\n { \n for (int index = 0; index < records.size(); index++) \n {\n if (records.get(index).getEmployeeId() == id)\n return index;\n }\n return -1;\n }", "private int find(Student s) {\r\n\t\tint i = 0;\r\n\t\t\r\n\t\tString name = null;\r\n\t\t\r\n\t\twhile (i < numStudents) {\r\n\t\t\t\r\n\t\t\tif(list[i] instanceof Instate) {\r\n\t\t\t\tname = ((Instate)list[i]).get_fname() + \" \" + ((Instate)list[i]).get_lname();\r\n\t\t\t}\r\n\t\t\telse if(list[i] instanceof Outstate) {\r\n\t\t\t\tname = ((Outstate)list[i]).get_fname() + \" \" + ((Outstate)list[i]).get_lname();\r\n\t\t\t}\r\n\t\t\telse if (list[i] instanceof International) {\r\n\t\t\t\tname = ((International)list[i]).get_fname() + \" \" + ((International)list[i]).get_lname();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint bool = s.compareTo(name);\r\n\t\t\t\r\n\t\t\tif(bool == 0) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn -1;\r\n\t\t\t\r\n\t}", "private int find(int[] roots , int id){\n\n if (roots[id] == id) return id;\n roots[id] = find(roots, roots[id]);\n return roots[id];\n }", "public static StaffAccount getStaffAccount(\n\t\t\tString loginID, // Read in UPPERCASE\n\t\t\tString password) {\n\t\t\n\t\tStaffAccount temp = SystemBackend.retrieveStaffRecord(loginID, password);\n\t\treturn temp;\n\t}", "public List<String> getStaffInfo(String staffSpecific){\n\t\tswitch (staffSpecific) {\n\t\tcase \"registered\":\n\t\t\treturn _staffList.displayAllStaff(); //Display all registered staff.\n\t\tcase \"unassigned\":\n\t\t\treturn _staffList.displayUnassignedStaff(); //Display unassigned.\n\t\tdefault:\n\t\t\tthrow new UnsupportedOperationException(\"Shop.getStaffInfo must take string arguments of either \\\"registered\\\" or \\\"unassigned\\\"\");\n\t\t}\n\t}", "public String getClStaffId() {\r\n\t\treturn clStaffId;\r\n\t}", "public Map<String, String> getStaffRowById(int id) {\n String rowIndex = String.valueOf(getRowIndexById(id));\n String xpathRow = xpathTableCell.replace(\"*row*\", rowIndex);\n mapStaff = new HashMap<String, String>();\n\n mapStaff.put(\"ID\", assertAndGetText(xpathRow.replace(\"*col*\", \"1\")));\n mapStaff.put(\"Name\", assertAndGetText(xpathRow.replace(\"*col*\", \"2\")));\n mapStaff.put(\"Branch\", assertAndGetText(xpathRow.replace(\"*col*\", \"3\")));\n\n logger.info(\"# Staff info corresponding to staff id (\" + id + \"): \" + mapStaff);\n return mapStaff;\n }", "public Member searchMemberByPersonalNumber(List<Member> members,String personalNumber) throws WorkShopException {\n try {\n for (Member member : members) {\n if (member.getPersonalNumber().equals(personalNumber)) {\n return member;\n }\n }\n } catch (Exception e) {\n throw new WorkShopException(e);\n }\n return null;\n }", "public Student findStudent(int studentNumber)\r\n {\r\n for(Student s : students) // look in the list\r\n {\r\n if(s.getStudentNumber() == studentNumber) // if the student number is the same\r\n return s;\r\n }\r\n\r\n return null;\r\n }", "@Override\n\tpublic List<StaffDTO> getStaffList(int store_id) throws Exception {\n\t\treturn dao.listAll(store_id);\n\t}", "public static Patient find(int id) {\n\tPatient patient = null;\n\tfor (Patient a : patients) {\n\t if (a.getId() == id) {\n\t\tpatient = a;\n\t\tbreak;\n\t }\n\t}\t\n\t\n\treturn patient;\n }", "@Override\n\tpublic List<Staff> FindAll() {\n\t\treturn sessionFactory.getCurrentSession()\n\t\t\t\t.createQuery(\"from Staff\")\n\t\t\t\t.list();\n\t}", "public static Person findID(ArrayList<Member> testMember, int inputID, int inputPW) {\n\t\tfor(int i = 0; i < testMember.size(); i++) {\n\t\t\tif(inputID == testMember.get(i).getID() && inputPW == testMember.get(i).memberPW) {\n\t\t\t\treturn testMember.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Student getStudentByID(String sid) {\n\t\tfor(Student student: students) {\r\n\t\t\t//no need to check for null as Array list is dynamic and \r\n\t\t\tif(student.getStudentId().equals(sid)) {\r\n\t\t\t\treturn student;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return null if sid was not found\r\n\t\treturn null;\r\n\t}", "public void loadStaffList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxStaff = Integer.parseInt(in.readLine());\n staffList = new Staff[maxStaff];\n int numStaffInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numStaffInFile; i++){\n \n String staffType = in.readLine();\n if (staffType.equals(\"Labourer\")) {\n staffList[i] = new Labourer(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()));\n numStaff++;\n } else if (staffType.equals(\"Manager\")) /*;*/\n {\n staffList[i] = new Manager(in.readLine(), Integer.parseInt(in.readLine()), in.readLine(), Double.parseDouble(in.readLine()));\n numStaff++;\n }\n }\n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n \n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "protected ResultSet selectStaff() {\r\n\t\tResultSet rs = sqlSelect( \"*\", \"Staff\", \"\");\r\n\t\treturn rs;\r\n\t}", "public interface StaffDao extends BaseDao<Staff> {\n\n Staff findById(Staff staff);\n\n List<Staff> queryStaff(Staff staff);\n\n Staff staffById(String staffId);\n\n List<Staff> findStaffsByStaffName(String staffName);\n\n List<Staff> findStaffsByPostId(String postId);\n\n List<Staff> findStaffsByDepId(String depId);\n\n\n //分页用到的接口\n\n /**\n * 获得总的数据数目 -- 带条件的\n *\n * @return\n */\n int getTotalRecord();\n\n /**\n * 获取到的数据 -- 带分页的参数\n *\n * @param startIndex 开始索引\n * @param pageSize 每页显示的记录\n * @return\n */\n List<Staff> findAllStaffs(int startIndex, int pageSize);\n\n\n List<Staff> findStaffByLoginNameAndLoginPwd(Staff staff);\n}", "public Joueur find(String id)\n\t{\n\t\tfor(Joueur j : ListJoueur)\n\t\t{\n\t\t\tif(id.equals(j.getClefId()))\n\t\t\t\treturn j;\n\t\t}\n\t\treturn null;\n\t}", "public interface IStaff {\n List<Staff> getStaffs();\n boolean addStaff(Staff staff);\n boolean updateStaff(Staff staff);\n boolean deleteStaff(List<Long> id);\n Staff getStaff(Long id);\n}", "public BTNode<T> find ( T data ){\n\t\t//reset the find count\n\t\tfindCount = 0;\n\t\t \t\t\n\t\tif (root == null) \n\t\t\treturn null;\n \t\telse\n \t\treturn find (data, root);\n \t}", "private static int search(int[] arr, int findMe, int left, int right) {\n\t\tif (left > right) {\n\t\t\treturn FAILURE;\n\t\t}\n\t\tint mid = (left + right) / 2;\n\t\tif (findMe == arr[mid]) {\n\t\t\treturn mid;\n\t\t}\n\t\telse if (findMe < arr[mid]) {\n\t\t\treturn search(arr, findMe, left, mid - 1);\n\t\t}\n\t\telse {\n\t\t\treturn search(arr, findMe, mid + 1, right);\n\t\t}\n\t}", "public void fibTest(){\r\n \r\n for(int j=0;j<eDB.staff.size();j++){\r\n String y = eDB.staff.get(j).getId().replaceAll(\"[^\\\\d.]\", \"\"); //removes letters from id\r\n int n = Integer.parseInt(y);\r\n\r\n {\r\n int a=0, b=1 ,c=0; \r\n \r\n while(c<n) \r\n {\r\n c = a + b; \r\n a = b;\r\n b = c;\r\n }\r\n \r\n \r\n \r\n if(c==n) \r\n fibSpies.add(eDB.staff.get(j));\r\n \r\n \r\n }\r\n \r\n}\r\n }", "public Employee getEmployeeById(String id) {\r\n for(int i = 0; i < companyDirectory.size(); i++) {\r\n\t for(int j = 0; j < companyDirectory.get(i).getLocations().size(); j++) {\r\n\t\t for(int k = 0; k < companyDirectory.get(i).getLocations().get(j).getEmployees().size(); k++) {\t\t\r\n\t\t if(companyDirectory.get(i).getLocations().get(j).getEmployees().get(k).getId().equals(id)) \r\n\t\t \treturn companyDirectory.get(i).getLocations().get(j).getEmployees().get(k);\r\n\t\t }\r\n\t\t}\r\n\t }\r\n return null;\r\n\t}", "@Override\r\n\tpublic Personne find(int id) {\n\t\treturn null;\r\n\t}", "@Test\n public void testStaffFactoryGetStaff() {\n StaffController staffController = staffFactory.getStaffController();\n staffController.addStaff(STAFF_NAME, STAFF_GENDER, STAFf_ROLE);\n assertEquals(STAFF_NAME, staffController.getStaff(1).getName());\n }", "public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}", "private void initStaff(){\n //wake movie staff, maintains ArrayList MovieModel and MovieItem buffers\n mMovieStaff = new MovieStaff(this);\n\n //wake refresh staff, maintains HashMap RefreshItem buffers\n mRefreshStaff = new RefreshStaff(this);\n mRefreshStaff.setRefreshMap(mRefreshValet.getRefreshMap());\n\n //wake house keeper staff, maintains HashMap MyHouseKeeper buffer\n mKeeperStaff = new HouseKeeperStaff(this);\n\n //wake maid staff, maintains HashMap MyMaid buffer\n mMaidStaff = new MaidStaff(this);\n }", "public Staff show(String id) throws Exception {\n return this.findById(id);\n }", "public int nameBinarySearch (String name) {\n\t\t//sorting records by first name alphabetical order\n\t\tthis.nameQuickSort(this.getList(), 0, getSize()-1);\n\t\tint low = 0;\n\t\tint high = this.size-1;\n\t\tint middle;\n\n\t\twhile (low<=high) { \n\t\t\tmiddle = (low+high)/2;\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) == 0) { //check if name found\n\t\t\t\treturn middle; //return index\n\t\t\t}\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) <0) { //check if name to find is in the lower half\n\t\t\t\thigh = middle-1; //move the high to one lower than the middle\n\t\t\t}\n\t\t\telse { //if it is in higher part of the list\n\t\t\t\tlow = middle+1; //move the low to one higher than the middle\n\t\t\t}\n\t\t}\n\t\t//not found\n\t\treturn -1;\n\t}", "@Test\n\tpublic void testFind() {\n\t\tBinarySearchTree binarySearchTree=new BinarySearchTree();\n\t\tbinarySearchTree.insert(3);\n\t\tbinarySearchTree.insert(2);\n\t\tbinarySearchTree.insert(4);\n\t\tassertEquals(true, binarySearchTree.find(3));\n\t\tassertEquals(true, binarySearchTree.find(2));\n\t\tassertEquals(true, binarySearchTree.find(4));\n\t\tassertEquals(false, binarySearchTree.find(5));\n\t}", "public Staff findLowestEarningLabour() {\n Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){\n lowest = staffList[i];\n }\n }\n }\n return lowest;\n }", "@Override\r\n\tpublic Page<Staff> findByOrganizationName(String name,Pageable pageable) {\n\t\treturn staffDao.findByOrganizationName(name, pageable);\r\n\t}", "private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "public boolean find(int toFind)\r\n {\r\n boolean answer=false;\r\n if(recFind(root,toFind)==true)\r\n {\r\n answer=true;\r\n }\r\n return answer;\r\n }", "public int find(Base subseq)\n {\n return find(subseq, 0);\n }", "static int searchFirstname(String firstName) {\n for (Person p : people) {\n if (p.getFirstName().contains(firstName))\n return people.indexOf(p);//returns the index of people in the list.\n\n }\n return -1;\n }", "public User findUser(int id)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (id == (users.get(i).getId()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public boolean findPatientId(String id)\r\n\t{\r\n\t\t//ID is tested to see if it appears in the array \r\n\t\tnextPatientLocation = 0;\r\n\t\tboolean foundId = false;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//loops through the array\r\n\t\t\tfor(int i=0; arrayPatients[i] != null; i++)\r\n\t\t\t{\r\n\t\t\t\tif(id.equals(arrayPatients[i].patientID))\r\n\t\t\t\t{\r\n\t\t\t\t\tfoundId = true;\r\n\t\t\t\t\treturn foundId;\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t\t//returns if patient exists \r\n\t\t\treturn foundId;\r\n\t\t}\r\n\t\t//throws exception if errror occurs\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}", "public interface StaffManager extends UniversalManager {\r\n\t\r\n\tClassTeacher getTeacherByClassandSubjectId(long staffId,long classId,long subjectId,String staffActiveStatus);\r\n\tClassTeacher getStudyClassSubject(long classId, long staffId);\r\n\tList<Student> getStudentByClassId(long classId);\r\n\tStudent getStudentById(long studentId);\r\n\tList<Leave> getLeavesListByAccountId(long accountId,String leaveStatus,long customerId,long academicYearId);\r\n\tList getAllCalendarEventsByCustomerId(long customerId);\r\n\tList getEventInvitedUserListByEventId(String eventId);\r\n\tList getEventsByDate(String eventDate);\r\n\tList<ClassTeacher> getTeacherSubjectsByIdAndAcademicYear(long staffId,long academicYearId,long custId);\r\n\tList<ViewStudentLeaveDetails> getAllStudentLeavesByStatusAndRoleNameAndSupervisorId(long customerId,String leaveStatus,String roleName,long supervisorId,long adademicYearId);\r\n\tList getTeacherSubjectsByStaffAndClassId(long accountId,long classId,long academicYearId);\r\n\tStudent getStudentByAcountId(long accountId);\r\n\tList<ViewStudentPersonAccountDetails> getStudentByClassIdAndStaffId(long classId,long customerId,long academicYearId,String status);\r\n\tStudent getStudentsByAccountId(long stuAccountId);\r\n\tList<ViewStudentPersonAccountDetails> getViewStudentPersonAccountDetailsByStudyClassIdandStatus(long classId,String status,String academicYearId);\r\n\tList getClassEventListByEventId(String eventId);\r\n\tViewStudentLeaveDetails getViewStudentLeaveDetailsByLeaveId(long leaveid,long customerId);\r\n\tRole getRoleDetailsByRoleName(String roleName);\r\n\tList getAllStudentStatus(String studentId);\r\n\tList getStudyClassSubjectByClassid(long classId);\r\n\tList getStudySubjectsId(String subjectId,String classId);\r\n\tList getTeacherSubjects(String subjectId);\r\n\tvoid removeRegistrationStudentEvent(String accountId,String eventId,String eventAcceptedStatus);\r\n\tList getStudentsByIds(String studentIds);\r\n\tList getNotInvitedStudents(String accountIds);\r\n\tList getAllLeavesListByAccountId(long accountId,long customerId);\r\n\tClassTeacher getClassTeacherByStaffIdandAcademicYear(long staffId,long academicYear,long custId);\r\n\tViewStaffPersonAccountDetails getFindStaffByIdOrName(String username, String firstName,long customerId);\r\n\tList getMyMessagesByReceiverAccountIdAndIsParent(String receiverAccountId, long customerId,String isParent);\r\n\tList<ViewClassExamDetails> getClassTeacherExamSchedules(long classId,long academicYear);\r\n\tString getClassIdByNameAndSection(String className,String section,long custId,long academicYear);\r\n\tList getFindStudentsListByIdOrName(String rollNumber,String firstName,long customerId,long academicYearId,long studyClassId);\r\n\tList getAllMessagesByMessageStatus(String messageStatus,long customreId,String academicYearId,Date messageDate);\r\n\tString getExamTypeIdByExamType(String examType,long custId,String academicYear);\r\n\tString getSubjectIdBySubjectName(String subjectName,long custId,long academicYear);\r\n\tExamSchedules getExamSchedule(String studyClassId,String examTypeId,String subjectId,long academicYear,long custId);\r\n\tList getEventAcceptedEventsByEventIdAndAccountId(String eventIds,long accountId,String eventAccepted);\r\n\tList getAllCalendarEventsByEventIds(String eventsIds,long customerId);\r\n\tList getClassEventListByClassId(long classId);\r\n\tList getTeacherExamSchedulesByClassIdandSubjectId(long classId,long subjectId,long academicYear);\r\n\tList getFindStaffListByIdOrName(String username,String firstName,long customerId);\r\n\tViewStaffPersonAccountDetails getStaffBirthDaysByAccountId(long staffId,long custId,long staffAccountId);\r\n\tList<ViewStaffPersonAccountDetails> getAllStaffBirthDaysList(String date1,long custId);\r\n\tList<ViewStudentPersonAccountDetails> getAllStudentBirthDaysList(String date1,long custId);\r\n\tList getMyMessagesBySenderAccountIdAndIsParent(String receiverAccountId, long customerId,String isParent);\r\n\tList getstudentMarksListByExamScheduleId(long scheduleId);\r\n\tList<ViewStudentPersonAccountDetails> getViewStudentPersonAccountDetailsByStudyClassIdandAccount(long classId,String status,long accountId,String academicYearId);\r\n\tdouble getPassStudentsCount(long scheduleId,double minMarks);\r\n\tdouble getFailStudentsCount(long scheduleId,double minMarks);\r\n\tSet getExamTypeIdsByClassIdandAcademicYear(long classId,long academicYear);\r\n\tList getExamTypesByExamTypeIds(String typeIds,long academicYear);\r\n\tList getClassExamSchedulesByExamTypeId(long examTypeId,long classId,long custId,long academicYear);\r\n\tSchoolHolidays checkSchoolHolidayBySelectedDate(String selectedDate,long customerId,long academicYearId);\r\n\tList<KBank> getKBankBySearchKewordsKBankTypeId(String searchKeywords,long kBankTypeId,long custId);\r\n\tScrapMessage saveScrapMessage(ScrapMessage scrapMessage);\r\n\tList<ScrapMessage> getAllScrapMessagesListBySenderAccId(long senderAccountId,String status,String replyStatus,long customerId,String academicYearId);\r\n\tList<ScrapMessage> getAllScrapMessagesListByReceiverAccId(long receiverrAccountId,String status,String replyStatus,long customerId,String academicYearId,String messageType);\r\n\tList getAllUsersByFirstNameOrLastName(String name,long customerId);\r\n\tList getMyFavouritiesByUserId(long accountId);\r\n\tList getMyFavouritiesByUserIdAndKBankId(long accountId,long kBankId);\r\n\tKBankRating getKBankRateByKBankId(String kBankId);\r\n\tList getPlayListVideosByKeywords(String keywords);\r\n\tList getQuizListWithCustId(long custId);\r\n\tList getQuizQuestionListWithCategoryId(long quizId,long custId);\r\n\tQuizQuestion getQuizQuestionId(long questionId,long custId);\r\n\tList getQuestionAnswersWithQuestionId(long questionId,long custId);\r\n\tQuestionAnswer getCorrectAnswerWithQuestionId(long questionId,long custId);\r\n\tList getAllAlertsByAlertStatus(long customerId,String alertType,String receiverType,boolean isAdmin,String academicYearId);\r\n\tList deleteAbsentStudents(String attenDate,long classId,long customerId);\r\n\tint getUpdateQuizQuestionStatus(long quizId,long custId,String selectdDate);\r\n\tList getUpdateStudentQuizStatus(long custId);\r\n\tList getQuizQuestionListWithStudentList(long quizId,long custId);\r\n\tList getQuizQuestionListWithCategoryIdAndTeacherId(long quizId,long staffId,long custId);\r\n\tString studentFailInAnnuallyExam(long studentId,long examTypeId,String minMarks);\r\n\tPromoteClass getPromoteClassDetails(long classId,long custId);\r\n\tString getStudentCountByClassId(long classId,long custId);\r\n\tViewStudentMarksDetails getStudentsMarksByClassIdandExamtypeId(long classId,long examTypeId,long custId,String academicYear,long studentId,long subjectId);\r\n\tList getMarksByClassIdandExamtypeId(long classId,long custid);\r\n\tString getStudentCountByClassNameClassId(long ClassNameClassId,long custId);\r\n\tList getExamScheduleIdsByAcademicYearandClassIdandExamTypeId(String academicYear,String classId ,String examTypeId);\r\n\tList getAllStudentMarksChangesByExamScheduleIds(String scheduleIds);\r\n\tint updateStudentMarksByStudentIdandScheduleId(String studentId,String scheduleId,String obtainedMarks);\r\n\tList getTeacherExamScheduleIdsByClassIdandSubjectId(long classId,long subjectId,long academicYear);\r\n\tvoid removeStudentMarksChangesByClassIdandSubjectIdandAcademicYear(String scheduleIds);\r\n\tViewStudentMarksDetails getStudentsMarksByStudentIdandExamTypeIdandSubjectId(long examTypeId,long custId,long studentId,long subjectId);\r\n\tList<ReplyScrapMessage> getAllReplyMessagesListByScrapId(long scrapId,long customerId);\r\n\tList<VWStudentAttendance> getStudentsAttendance(long custId, long academicYearId,int month,long classId, long classSectionId, String date);\r\n\tlong getStudentsAttendanceByClassSectionIdAndMonthId(long classSectionId,int monthId,long academicYearId,long custId,String attendanceStatus);\r\n\tList getStaffAttendanceByPresentStatusAndLeaveRequestStaus(long custId,long academicYearId, long staffId, String present,String leaveRequest);\r\n\tList<ViewStudentMarksDetails> getLatestUpdatedStudentMarksExamTypeIdsByClassSectionIdAndCustId(long classSectionId,long custId);\r\n\tList getTeacherSubjectsByStaffIdAndClassIdGroupByclassIdSubjectId(long staffId,long classId,long academicYearId);\r\n\tdouble getStudentsTotalMarksByClassIdTypeIdAndSubjId(long classSectionId,long examTypeId,long subjectId,long academicYearId);\r\n\tlong getStudentsCountByClassIdTypeIdAndSubjId(long classSectionId,long examTypeId,long subjectId,long academicYearId);\r\n\tList getIsClassTeacherByClassSectionAndStaffIdAndAcademicYear(long classSectionId,long staffId,long academicYearId);\r\n\tlong getPassStudentsCount(long classSectionId,long examTypeId,long subjectId,long academicYearId,double passMarks);\r\n\tlong getFailStudentsCount(long classSectionId,long examTypeId,long subjectId,long academicYearId,double passMarks);\r\n\tViewStaffPersonAccountDetails getStaffDetailsByAccountIdandStatus(long accountId,long academicYearId,String status,long custId);\r\n\tScrapMessage getScrapMessageBySenderAndReceiverId(long senderAccountId,long receiverAccountId,long customerId,long academicYearId) ;\r\n\tList getLatestSmsCount(long custId,long academicYearId);\r\n\tList<ViewStudentLeaveDetails> getAllFutureStudentLeavesByStatusAndRoleNameAndSupervisorId(long customerId, String leaveStatus, String roleName,long supervisorId,long academicYearId);\r\n\tList<ViewStudentMarksDetails> getStudentsMarksListByStudentIdandExamTypeIdandSubjectId(long examTypeId,long custId,long studentId,long subjectId);\r\n\tList<ViewStudentMarksDetails> getStudentsMarksListByStudentIdandExamTypeIdandSubjectIdAndSubTypeId(long examTypeId, long custId, long studentId, long subjectId,long subTypeId);\r\n\tString getSUMStudentsMarksByStudentIdandExamTypeIdandSubjectIdAndSubTypeId(long examTypeId, long custId, long studentId, long subTypeId);\r\n\tvoid removeStaffAttendanceByaccountIdAndDates(long accountId,String startDate,String endate,long custId,long academicYearId);\r\n\tint getTransportSmsCount(long custId,long academicYearId);\r\n\tList<VWStudentDailyAttendance> getStudentDailyAttendance(long custId, long classSectionId, String date);\r\n\tlong getStudentsMonthlyAttendanceByClassSectionIdAndMonthId(long classSectionId,int monthId,long academicYearId,long custId,long studentId);\r\n\tint getTotalWorkingDaysByClassSectionIdAndMonthId(long classSectionId,int monthId,long academicYearId,long custId,long studentId);\r\n\tvoid removeStudentDailyAttendance(long studentId,String startDate,String endate);\r\n\tClassTeacher getClassTeacherByAccountId(long accountId, long academicYearId);\r\n\tStaffDailyAttendance getStaffDailyAttendance(long accountId,String date);\r\n\tList getAllMessagesByAccountId(String messageStatus,long accountId,String academicYearId,Date messageDate);\r\n\tMap<String,String> disableStaff(long staffId,String reasonForDisable, long operatorId);\r\n\tvoid loadTeacher(Sheet sheet,String loadType, long custId,long loggedUserId);\r\n\tList<ViewStaffLeaveDetails> getAllFutureLeavesByStatusAndRoleName(long customerId,String leaveStatus,String roleName,long academicYearId);\r\n\tMap<String,String> addOrUpdateStaffAttendance(String strFormData, long academicYearId, long custId, long userId,String sms);\r\n\tboolean updateMessage(long messageId);\r\n\tint submitReplyMessage(ReplyScrapMessageMainVO replyScrapMessageMainVO);\r\n\tvoid updateRoleByUserId(long roleId,long userId);\r\n\tint submitParentMessage(SendMessageVO sendMessageVO);\r\n\tvoid sendNotificationForLeaveApproval(Leave leave, String channel);\r\n\tvoid sendNotificationForLeaveApprovalForHostelLeave(HostelLeave hostelLeave, String channel);\r\n\tvoid sendNotificationForLeaveApply(Leave leave, String channel,long leaveId);\r\n\tint addOrUpdateStaffAttendanceFromApp(StaffDailyAttendanceMainVO staffDailyAttendanceMainVO);\r\n\tint deleteLeaveInfo(long leaveId);\r\n\tint leaveVoFromApp(LeavesVO leavesVO);\r\n\tint submitOrEditLeaves(Leave leaveObj, AcademicYear academicYearObj, User userObj,long custId, long leaveId, String channel, String stuHostelLeave);\r\n\tint approveOrRejectLeaves(User userObj,String leaveStatus, String approvalsComment, long leaveId, String channel, String forStaffOrStudent);\r\n\tList<BigInteger> getTeacherIdsByStudyClassSubject(long custId,long academicYearId,long studyClassId,long subjectId);\r\n\tTaskDetailsVO getTaskDetailsById(Long taskId);\r\n\tint addOrUpdateTaskDetails(TaskDetailsVO taskDetailsVO, User user, long academicYearId,String isCheckMobileService,String isCheckEmailService);\r\n\tint addOrUpdateReminder(ReminderVO reminderVO, User user, long academicYearId, String isCheckMobileService, String isCheckEmailService);\r\n\tint deleteTaskDetails(long taskId);\r\n\tTaskDetailsVO showTaskDetailsComments(long taskId);\r\n\tTaskDetailsVO showTaskInfromationInTaskProcess(long taskId);\r\n\tint addOrUpdateTaskInprogressOrComplete(long taskId, TaskHistoryVO taskHistoryVO, long userAcademicYearId);\r\n\tList getAllTaskdetails(String anyTitle, User user, boolean isClassTeacher);\r\n\tList getRemindersList(long custId, long userId); \r\n\tReminderVO getReminderDetailsById(Long id);\r\n}", "public int compareTo(Staff s) {\r\n\t\tint result;\r\n\t\tif ((result = this.getLastUsed().compareTo(s.getLastUsed())) != 0)\r\n\t\t\treturn result;\r\n\t\telse if ((result = this.getName().compareTo(s.getName())) != 0)\r\n\t\t\treturn result;\r\n\t\telse\r\n\t\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic Page<Staff> findAll(Specification<Staff> spec, Pageable pageable) {\n\t\treturn staffDao.findAll(spec, pageable);\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Staff)) {\n return false;\n }\n Staff other = (Staff) 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 List<Person> search(Integer id) {\n\t\treturn null;\n\t}", "public static Company findLinearSearch(String needle, File dataFile)\n\t{\n\t\t//Put company in if we find, storing company in\n\t\tCompany companyHolder = null;\n\t\ttry\n\t\t{\n\t\t\tCSVReader reader = new CSVReader(new FileReader(dataFile));\n\t\t String [] nextLine;\n\t\t while ((nextLine = reader.readNext()) != null) \n\t\t {\n\t\t\t\t\tString currentCompany = nextLine[7];\n\t\t\t\t\tString complaintId = nextLine[17];\n\t\t\t\t\tif(!(currentCompany.equalsIgnoreCase(needle)))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(companyHolder == null)\n\t\t \t\t{\n\t\t\t\t\t\tcompanyHolder = new Company(currentCompany, complaintId);\n\t\t \t\t\tcontinue;\n\t\t \t\t}\n\t\t\t\t\tcompanyHolder.addId(complaintId);\t\t\n\t\t\t\t} return companyHolder;\n\t\t }\n\t\t\tcatch(FileNotFoundException e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"File not found, please enter correct file\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\treturn companyHolder;\n\t}", "public Address SearchContact(String firstName,String lastName) {\r\n int i = 0;\r\n while (!contact.get(i).getFirstName().equals(firstName) && !contact.get(i).getLastName().equals(lastName)){\r\n i++;\r\n }\r\n return contact.get(i);\r\n }", "public EmployeeInfo searchFromTable(int employeeNum){\r\n \r\n int targetBucket = calcBucket(employeeNum);\r\n \r\n\t\tfor(int i = 0 ; i < buckets[targetBucket].size(); i++) {\r\n\t\t\tif (buckets[targetBucket].get(i).getEmpNum() == employeeNum) {\r\n EmployeeInfo locatedEmployee = buckets[targetBucket].get(i);\r\n return locatedEmployee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n \r\n }", "public List<Student> getStudentsByFirstName(String fname) {\n\t\tList<Student> sameNames = new ArrayList<Student>();\r\n\t\t\r\n\t\t//loop over array list\r\n\t\t//for student type elements in the students array list do\r\n\t\tfor(Student student: students) {\r\n\t\t\t//if i find a student with the given first name then add to list\r\n\t\t\tif(student.getFirstName().equalsIgnoreCase(fname)) {\r\n\t\t\t\tsameNames.add(student);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//check if list has any students\r\n\t\tif(sameNames.size()>0) {\r\n\t\t\t//if students were found then return the list\r\n\t\t\treturn sameNames;\r\n\t\t}\r\n\t\t\r\n\t\t//if no students were found with that first name then return null\r\n\t\treturn null;\r\n\t}", "public static int search(int[] arr, int findMe) {\n\t\treturn search(arr, findMe, 0, arr.length - 1);\n\t}", "public Boolean addStaff(StaffPojo staff) {\n\t\tLoginPojo login = new LoginPojo();\n\t\tString sid = staffDao.addStaff(staff);\n\t\tif(sid.equals(\"false\"))\n\t\t\treturn false;\n\t\telse\n\t\t{\n\t\t\tlogin.setUserName(staff.getStaffUserName());\n\t\t\tlogin.setPassword(staff.getStaffPassword());\n\t\t\tlogin.setUserId(sid);\n\t\t\tlogin.setUserCategory(\"S\");\n\t\t\tlogin.setRoleId(3);\n\t\t\tif(loginDao.addUser(login))\n\t\t\t\tSystem.out.println(\"user not added\");\n\t\t\telse \n\t\t\t\tSystem.out.println(\"user added\");\n\t\t\treturn true;\n\t\t}\n\t}", "public int binarySearch(RandomAccessFile Din, String id) throws IOException \n {\n int Low = 0;\n int NUM_RECORDS = Integer.parseInt(getNumberOfRecords(\"normal\"));;\n int High = NUM_RECORDS-1;\n int Middle = 0;\n String MiddleId;\n String record = \"\";\n boolean Found = false;\n\n \n while (!Found && (High >= Low)) \n {\n Middle = (High+Low) / 2;\n record = getRecord(\"normal\", Din, Middle+1);\n MiddleId = record.substring(5,45);\n MiddleId = MiddleId.trim();\n int result = MiddleId.compareTo(id);\n\n if (result == 0) {\n // ids match\n return Middle;\n } \n else if (result < 0) {\n Low = Middle + 1;\n }\n else {\n High = Middle - 1;\n }\n }\n\n if (Low > High) {\n record = getRecord(\"normal\", Din, Middle);\n // if (record != \"\") {\n MiddleId = record.substring(5, 45).trim().toUpperCase();\n if (MiddleId.compareTo(id) == 0) {\n return Middle;\n }\n // }\n }\n\n return -1;\n }" ]
[ "0.7306742", "0.6376675", "0.63579214", "0.6141348", "0.5970894", "0.59410477", "0.58695", "0.5867509", "0.57469034", "0.5678988", "0.56495726", "0.56187457", "0.5564598", "0.5556264", "0.55559707", "0.5430114", "0.54224116", "0.54189384", "0.5399306", "0.5358172", "0.53547156", "0.5350832", "0.52877337", "0.5281559", "0.5276476", "0.5267035", "0.5248764", "0.5209999", "0.52077526", "0.5117392", "0.5109867", "0.5084492", "0.50700444", "0.5047557", "0.5033731", "0.5017182", "0.50170535", "0.5010456", "0.50066787", "0.50033575", "0.49966627", "0.49472168", "0.49351394", "0.4935057", "0.49337262", "0.49237978", "0.49125168", "0.49085838", "0.49075216", "0.4887067", "0.4866179", "0.48641145", "0.48545828", "0.4852524", "0.48473114", "0.48389474", "0.48387602", "0.48163396", "0.4815784", "0.48080483", "0.480572", "0.48043218", "0.48032755", "0.47947767", "0.47797704", "0.4776843", "0.476705", "0.47596064", "0.47565058", "0.47526845", "0.47426054", "0.47395238", "0.47366443", "0.47363588", "0.47336838", "0.4732127", "0.47122517", "0.47025314", "0.47024578", "0.46958014", "0.46945074", "0.46916276", "0.468679", "0.4682878", "0.4680747", "0.4678018", "0.4665049", "0.46606326", "0.4656486", "0.4652516", "0.46524554", "0.46502325", "0.46499372", "0.46387935", "0.46385115", "0.4629101", "0.46282595", "0.4620942", "0.46201476", "0.4610675" ]
0.76396066
0
/ findStaff (staffName): This findStaff method uses the name of the staff instead of the staffNum. Returns a staff object or null if not found.
public Staff findStaff(String staffName, int start, int end) { //because recursive int mid = (start + end) / 2; if (end - start > 1) { if (findStaff(staffName, start, mid) != null) { return findStaff(staffName, start, mid); } else { return findStaff(staffName, mid, end); } } else { if (staffList[start].getStaffName().equals(staffName)) { return staffList[start]; } else if (staffList[end].getStaffName().equals(staffName)) { return staffList[end]; } else { return null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Staff findById(String id) throws Exception{\n if(StringUtils.isBlank(id) || StringUtils.equalsIgnoreCase(id, \"0\"))\n throw new Exception(\"Invalid staff id\");\n\n try{\n Staff staff = this.em.find(Staff.class, Integer.parseInt(id));\n if(staff == null)\n throw new Exception(\"Staff not found\");\n else\n return staff;\n\n }catch (IllegalArgumentException ex){\n throw new Exception(\"Provide a valid staff entity or primary key\");\n }\n }", "@Override\r\n\tpublic Staff findOne(Long id) {\n\t\treturn staffDao.findOne(id);\r\n\t}", "public void setStaff_name(String staff_name) {\n this.staff_name = staff_name;\n }", "public List<StaffPojo> staffSearchByName(String sname) {\n\t\treturn staffDao.staffSearchByName(sname);\n\t}", "public Staff findStaff(int staffNum, int start, int end) { //because recursive\n int mid = (start + end) / 2;\n if (end - start > 1) {\n if (findStaff(staffNum, start, mid) != null) {\n return findStaff(staffNum, start, mid);\n } else {\n return findStaff(staffNum, mid, end);\n }\n } else {\n if (staffList[start].getStaffNum() == staffNum) {\n return staffList[start];\n } else if (staffList[end].getStaffNum() == staffNum) {\n return staffList[end]; \n } else {\n return null; \n }\n }\n }", "@Override\r\n\tpublic Page<Staff> findByOrganizationName(String name,Pageable pageable) {\n\t\treturn staffDao.findByOrganizationName(name, pageable);\r\n\t}", "public ID getStaffID() {\r\n\t\t\t\r\n\t\t\treturn staffID;\r\n\t\t}", "@Override\n public com.ext.portlet.model.StaffMember getStaffMember(long id)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n return _staffMemberLocalService.getStaffMember(id);\n }", "@Override\n\tpublic StaffVO readStaff(int staff_id) throws Exception {\n\t\treturn dao.read(staff_id);\n\t}", "public Staff searchStaff() { //takes in inputs from user find a Staff\n while (true) { //will keep looping util returns a value\n System.out.print(\"Search by entering Name or Employee Number: \");\n String findEmp = \"\"; \n try {\n findEmp = sc.nextLine();\n if (findStaff(Integer.parseInt(findEmp), 0, numStaff - 1) != null) { //if can parse search for emp num\n return findStaff(Integer.parseInt(findEmp), 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n } catch (NumberFormatException NFX) { //if cannot parse search for emp name\n if (findStaff(findEmp, 0, numStaff - 1) != null) {\n return findStaff(findEmp, 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n }\n }\n }", "public Staff findStaff(String email, String password) throws SQLException {\n //Find if the staff exists in the CUSTOMER TABLE\n String fetch =\"select * from IOTBAY.STAFF where EMAIL='\" + email + \"' and PASSWORD = '\" + password + \"'\";\n ResultSet rs = st.executeQuery(fetch);\n \n while(rs.next()) //goes through every row in the STAFF table\n {\n String staffEmail = rs.getString(4);\n String staffPass = rs.getString(7);\n if (staffEmail.equals(email) && staffPass.equals(password)){\n //number corresponds to the columns of the STAFF table\n String staffName = rs.getString(2);\n String staffDob = rs.getString(3);\n String staffNumber = rs.getString(5);\n String staffAddress = rs.getString(6);\n return new Staff (staffName, staffDob, staffNumber, staffEmail, staffAddress, staffPass);\n }\n }\n return null;\n }", "public int getStaffID() {\r\n\t\treturn staffID;\r\n\t}", "private static void searchStaffByName(){\n\t\tshowMessage(\"type the name you are looking for: \\n\");\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listEmployee(EmployeeSearch.employee(employee.getAllEmployee(),name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n //if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchStaffByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t}", "public String getStaff_name() {\n return staff_name;\n }", "public StaffPojo staffSearchById(String sid) {\n\t\treturn staffDao.staffSearchById(sid);\n\t}", "public void setStaffID() {\r\n\t\t\t staffID = IDFactory.getID(\"ST\");\r\n\t\t}", "@PutMapping\n\tpublic String updateStaff(@Valid @RequestBody UniversityStaffMember staff) {\n\t\tif (universityService.updateStaff(staff))\n\t\t\treturn \"Staff data updated\";\n\t\telse\n\t\t\tthrow new DataNotFoundException(\"Update\", \"Staff with id \" + staff.getStaffId() + \" not found\");\n\t}", "public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}", "public Staff getStaffById(int patientId) {\n\t\treturn null;\n\t}", "@GET\r\n\t@Path(\"{id}\")\r\n\t@Produces(\"application/JSON\")\r\n\tpublic ZooStaff getStaffById(@PathParam(\"id\")int id) {\r\n\t\treturn service.getStaffById(id);\r\n\t}", "public StaffPath staff() {\n if (_staff == null)\n _staff = new StaffPath(this, Keys.PAYMENT_P2007_03__PAYMENT_P2007_03_STAFF_ID_FKEY, null);\n\n return _staff;\n }", "@GetMapping(\"/{staffId}\")\n\tpublic ResponseEntity<?> viewStaff(@PathVariable(\"staffId\") int sid) {\n\t\tUniversityStaffMember staff = universityService.viewStaff(sid);\n\t\tif (staff == null)\n\t\t\tthrow new DataNotFoundException(\"Request\", \"Staff with id \" + sid + \" not found\");\n\t\telse\n\t\t\treturn new ResponseEntity<UniversityStaffMember>(staff, HttpStatus.OK);\n\t}", "public void searchStaff(String searchTxt) {\n assertAndType(xpathSearchTF, searchTxt);\n clickOnBtn(SEARCH_A_STAFF);\n logger.info(\"# Performed staff search for '\" + searchTxt + \"'\");\n }", "public void setStaffID(int staffID) {\r\n\t\tthis.staffID = staffID;\r\n\t}", "@Override\n\tpublic int updateStaff(int staff_id) throws Exception {\n\t\treturn dao.update(staff_id);\n\t}", "public static StaffAccount getStaffAccount(\n\t\t\tString loginID, // Read in UPPERCASE\n\t\t\tString password) {\n\t\t\n\t\tStaffAccount temp = SystemBackend.retrieveStaffRecord(loginID, password);\n\t\treturn temp;\n\t}", "public List<Staff> searchStaff(String searchString) {\n\t\t\n\t\tArrayList<Staff> result = new ArrayList<Staff>();\n\t\t\n\t\tSQLiteDatabase db = mDbHelper.getReadableDatabase();\n\t\tCursor cursor;\n\t\t\n\t\tStaff staff;\n\t\t\n\t\tcursor = db.rawQuery(\"SELECT a.id, a.name, password_ as pwd, mobile, phone, organization_id, \"\n\t\t\t\t + \" department_id, position_id, b.name as position_name \"\n + \"FROM staff a, position_ b \"\n + \"WHERE (a.name like '%\" + searchString + \"%' OR mobile like '%\" + searchString \n + \"%' OR phone like '%\" + searchString + \"%') AND a.position_id = b.id \" \n\t\t + \" AND is_warrant = '1' AND is_departure = '0' AND is_hipe = '0' \", null);\n\t\t\n\t\twhile (cursor.moveToNext()) {\n\t\t\t\n\t\t\tstaff = new Staff();\n\t\t\t\n\t\t\tstaff.setId(cursor.getInt(cursor.getColumnIndex(\"id\")));\n\t\t\tstaff.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n\t\t\tstaff.setPwd(cursor.getString(cursor.getColumnIndex(\"pwd\")));\n\t\t\tstaff.setMobile(cursor.getString(cursor.getColumnIndex(\"mobile\")));\n\t\t\tstaff.setPhone(cursor.getString(cursor.getColumnIndex(\"phone\")));\n\t\t\tstaff.setOrganizationId(cursor.getInt(cursor.getColumnIndex(\"organization_id\")));\n\t\t\tstaff.setDepartmentId(cursor.getInt(cursor.getColumnIndex(\"department_id\")));\n\t\t\tstaff.setPositionId(cursor.getInt(cursor.getColumnIndex(\"position_id\")));\n\t\t\tstaff.setPositionName(cursor.getString(cursor.getColumnIndex(\"position_name\")));\n\t\t\tstaff.setSelected(false);\n\t\t\t\n\t\t\tresult.add(staff);\n\t\t}\n\t\t\n\t\tcursor.close();\n\t\tdb.close();\n\t\t\n\t\treturn result;\n\t}", "public List<StaffPojo> staffSearchByPhoneNo(String sphone) {\n\t\treturn staffDao.staffSearchByPhoneNo(sphone);\n\t}", "public String getClStaffId() {\r\n\t\treturn clStaffId;\r\n\t}", "public Staff show(String id) throws Exception {\n return this.findById(id);\n }", "public Doctor findDoctorByName(String name) {\n for (Doctor doctors : Configuration.doctorList) {\n if (doctors.getName().equals(name)) {\n return doctors;\n }\n }\n return null;\n }", "@Override\r\n\tpublic LookMast findByName(String lookmastName) {\n\t\treturn lookMastRepository.findByName(lookmastName);\r\n\t}", "@Override\n\tpublic Staff selectByPrimaryKey(Integer id) {\n\t\treturn staffMapper.selectByPrimaryKey(id);\n\t}", "@Test\n public void testStaffFactoryGetStaff() {\n StaffController staffController = staffFactory.getStaffController();\n staffController.addStaff(STAFF_NAME, STAFF_GENDER, STAFf_ROLE);\n assertEquals(STAFF_NAME, staffController.getStaff(1).getName());\n }", "public Contact findContact(String name)\r\n\t{\r\n\t\tSystem.out.println(\"in FindContact\");\r\n\t\tString name1;\r\n\t\tname = name.toUpperCase();\r\n\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tname1 = this.get(i).getContactName().toUpperCase();\r\n\r\n\t\t\tif (name.equalsIgnoreCase(name1)) {\r\n\t\t\t\tSystem.out.println(this.get(i));\r\n\t\t\t\tContact contact = this.get(i);\r\n\t\t\t\treturn contact; \t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t \t \t\t \r\n\t\t} \r\n\t\treturn null;\r\n\t}", "public User findUser(String name) {\n\n\t\ttry {\n\t\t\tConnection conn = getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from users where name = ?\");\n\t\t\tps.setString(1, name);\n\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUser foundUser = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t\tconn.close();\n\t\t\t\treturn foundUser;\n\t\t\t}\n\t\t\tconn.close();\n\n\t\t} catch (SQLException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\treturn null;\n\t}", "@PutMapping(\"/updateStaff\")\n\tpublic Staff updateStaff(@RequestBody Staff staff) {\n\t\treturn staffService.updateStaff(staff);\n\t}", "public Student findStudent(String firstName, String lastName)\n\t{\n\t\tStudent foundStudent = null;\t\n\t\tfor(Student b : classRoll)\n\t\t{\n\t\t\t\n\t\t\tif (b.getStrNameFirst ( ) != null && b.getStrNameFirst().contains(firstName))\n\t\t\t{\n\t\t\t\tif(b.getStrNameLast ( ) != null && b.getStrNameLast().contains(lastName))\n\t\t\t\t{\n\t\t\t\t\tfoundStudent = b;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn foundStudent;\n\t}", "public Boolean addStaff(StaffPojo staff) {\n\t\tLoginPojo login = new LoginPojo();\n\t\tString sid = staffDao.addStaff(staff);\n\t\tif(sid.equals(\"false\"))\n\t\t\treturn false;\n\t\telse\n\t\t{\n\t\t\tlogin.setUserName(staff.getStaffUserName());\n\t\t\tlogin.setPassword(staff.getStaffPassword());\n\t\t\tlogin.setUserId(sid);\n\t\t\tlogin.setUserCategory(\"S\");\n\t\t\tlogin.setRoleId(3);\n\t\t\tif(loginDao.addUser(login))\n\t\t\t\tSystem.out.println(\"user not added\");\n\t\t\telse \n\t\t\t\tSystem.out.println(\"user added\");\n\t\t\treturn true;\n\t\t}\n\t}", "protected ResultSet selectStaff() {\r\n\t\tResultSet rs = sqlSelect( \"*\", \"Staff\", \"\");\r\n\t\treturn rs;\r\n\t}", "public static int findByName(String teamName) throws DALException {\n\n\t\t\t\t\tConnection cnx = null;\n\t\t\t\t\tPreparedStatement pstmt = null;\n\t\t\t\t\tResultSet rs = null;\n\t\t\t\t\tint idTeam = 0;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Connection DB\n\t\t\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\t\t\tpstmt = cnx.prepareStatement(SEARCH_NAME_TEAM);\n\t\t\t\t\t\tpstmt.setString(1, teamName);\n\t\t\t\t\t\trs = pstmt.executeQuery();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (rs.next()) {\n\t\t\t\t\t\t\tidTeam = rs.getInt(\"idTeams\");\n\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} catch (SQLException e) {\n\t\t\t\t\t\tthrow new DALException(\"Problem - search teams By Name - TeamDAO - Request : \"+pstmt+ \" \" + e.getMessage());\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\t\t\tcnx.close();\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn idTeam;\n\n\t\t\t\t}", "@DeleteMapping(\"/{staffId}\")\n\tpublic String removeStaff(@PathVariable(\"staffId\") int sId) {\n\t\tif (universityService.removeStaff(sId))\n\t\t\treturn \"Staff Data with id \"+sId+\" Deleted Succesfully\";\n\t\telse\n\t\t\tthrow new DataNotFoundException(\"Delete\", \"Staff with id \" + sId + \" not found\");\n\t}", "@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}", "public Student find(int id) {\n\n\t\tfor (int i = 0; i < studentList.size(); i++) {\n\t\t\tif (studentList.get(i).getId() == id) {\n\t\t\t\treturn studentList.get(i);\n\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\n\t}", "public int findEmployee(String name){\n log.debug(\"Inside findEmployee Method.\");\n int empID;\n String findEmpSQL = \"SELECT empID FROM employeeDetails WHERE name = \" + \"'\" + name + \"' AND businessID = \" + session.getLoggedInUserId();\n\n log.debug(\"Querying database for employeeID with name\" + name);\n resultSet = database.queryDatabase(findEmpSQL);\n\n try{\n if(resultSet.next()){\n empID = resultSet.getInt(\"empID\");\n log.info(\"Found employeeID: \" + empID);\n log.debug(\"Successfully found empID, returning to controller.\");\n return empID;\n }\n }\n catch (Exception e){\n log.error(e.getMessage());\n }\n log.debug(\"Failed to find empID, returning to controller.\");\n return -1;\n }", "public StaffMember(String firstname, String surname, int staffID, DepartmentStaff deptStaff, StaffType roleStaff) {\n this.firstname = firstname;\n this.surname = surname;\n this.staffID = staffID;\n this.deptStaff = deptStaff;\n this.roleStaff = roleStaff;\n }", "@Nullable\n public Member findMember(String memberName) {\n if (memberName == null)\n return null;\n\n return members.stream().filter(m -> m.name.equals(memberName)).findFirst().orElse(null);\n }", "public User findUserName(String name)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (name.equals(users.get(i).getUsername()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "static public Person searchPerson(String name) {\n return personMap.get(name);\n }", "@Override\r\n public Staff getStaff ()\r\n {\r\n if (super.getStaff() == null) {\r\n if (!getNotes().isEmpty()) {\r\n Note note = (Note) getNotes().get(0);\r\n setStaff(note.getStaff());\r\n }\r\n }\r\n\r\n return super.getStaff();\r\n }", "@PostMapping\n\tpublic String addStaff(@Valid @RequestBody UniversityStaffMember staff) {\n\t\t//System.out.println(staff);\n\t\tif (universityService.viewStaff(staff.getStaffId()) == null) \n\t\t{\n\t\t\tuniversityService.addStaff(staff);\n\t\t\treturn \"Data saved Succesfully\";\n\t\t}\n\t\telse\n\t\tthrow new DuplicateDataException(\"Duplicate Staff Id\");\n\t}", "Person findPerson(String name);", "public User findUser(String name) {\n\t\treturn null;\r\n\t}", "public void setStaff_surname(String staff_surname) {\n this.staff_surname = staff_surname;\n }", "protected Scheduler findScheduler(String schedulerName)\r\n/* 54: */ throws SchedulerException\r\n/* 55: */ {\r\n/* 56: 95 */ if ((this.beanFactory instanceof ListableBeanFactory))\r\n/* 57: */ {\r\n/* 58: 96 */ ListableBeanFactory lbf = (ListableBeanFactory)this.beanFactory;\r\n/* 59: 97 */ String[] beanNames = lbf.getBeanNamesForType(Scheduler.class);\r\n/* 60: 98 */ for (int i = 0; i < beanNames.length; i++)\r\n/* 61: */ {\r\n/* 62: 99 */ Scheduler schedulerBean = (Scheduler)lbf.getBean(beanNames[i]);\r\n/* 63:100 */ if (schedulerName.equals(schedulerBean.getSchedulerName())) {\r\n/* 64:101 */ return schedulerBean;\r\n/* 65: */ }\r\n/* 66: */ }\r\n/* 67: */ }\r\n/* 68:105 */ Scheduler schedulerInRepo = SchedulerRepository.getInstance().lookup(schedulerName);\r\n/* 69:106 */ if (schedulerInRepo == null) {\r\n/* 70:107 */ throw new IllegalStateException(\"No Scheduler named '\" + schedulerName + \"' found\");\r\n/* 71: */ }\r\n/* 72:109 */ return schedulerInRepo;\r\n/* 73: */ }", "public StudentDto findByName(String name) \n\t{\n\n\t\tSession session = factory.openSession();\n\t\tQuery<StudentDto> query = session.createQuery(\"from StudentDto where name = :n\");\n\t\tquery.setParameter(\"n\", name);\n\t\tStudentDto studentDto = query.uniqueResult();\n\t\tsession.close();\n\n\t\treturn studentDto;\n\t}", "public List<Staff> findAllStaffMembers(){\n\t\treturn staffRepository.findAll();\n\t}", "public void setClStaffId(String clStaffId) {\r\n\t\tthis.clStaffId = clStaffId;\r\n\t}", "Contact searchContact(String searchName){\n for(int i = 0; i < friendsCount; i++){\n if(myFriends[i].name.equals(searchName)){\n return myFriends[i];\n }\n }\n return null;\n }", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public static void updateStaffInformation(int staffID, String name, Date dob, String gender, String jobTitle,\n String professionalTitle, String department, String phone,\n String address) throws SQLException {\n\n try (Connection conn = ConnectionFactory.getConnection()) {\n\n PreparedStatement get = conn.prepareStatement(GET_STAFF_INFORMATION);\n get.setInt(1, staffID);\n ResultSet staff = get.executeQuery();\n\n if (staff.next()) {\n\n PreparedStatement st = conn.prepareStatement(UPDATE_STAFF_INFORMATION);\n st.setString(1, (name != null) ? name : staff.getString(\"Name\"));\n st.setDate( 2, (dob != null) ? dob : staff.getDate( \"DOB\"));\n st.setString(3, (gender != null) ? gender : staff.getString(\"Gender\"));\n st.setString(4, (jobTitle != null) ? jobTitle : staff.getString(\"JobTitle\"));\n st.setString(5, (professionalTitle != null) ? professionalTitle : staff.getString(\"ProfessionalTitle\"));\n st.setString(6, (department != null) ? department : staff.getString(\"Department\"));\n st.setString(7, (phone != null) ? phone : staff.getString(\"PhoneNumber\"));\n st.setString(8, (address != null) ? address : staff.getString(\"Address\"));\n st.setInt( 9, staffID);\n st.executeUpdate();\n\n }\n else {\n\n throw new SQLException(String.format(\"No staff member with ID %d.\", staffID));\n\n }\n\n }\n\n }", "Object find(String name);", "private Customer findCustomer(String customerName){\n for(int i=0; i<customers.size(); i+=1){\n Customer existingCustomer = this.customers.get(i);\n if(existingCustomer.getName().equals(customerName)){\n return existingCustomer;\n }\n }\n return null;\n }", "public boolean updateStaff(Staff staff) {\n\t\treturn false;\n\t}", "Road findByName(String toFind, ArrayList<Road> list)\n\t{\n\t\tRoad tmp;\n\t\tIterator<Road> it = list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\ttmp = it.next();\n\t\t\tif(tmp.getName().equals(toFind))\n\t\t\t{\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic TeamPO findTeamByName(String name) {\n\t\treturn teams.findTeamByShortName(name);\r\n\t}", "public PersonaBean getPerson(String searched) {\r\n\t\ttry {\r\n\t\t\tConnectionUtils connectionUtils = new ConnectionUtils();\r\n\t\t\tConnection connection = connectionUtils.openConnection();\r\n\t\t\tPreparedStatement ps = connection.prepareStatement(\"select phone_number from person where name = ?\");\r\n\t\t\tps.setString(1, searched);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tPersonaBean person = null;\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tperson = new PersonaBean(searched, rs.getString(\"phone_number\"));\r\n\t\t\t}\r\n\t\t\treturn person;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n\tpublic Teacher findByName(String name) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql=\"from Teacher t where name=?\";\n\t\tQuery query=session.createQuery(hql);\n\t\tquery.setParameter(0, name);\n\t\tList<Teacher> tlist=query.list();\n\t\tTeacher teacher=tlist.get(0);\n\t\treturn teacher;\n\t}", "private void showStaff() {\n\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\tString sql=\"select * from Staff\";\r\n\t\tResultSet rs=ado.executeSelect(sql);\r\n\t\tString str=\"\";\r\n\t\tstr+=\"员工编号:\"+\" 职位:\"+\" 姓名:\"+\" 性别: \"+\" 电话号码:\"+\"\\n\";\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tString no=rs.getString(\"StaffNo\");\r\n\t\t\t\tString jobname=rs.getString(\"JobName\");\r\n\t\t\t\tString name=rs.getString(\"Name\");\r\n\t\t\t\tString sex=rs.getString(\"Sex\");\r\n\t\t\t\tString phone=rs.getString(\"Phone\");\r\n\t\t\t\tif(no.length()<8){\r\n\t\t\t\t\tfor(int i=no.length();i<=12;i++)\r\n\t\t\t\t\t\tno+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(jobname.length()<8){\r\n\t\t\t\t\tfor(int i=jobname.length();i<=8;i++)\r\n\t\t\t\t\t\tjobname+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(name.length()<8){\r\n\t\t\t\t\tfor(int i=name.length();i<=8;i++)\r\n\t\t\t\t\t\tname+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(sex.length()<8){\r\n\t\t\t\t\tfor(int i=sex.length();i<=8;i++)\r\n\t\t\t\t\t\tsex+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(phone.length()<12){\r\n\t\t\t\t\tfor(int i=phone.length();i<=12;i++)\r\n\t\t\t\t\t\tphone+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tstr+=no+jobname+name+sex+phone+\"\\n\";\r\n\t\t\t}\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}\r\n\t\ttextAreaStaff.setText(str);\r\n\t}", "private Contacts getContact(String name) {\n Contacts foundContact = contactList.stream()\n .filter(contact ->\n contact.getFirstName().equals(name) ||\n contact.getLastName().equals(name))\n .findFirst().orElse(null);\n return foundContact;\n }", "public Staff manageStaffList(String givenName, String familyName) throws RosterException {\n\t\treturn _staffList.getStaff(givenName + \" \" + familyName);\n\t}", "public int findContact(String name) {\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tif (name.equals(contacts.get(i).getName())){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public Staff(String staffId, String staffPass) {\n\t\tthis.staffId = staffId;\n\t\tthis.staffPass = staffPass;\n\t}", "public boolean findTeam(String teamName) throws SQLException {\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:users\");\n\t\tStatement stmt = conn.createStatement();\n\t\tString SQL = \"select * from leaguestandings where TeamName = '\" + teamName + \"';\";\n\n\t\tResultSet rset = stmt.executeQuery(SQL);\n\n\t\tif (rset.next()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public com.ext.portlet.model.StaffMember createStaffMember(long id) {\n return _staffMemberLocalService.createStaffMember(id);\n }", "public Tutor findTutor(final String name) {\n for (Tutor tutor : tutors) {\n if (name.equals(tutor.getName())) {\n return tutor;\n }\n }\n\n return null;\n }", "public Player getStaff() {\n return staff;\n }", "@Override\n\tpublic List<UserStaffDTO> readStaffByUserId(int user_id) throws Exception {\n\t\treturn dao.readStaffByUserId(user_id);\n\t}", "public Student findStudent(int id);", "public Student checkStu(String name) throws Exception {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql:///stuu\",\n\t\t\t\t\"root\", \"root\");\n\t\tPreparedStatement ps = con\n\t\t\t\t.prepareStatement(\"SELECT * from student where sname=?\");\n\t\tps.setString(1, name);\n\t\tResultSet rs = ps.executeQuery();\n\t\tStudent stu = null;\n\t\twhile(rs.next()){\n\t\t\t stu = new Student(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6));\n\t\t}\n\t\trs.close();\n\t\tps.close();\n\t\tcon.close();\n\t\treturn stu;\n\t}", "public Staff(String alias) {\n this(DSL.name(alias), STAFF);\n }", "public User getSingleUserRealName(String name) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from User as user where CONCAT_WS(' ',user.firstName, user.lastName) = ? \",\n new Object[]{name},\n new Type[]{Hibernate.STRING});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\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 if (results.isEmpty()) {\n return null;\n } else {\n return (User) results.get(0);\n }\n\n }", "public Team findTeamFromName(String name) {\r\n Iterator<Team> itr = this.getTeamTreeFromMatchTree().iterator();\r\n Team team;\r\n while (itr.hasNext()){\r\n team = itr.next();\r\n if (team.getName().equals(name)){\r\n return team;\r\n }\r\n }\r\n return null;\r\n }", "public String validation(String inputStaffId, String inputStaffPw) {\n\t\t\tif(restaurant.findStaff(inputStaffId) != null) {\n\t\t\t\tstaff = restaurant.findStaff(inputStaffId);\t\t\n\t\t\t\tif(staff.getStaffPassword().equals(inputStaffPw)) {\n\t\t\t\t\treturn \"Login successfully!\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn \"Invalid password!\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn \"Invalid staff ID!\";\n\t\t\t}\n\t}", "School findSchoolByName(String schoolName) throws TechnicalException;", "public Document getDocumentByName(String docName) {\n\t\tint i=0;\n\t\twhile(i<myDocument.size()) {\n\t\t\tDocument doc = myDocument.get(i);\n\t\t\tif(doc.getDocName().equals(docName)) return doc;\n\t\t\ti++;\n\t\t}\n\t\ti=0;\n\t\twhile(i<sharedToMe.size()) {\n\t\t\tDocument doc = sharedToMe.get(i);\n\t\t\tif(doc.getDocName().equals(docName)) return doc;\n\t\t\ti++;\n\t\t}\n\t\treturn null;\n\t}", "@Transactional(readOnly = true)\n public Optional<Faculty> findOne(Long id) {\n log.debug(\"Request to get Faculty : {}\", id);\n return facultyRepository.findOneWithEagerRelationships(id);\n }", "private DocumentType findByName(String name, boolean caseSensitive) {\n \tif (name == null) {\n \t\treturn null;\n \t}\n return documentTypeDAO.findByName(name, caseSensitive);\n }", "@POST\r\n\t@Produces(\"application/JSON\")\r\n\t@Consumes(\"application/JSON\")\r\n\tpublic ZooStaff createStaff(ZooStaff staff) {\r\n\t\tservice.registerStaff(staff);\r\n\t\treturn staff;\r\n\t}", "public Staff(Name alias) {\n this(alias, STAFF);\n }", "public boolean staffUpdate(StaffPojo staff) {\n\t\treturn staffDao.staffUpdate(staff);\n\t}", "public Region findRegion(Staff find) {\n for (int i = 0; i < numRegions; i++) {\n Staff[] temp = regionList[i].getRegionStaff();\n for (int j = 0; j < regionList[i].getRegionSpec().getNumStaff(); j++) {\n if (temp[j].equals(find)) {\n return regionList[i]; \n }\n }\n }\n return null;\n }", "public <T extends Actor> T findActor(String name) {\n com.guidebee.game.engine.scene.Actor actor = internalGroup.findActor(name);\n if (actor != null) {\n return (T) actor.getUserObject();\n }\n return null;\n\n }", "public Student findStudent(int studentNumber)\r\n {\r\n for(Student s : students) // look in the list\r\n {\r\n if(s.getStudentNumber() == studentNumber) // if the student number is the same\r\n return s;\r\n }\r\n\r\n return null;\r\n }", "Team findByName(String name);", "public static LinkedList<Actor> nameSearch(String name) {\n //sets name to lower case\n String hname = name.toLowerCase();\n //hashes the lower cased name\n int hash = Math.abs(hname.hashCode()) % ActorList.nameHashlist.length;\n //finds the location of the linked list\n LinkedList<Actor> location = ActorList.nameHashlist[hash];\n //sets the head to the head of the linked list\n LinkedList.DataLink head = location.header;\n\n\n while (head.nextDataLink != null) {\n //runs until next data link is null and gets each Actor\n Actor actor = (Actor) head.nextDataLink.data;\n //checks the name of the actor to inputted name\n if (actor.getName().toLowerCase().equals(hname)) {\n //if it's the same it returns the actor\n return location;\n //or moves to next link\n } else {\n head = head.nextDataLink;\n }\n }\n //returns null if the list does not match input\n return null;\n\n\n }", "@Override\r\n\tpublic User findUser(String name) {\n\t\tSession session=DaoUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.\r\n\t\t\r\n\t\t\r\n\t\treturn user;\r\n\t}", "public Vector getStaffNames() throws Exception {\n String user = (String) request.getSession(false).getAttribute(\"user\");\n String account = (String) request.getSession(false).getAttribute(\"account\");\n ArdaisstaffAccessBean myStaff = new ArdaisstaffAccessBean();\n AccessBeanEnumeration myStaffEnum =\n (AccessBeanEnumeration) myStaff.findLocByUserProf(user, account);\n myStaff = (ArdaisstaffAccessBean) myStaffEnum.nextElement();\n GeolocationKey key = myStaff.getGeolocationKey();\n AccessBeanEnumeration staffList =\n (AccessBeanEnumeration) myStaff.findArdaisstaffByGeolocation(key);\n\n Vector staffNames = new Vector();\n while (staffList.hasMoreElements()) {\n myStaff = (ArdaisstaffAccessBean) staffList.nextElement();\n String firstName = myStaff.getArdais_staff_fname();\n if (firstName == null)\n firstName = \"\";\n String lastName = myStaff.getArdais_staff_lname();\n if (lastName == null)\n lastName = \"\";\n staffNames.add(firstName + \" \" + lastName);\n staffNames.add(((ArdaisstaffKey) myStaff.__getKey()).ardais_staff_id);\n }\n\n return staffNames;\n }", "public Staff() {\n\t\tthis.staffId = null;\n\t\tthis.staffPass = null;\n\t}", "public int findDoctors(String name) {\n\t\tint i;\n\t\tfor (i = 0; i < doc.size(); i++) {\n\t\t\tif (name.equals(doc.get(i).getName())) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}" ]
[ "0.6652207", "0.6540578", "0.64134926", "0.6402986", "0.63840586", "0.60835576", "0.60447276", "0.6039119", "0.6023895", "0.60094273", "0.59133834", "0.5887025", "0.5773708", "0.57382315", "0.5713911", "0.56509006", "0.5599413", "0.5581353", "0.5552618", "0.5511728", "0.5504841", "0.55025315", "0.55022144", "0.54826117", "0.54794276", "0.547933", "0.54361796", "0.5432473", "0.5415684", "0.5307816", "0.5235352", "0.518763", "0.51849556", "0.515702", "0.5148259", "0.5142856", "0.5142151", "0.5121506", "0.5109346", "0.51066685", "0.50959164", "0.507261", "0.5071155", "0.5062065", "0.5059178", "0.50546014", "0.5050237", "0.5048026", "0.5040899", "0.50365055", "0.5021893", "0.50185627", "0.5018173", "0.501775", "0.49924892", "0.49832723", "0.49539843", "0.49396998", "0.49233127", "0.49190688", "0.49007246", "0.48872924", "0.48821566", "0.48799643", "0.48790497", "0.4878653", "0.4864882", "0.48632976", "0.48580292", "0.48556316", "0.48548317", "0.48537487", "0.485089", "0.48494393", "0.48369688", "0.48218516", "0.48202723", "0.481736", "0.48166442", "0.48141634", "0.47955957", "0.47946745", "0.4787371", "0.47826648", "0.47810286", "0.47627908", "0.4745697", "0.47442898", "0.4742424", "0.47421917", "0.47386226", "0.47356328", "0.47321004", "0.47294772", "0.47287402", "0.4725914", "0.47244343", "0.47060382", "0.47059226", "0.47057945" ]
0.6942252
0
/ searchStaff: This search method works both ways; the user inputs either a String or an integer. Searches staff using a string or number, differentiated by determining input type
public Staff searchStaff() { //takes in inputs from user find a Staff while (true) { //will keep looping util returns a value System.out.print("Search by entering Name or Employee Number: "); String findEmp = ""; try { findEmp = sc.nextLine(); if (findStaff(Integer.parseInt(findEmp), 0, numStaff - 1) != null) { //if can parse search for emp num return findStaff(Integer.parseInt(findEmp), 0, numStaff - 1); } else { System.out.println("Cannot be found"); } } catch (NumberFormatException NFX) { //if cannot parse search for emp name if (findStaff(findEmp, 0, numStaff - 1) != null) { return findStaff(findEmp, 0, numStaff - 1); } else { System.out.println("Cannot be found"); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void searchStaffByName(){\n\t\tshowMessage(\"type the name you are looking for: \\n\");\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listEmployee(EmployeeSearch.employee(employee.getAllEmployee(),name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n //if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchStaffByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t}", "public abstract List<CustomerType> findCustomerTypebyCustomerTypeNumber(String searchString);", "public void searchStaff(String searchTxt) {\n assertAndType(xpathSearchTF, searchTxt);\n clickOnBtn(SEARCH_A_STAFF);\n logger.info(\"# Performed staff search for '\" + searchTxt + \"'\");\n }", "public List<Staff> searchStaff(String searchString) {\n\t\t\n\t\tArrayList<Staff> result = new ArrayList<Staff>();\n\t\t\n\t\tSQLiteDatabase db = mDbHelper.getReadableDatabase();\n\t\tCursor cursor;\n\t\t\n\t\tStaff staff;\n\t\t\n\t\tcursor = db.rawQuery(\"SELECT a.id, a.name, password_ as pwd, mobile, phone, organization_id, \"\n\t\t\t\t + \" department_id, position_id, b.name as position_name \"\n + \"FROM staff a, position_ b \"\n + \"WHERE (a.name like '%\" + searchString + \"%' OR mobile like '%\" + searchString \n + \"%' OR phone like '%\" + searchString + \"%') AND a.position_id = b.id \" \n\t\t + \" AND is_warrant = '1' AND is_departure = '0' AND is_hipe = '0' \", null);\n\t\t\n\t\twhile (cursor.moveToNext()) {\n\t\t\t\n\t\t\tstaff = new Staff();\n\t\t\t\n\t\t\tstaff.setId(cursor.getInt(cursor.getColumnIndex(\"id\")));\n\t\t\tstaff.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n\t\t\tstaff.setPwd(cursor.getString(cursor.getColumnIndex(\"pwd\")));\n\t\t\tstaff.setMobile(cursor.getString(cursor.getColumnIndex(\"mobile\")));\n\t\t\tstaff.setPhone(cursor.getString(cursor.getColumnIndex(\"phone\")));\n\t\t\tstaff.setOrganizationId(cursor.getInt(cursor.getColumnIndex(\"organization_id\")));\n\t\t\tstaff.setDepartmentId(cursor.getInt(cursor.getColumnIndex(\"department_id\")));\n\t\t\tstaff.setPositionId(cursor.getInt(cursor.getColumnIndex(\"position_id\")));\n\t\t\tstaff.setPositionName(cursor.getString(cursor.getColumnIndex(\"position_name\")));\n\t\t\tstaff.setSelected(false);\n\t\t\t\n\t\t\tresult.add(staff);\n\t\t}\n\t\t\n\t\tcursor.close();\n\t\tdb.close();\n\t\t\n\t\treturn result;\n\t}", "public List<User> searchUser(String searchValue);", "public List<StaffPojo> staffSearchByPhoneNo(String sphone) {\n\t\treturn staffDao.staffSearchByPhoneNo(sphone);\n\t}", "public List<StaffPojo> staffSearchByName(String sname) {\n\t\treturn staffDao.staffSearchByName(sname);\n\t}", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "abstract public void search();", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "List<DataTerm> search(String searchTerm);", "public List<StaffDTO> findByiDNumber(String iDNumber);", "@In String search();", "@Override\n\tpublic List<Contact> search(String str) {\n\t\treturn null;\n\t}", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "public StaffPojo staffSearchById(String sid) {\n\t\treturn staffDao.staffSearchById(sid);\n\t}", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "void search();", "void search();", "public List<Bookmark> searchBookmarks (String searchString, BookmarkType type, Long userId) throws BookMarkException;", "public static void searchContact ( LinkedList contactsList, int menuChoice ) { \n\t\tif ( menuChoice == 1 ) { // if chosen to search by last name\n\t\t\tSystem.out.print ( \"\\n\" + \"Enter the contact's last name: \" ); // prompt\n\t\t\tString lastName = CheckInput.getString ( ); // assign\n\t\t\tLinkedList matches = contactsList.search ( lastName ); // .search will return an array with corresponding last names\n\t\t\tSystem.out.print ( \"\\n\" );\n\t\t\tif ( matches.isEmpty ( ) ) { // matches is empty if user gave a last name no on has\n\t\t\t\tSystem.out.println ( \"No one with that last name exists.\" );\n\t\t\t} else { // if the list is not empty\n\t\t\t\tfor ( int i = 0; i < matches.size ( ); i++ ) { // iterate to print the given matches\n\t\t\t\t\tSystem.out.print ( matches.get ( i ).toString ( ) ); // prints out the matching contacts\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( menuChoice == 2 ) { // if chosen to search by zip\n\t\t\tSystem.out.print ( \"\\n\" + \"Enter the contact's zip code: \" ); // prompt\n\t\t\tint zipCode = CheckInput.getInt ( ); // assign\n\t\t\tLinkedList matches = contactsList.search ( zipCode ); // gets array of matches\n\t\t\tSystem.out.print ( \"\\n\" );\n\t\t\tif ( matches.isEmpty ( ) ) { // if match array is empty\n\t\t\t\tSystem.out.println ( \"No one with that zip code exists.\" ); // means no matches were found\n\t\t\t} else { // if not empty\n\t\t\t\tfor ( int i = 0; i < matches.size ( ); i++ ) {\n\t\t\t\t\tSystem.out.print ( matches.get ( i ).toString ( ) ); // prints the matches\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.print ( \"\\n\" + \"\\n\" );\n\t}", "@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void searchPerson() {\r\n\r\n\t/*get values from text filed*/\r\n\tname = tfName.getText();\r\n\r\n\t/*clear contents of arraylist if there are any from previous search*/\r\n\tpersonsList.clear();\r\n\r\n // intialize recordNumber to zero\r\n\trecordNumber = 0;\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to search.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*get an array list of searched persons using PersonDAO*/\r\n\t\tpersonsList = pDAO.searchPerson(name);\r\n\r\n\t\tif(personsList.size() == 0)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No record found.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*downcast the object from array list to PersonInfo*/\r\n\t\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\t\ttfName.setText(person.getName());\r\n\t\t\ttfAddress.setText(person.getAddress());\r\n\t\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\t\ttfEmail.setText(person.getEmail());\r\n\t\t}\r\n\t}\r\n\r\n }", "private void searchRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the name of the routine:\",\n \"Search\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n try {\n Routine r = collection.search(s);\n list.setSelectedValue(r, true);\n } catch (DoesNotExistException ee) {\n JOptionPane.showMessageDialog(this, \"Routine with given name does not exist.\");\n }\n }\n }", "public void searchByAccount() {\n\t\t\n\t\tlog.log(Level.INFO, \"Please Enter the account number you want to search: \");\n\t\tint searchAccountNumber = scan.nextInt();\n\t\tbankop.search(searchAccountNumber);\n\n\t}", "public Staff findStaff(String staffName, int start, int end) { //because recursive\n int mid = (start + end) / 2;\n if (end - start > 1) {\n if (findStaff(staffName, start, mid) != null) {\n return findStaff(staffName, start, mid);\n } else {\n return findStaff(staffName, mid, end);\n }\n } else {\n if (staffList[start].getStaffName().equals(staffName)) {\n return staffList[start];\n } else if (staffList[end].getStaffName().equals(staffName)) {\n return staffList[end]; \n } else {\n return null; \n }\n }\n }", "public Staff findStaff(int staffNum, int start, int end) { //because recursive\n int mid = (start + end) / 2;\n if (end - start > 1) {\n if (findStaff(staffNum, start, mid) != null) {\n return findStaff(staffNum, start, mid);\n } else {\n return findStaff(staffNum, mid, end);\n }\n } else {\n if (staffList[start].getStaffNum() == staffNum) {\n return staffList[start];\n } else if (staffList[end].getStaffNum() == staffNum) {\n return staffList[end]; \n } else {\n return null; \n }\n }\n }", "public ArrayList<University> fieldSearch(String schoolName, String state, String location, int numStudentsMin,\n\t\t\tint numStudentsMax, float percentFemaleMin, float percentFemaleMax, int SATVerbalMin, int SATVerbalMax,\n\t\t\tint SATMathMin, int SATMathMax, int expensesMin, int expensesMax, float PercentFinancialAidMin,\n\t\t\tfloat percenetFinancialAidMax, int numberApplicantsMin, int numberApplicatnsMax, float percentAddmittedMin,\n\t\t\tfloat percentAdmittedMax, float percentEnrolledMin, float percentEnrolledMax, int academicScaleMin,\n\t\t\tint academicScaleMax, int socialScalemin, int socialScaleMax, int qualityOfLifeMin, int qualityOfLifeMax,\n\t\t\tString[] emphases, String control) {\n\t\tArrayList<University> matchSchools;\n\n\t\tif (!sfCon.loggedIn) {\n\n\t\t\tif (schoolName.equals(\"\") && state.equals(\"\") && location.equals(\"\") && numStudentsMin == -1\n\t\t\t\t\t&& numStudentsMax == -1 && percentFemaleMin == -1 && percentFemaleMax == -1 && SATVerbalMin == -1\n\t\t\t\t\t&& SATVerbalMax == -1 && SATMathMin == -1 && SATMathMax == -1 && expensesMin == -1\n\t\t\t\t\t&& expensesMax == -1 && PercentFinancialAidMin == -1 && percenetFinancialAidMax == -1\n\t\t\t\t\t&& numberApplicantsMin == -1 && numberApplicatnsMax == -1 && percentAddmittedMin == -1\n\t\t\t\t\t&& percentAdmittedMax == -1 && percentEnrolledMin == -1 && percentEnrolledMax == -1\n\t\t\t\t\t&& academicScaleMin == -1 && academicScaleMax == -1 && socialScalemin == -1 && socialScaleMax == -1\n\t\t\t\t\t&& qualityOfLifeMin == -1 && qualityOfLifeMax == -1 && control.equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException(\"Sorry, you must input at least one search field\");\n\t\t\t}\n\n\t\t\telse if ((numStudentsMax < numStudentsMin && numStudentsMax != -1)\n\t\t\t\t\t|| (percentFemaleMax < percentFemaleMin && percentFemaleMax != -1)\n\t\t\t\t\t|| (SATVerbalMax < SATVerbalMin && SATVerbalMax != -1)\n\t\t\t\t\t|| (SATMathMax < SATMathMin && SATMathMax != -1) || (expensesMax < expensesMin && expensesMax != -1)\n\t\t\t\t\t|| (percenetFinancialAidMax < PercentFinancialAidMin && percenetFinancialAidMax != -1)\n\t\t\t\t\t|| (numberApplicatnsMax < numberApplicatnsMax && numberApplicatnsMax != -1)\n\t\t\t\t\t|| (percentAdmittedMax < percentAddmittedMin && percentAdmittedMax != -1)\n\t\t\t\t\t|| (percentEnrolledMax < percentEnrolledMin && percentEnrolledMax != -1)\n\t\t\t\t\t|| (academicScaleMax < academicScaleMin && academicScaleMax != -1)\n\t\t\t\t\t|| (socialScaleMax < socialScalemin && socialScaleMax != -1)\n\t\t\t\t\t|| (qualityOfLifeMax < qualityOfLifeMin && qualityOfLifeMax != -1)) {\n\t\t\t\tthrow new IllegalArgumentException(\"Sorry, your no minimum can be greater than a maximum\");\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tmatchSchools = sfCon.search(schoolName, state, location, numStudentsMin, numStudentsMax,\n\t\t\t\t\t\tpercentFemaleMin, percentFemaleMax, SATVerbalMin, SATVerbalMax, SATMathMin, SATMathMax,\n\t\t\t\t\t\texpensesMin, expensesMax, PercentFinancialAidMin, percenetFinancialAidMax, numberApplicantsMin,\n\t\t\t\t\t\tnumberApplicatnsMax, percentAddmittedMin, percentAdmittedMax, percentEnrolledMin,\n\t\t\t\t\t\tpercentEnrolledMax, academicScaleMin, academicScaleMax, socialScalemin, socialScaleMax,\n\t\t\t\t\t\tqualityOfLifeMin, qualityOfLifeMax, emphases, control);\n\t\t\t\tfor (int i = 0; i < matchSchools.size(); i++) {\n\t\t\t\t\tSystem.out.println(matchSchools.get(i).getName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\"Sorry, you must be logged in to access this functionality\");\n\t\t}\n\n\t\treturn matchSchools;\n\t}", "protected void lookForNumber(String searchString) {\n\t\tif(rdbtnExactMatch.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().equals(searchString.toLowerCase()))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].equals(searchString))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name starting with searchString\r\n\t\telse if(rdbtnStartsWith.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().startsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].startsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name ending with searchString\r\n\t\telse {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().endsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].endsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public void search() {\r\n \t\r\n }", "private static int getUserStaffByCategory () {\n\t\tBufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint input;\n\t\t\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tinput = Integer.parseInt(myReader.readLine());\n\t\t\t\t\n\t\t\t\tif ((input < 1) || (input > 7)) {\n\t\t\t\t\tSystem.out.println(\"please type in a number between 1-7.\");\n\t\t\t\t}\n\t\t\t\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Character invalid. Please enter a number between 1-7.\");\n\t\t\t\tinput = 0;\n\t\t\t}\t\n\t\t}while((input < 1) || (input > 7));\n\t\t\n\t\treturn input;\n\t\t\n\t}", "public abstract Solution<T> search(Searchable<T> s);", "Data<User> getUserSearch(String user);", "public abstract S getSearch();", "Search getSearch();", "public void searchByName() {\n System.out.println(\"enter a name to search\");\n Scanner sc = new Scanner(System.in);\n String fName = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (fName.equals(person.getFirstName())) {\n List streamlist = list.stream().\n filter(n -> n.getFirstName().\n contains(fName)).\n collect(Collectors.toList());\n System.out.println(streamlist);\n }\n }\n }", "public int search_userid(String user_name);", "java.lang.String getSearchValue();", "@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's name\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t}", "private void search(String[] searchItem)\n {\n }", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "public List<User> listSearch(String search);", "private void searchFunction() {\n\t\t\r\n\t}", "public void search() {\n }", "List<ResultDTO> searchUser(String query);", "public List<Product> search(String searchString);", "abstract public boolean performSearch();", "@Test\r\n\tvoid testSearch() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tint output = test.search(10);\r\n\t\tassertEquals(1, output);\r\n\t}", "public void searchFor(View view) {\n // Get a handle for the editable text view holding the user's search text\n EditText userInput = findViewById(R.id.user_input_edit_text);\n // Get the characters from the {@link EditText} view and convert it to string value\n String input = userInput.getText().toString();\n\n // Search filter for search text matching book titles\n RadioButton mTitleChecked = findViewById(R.id.title_radio);\n // Search filter for search text matching authors\n RadioButton mAuthorChecked = findViewById(R.id.author_radio);\n // Search filter for search text matching ISBN numbers\n RadioButton mIsbnChecked = findViewById(R.id.isbn_radio);\n\n if (!input.isEmpty()) {\n // On click display list of books matching search criteria\n // Build intent to go to the {@link QueryResultsActivity} activity\n Intent results = new Intent(MainActivity.this, QueryListOfBookActivity.class);\n\n // Get the user search text to {@link QueryResultsActivity}\n // to be used while creating the url\n results.putExtra(\"topic\", mUserSearch.getText().toString().toLowerCase());\n\n // Pass search filter, if any\n if (mTitleChecked.isChecked()) {\n // User is searching for book titles that match the search text\n results.putExtra(\"title\", \"intitle=\");\n } else if (mAuthorChecked.isChecked()) {\n // User is searching for authors that match the search text\n results.putExtra(\"author\", \"inauthor=\");\n } else if (mIsbnChecked.isChecked()) {\n // User is specifically looking for the book with the provided isbn number\n results.putExtra(\"isbn\", \"isbn=\");\n }\n\n // Pass on the control to the new activity and start the activity\n startActivity(results);\n\n } else {\n // User has not entered any search text\n // Notify user to enter text via toast\n\n Toast.makeText(\n MainActivity.this,\n getString(R.string.enter_text),\n Toast.LENGTH_SHORT)\n .show();\n }\n }", "public SearchResult search(String text, String subText);", "public void doSearch(String searchText){\n }", "private Staff findById(String id) throws Exception{\n if(StringUtils.isBlank(id) || StringUtils.equalsIgnoreCase(id, \"0\"))\n throw new Exception(\"Invalid staff id\");\n\n try{\n Staff staff = this.em.find(Staff.class, Integer.parseInt(id));\n if(staff == null)\n throw new Exception(\"Staff not found\");\n else\n return staff;\n\n }catch (IllegalArgumentException ex){\n throw new Exception(\"Provide a valid staff entity or primary key\");\n }\n }", "String searchBoxUserRecord();", "Customer search(String login);", "List<SearchResult> search(SearchQuery searchQuery);", "public void searchFlights();", "public void searchSystem( Integer option, String buff ) {\n\t\tswitch ( option ) {\n\t\t case 1:\n\t\t \tarchive.searchTitle( buff );\n\t\t \tbreak;\n\t\t case 2:\n\t\t \tarchive.searchAuthor( buff );\n\t\t \tbreak;\n\t\t case 3:\n\t\t \tarchive.searchPublisher( buff );\n\t\t \tbreak;\n\t\t default:\n\t\t \tbreak;\n\t\t}\n\t}", "void searchProbed (Search search);", "String printListSearch(String searchString);", "public abstract int search(String[] words, String wordToFind) throws ItemNotFoundException;", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint longest = 0;\r\n\t\tint smallest = 999;\r\n\t\tint sum = 0;\r\n\t\tString l = \"\";\r\n\t\tString s = \"\";\r\n\t\tSystem.out.println(\"How many friends do you know?\");\r\n\t\tLongAndShort[] friends = new LongAndShort[input.nextInt()];\r\n\t\tfor (int i = 0; i < friends.length; i++) {\r\n\t\t\tinput.nextLine();\r\n\t\t\tSystem.out.println(\"What is your friend's name?\");\r\n\t\t\tString name = input.nextLine();\r\n\t\t\tSystem.out.println(\"What is his age?\");\r\n\t\t\tint xAge = input.nextInt();\r\n\t\t\tfriends[i] = new LongAndShort(name, xAge);\r\n\t\t}\r\n\t\t// for longest smallest\r\n\t\tSystem.out.println(\"Friends:\");\r\n\t\tfor (int j = 0; j < friends.length; j++) {\r\n\t\t\tSystem.out.println(friends[j].getFull());\r\n\t\t\tString fullname = friends[j].getFull();\r\n\t\t\t// for the average\r\n\t\t\tsum += fullname.length() - 1;\r\n\t\t\t// for the average\r\n\t\t\tif (fullname.length() > longest) {\r\n\t\t\t\tlongest = fullname.length();\r\n\t\t\t\tl = fullname;\r\n\t\t\t}\r\n\t\t\tif (fullname.length() < smallest) {\r\n\t\t\t\tsmallest = fullname.length();\r\n\t\t\t\ts = fullname;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// for longest smallest\r\n\t\t// for search\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Input Search Parameter:\\n1. First Name\\n2. Last Name\\n3. Age\");\r\n\t\tint choice = input.nextInt();\r\n\t\tString comp = \"\";\r\n\t\tint xAge = 0;\r\n\t\tswitch (choice) {\r\n\t\tcase 1:\r\n\t\t\tinput.nextLine();\r\n\t\t\tSystem.out.println(\"What is the First name?\");\r\n\t\t\tcomp = input.nextLine();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tinput.nextLine();\r\n\t\t\tSystem.out.println(\"What is the Last name?\");\r\n\t\t\tcomp = input.nextLine();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"What is the age?\");\r\n\t\t\txAge = input.nextInt();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out.println(\"---------------\");\r\n\t\tfor (int k = 0; k < friends.length; k++) {\r\n\t\t\tif (friends[k].search(choice, comp, xAge)) {\r\n\t\t\t\tSystem.out.println(friends[k].getFull() + \", Age: \" + friends[k].getAge());\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"---------------\");\r\n\t\t// for search\r\n\t\tSystem.out.println(\"Longest Name: \" + l);\r\n\t\tSystem.out.println(\"Smallest Name: \" + s);\r\n\t\tSystem.out.println(\"Range of Length: \" + (l.length() - s.length()));\r\n\t\tSystem.out.println(\"Average Length: \" + (sum / friends.length));\r\n\t\tinput.close();\r\n\t}", "public abstract List<LocationDto> searchLocationType(int loc_type_id);", "public List<Ve> searchVe(String maSearch);", "public abstract List<LocationDto> search_type_building\n (BuildingDto building, LocationTypeDto type);", "public void search(final FullTextSearch searcher, final ModelElementBox station, final String typeName) {\r\n\t\tfor (Map.Entry<String,Map<String,Object>> entry1: data.entrySet()) {\r\n\t\t\tfinal String clientType1=entry1.getKey();\r\n\t\t\tfor (Map.Entry<String,Object> entry2: entry1.getValue().entrySet()) {\r\n\t\t\t\tfinal String clientType2=entry2.getKey();\r\n\t\t\t\tfinal Object value=entry2.getValue();\r\n\t\t\t\tif (value instanceof String) {\r\n\t\t\t\t\tsearcher.testString(station,String.format(Language.tr(\"Editor.DialogBase.Search.ClientTypeClientTypeExpression\"),clientType1,clientType2),(String)value,newValue->data.get(clientType1).put(clientType2,newValue));\r\n\t\t\t\t}\r\n\t\t\t\tif (value instanceof AbstractRealDistribution) {\r\n\t\t\t\t\tsearcher.testDistribution(station,String.format(Language.tr(\"Editor.DialogBase.Search.ClientTypeClientTypeDistribution\"),clientType1,clientType2),(AbstractRealDistribution)value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void searchPhone(Contact[] myContacts, String find)\n {\n int counter = 0;\n System.out.println(\"Find results: \");\n for(int i = 0; i<myContacts.length; i++)\n {\n if(myContacts[i].getPhone().equals(find))\n {\n System.out.println(myContacts[i]);\n counter++;\n }\n }\n if(counter == 0)\n {\n System.out.println(\"There are no listings for \"+find);\n }\n else if(counter == 1)\n {\n System.out.println(\"There was \"+counter+\" listing for \"+find);\n }\n else\n {\n System.out.println(\"There were \"+counter+\" listings for \"+find);\n }\n }", "@Override\n\tpublic List queryfind(String type, String query)\n\t{\n\t\treturn teataskMapper.queryfind(type, query);\n\t}", "List<ShipmentInfoPODDTO> search(String query);", "private static void searchForItem() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println(\" Please type your search queries\");\r\n\t\tSystem.out.println();\r\n\t\tString choice = \"\";\r\n\t\tif (scanner.hasNextLine()) {\r\n\t\t\tchoice = scanner.nextLine();\r\n\t\t}\r\n\t\t//Currently only supports filtering by name\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" All products that matches your search are as listed\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Id|Name |Brand |Price |Total Sales\");\r\n\t\tint productId = 0;\r\n\t\tfor (Shop shop : shops) {\r\n\t\t\tint l = shop.getAllSales().length;\r\n\t\t\tfor (int j = 0; j < l; j++) {\r\n\t\t\t\tif (shop.getAllSales()[j].getName().contains(choice)) {\r\n\t\t\t\t\tprintProduct(productId, shop.getAllSales()[j]);\r\n\t\t\t\t}\r\n\t\t\t\tproductId++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<Contact> searchContacts(Map<SearchTerm,String> criteria);", "private Object queryDatabase(String searchType, String searchTerm) {\n Connection connection = null;\n PreparedStatement statement = null;\n Search search = new Search();\n ResultSet resultSet = null;\n String queryString = null;\n\n try {\n connection = getConnection(connection);\n\n queryString = getQueryString(searchType);\n\n statement = connection.prepareStatement(queryString);\n \n if (searchType.equals(\"employeeId\")) {\n statement.setString(1, searchTerm);\n } else {\n statement.setString(1, searchTerm + \"%\");\n }\n\n resultSet = statement.executeQuery();\n\n buildEmployeeList(resultSet, search);\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n System.err.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n\n\n if (statement != null) {\n statement.close();\n }\n\n\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }\n return search;\n }", "public static void search(String searchInput)\n {\n if (!searchInput.isEmpty())\n {\n searchInput = searchInput.trim();\n if (mNameSymbol.containsKey(searchInput))\n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(searchInput);\n displayResults(lstTickerSymbols, searchInput);\n }\n else\n {\n Set<String> setNames = mNameSymbol.keySet();\n Iterator iterator = setNames.iterator();\n boolean matchMade = false;\n while (iterator.hasNext())\n {\n String storedName = (String)iterator.next();\n Float normalizedMatch = fuzzyScore(storedName, searchInput);\n if (normalizedMatch >= MIN_MATCH) \n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(storedName);\n displayResults(lstTickerSymbols, storedName);\n matchMade = true;\n }\n }\n if (matchMade == false)\n {\n displayNoResults();\n }\n }\n }\n else\n {\n displayNoResults();\n }\n }", "@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic ArrayList<Object> searchUserByName(String search) {\n\t\t\n\t\tSystem.out.println(\"i am in service search looking for users\" + search.length());\n\t\t\n\t\tif(search == null){\n\t\t\t\n\t\t\tSystem.out.println(\"nothing can be find\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"its not 0000000000\");\n\t\t\n\t\tArrayList<Object> list = userRepository.findUserByName(search);\n\t\t\n\t\t//System.out.println(Arrays.toString(list));\n\t\treturn list;\n\t}", "List<Cemetery> search(String query);", "List<ResultDTO> search(String query);", "@GetMapping(\"/search\")\n public ResponseEntity searchField(@RequestParam(\"type\") String type,@RequestParam(\"value\")String value){\n return new ResponseEntity<>(hr_service.findByField(type,value),HttpStatus.OK);\n }", "public abstract Search defaultSearch(StringBuilder sb);", "List<TypeTreatmentPlanStatuses> search(String query);", "public List<String> getStaffInfo(String staffSpecific){\n\t\tswitch (staffSpecific) {\n\t\tcase \"registered\":\n\t\t\treturn _staffList.displayAllStaff(); //Display all registered staff.\n\t\tcase \"unassigned\":\n\t\t\treturn _staffList.displayUnassignedStaff(); //Display unassigned.\n\t\tdefault:\n\t\t\tthrow new UnsupportedOperationException(\"Shop.getStaffInfo must take string arguments of either \\\"registered\\\" or \\\"unassigned\\\"\");\n\t\t}\n\t}", "@Override\n\tpublic List<Person> search(Integer id) {\n\t\treturn null;\n\t}", "@Override\n @Transactional(readOnly = true)\n public List<WorkType> search(String query) {\n log.debug(\"Request to search WorkTypes for query {}\", query);\n return StreamSupport\n .stream(workTypeSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "@Override\r\n\tpublic void findByname(List<Student> list, Scanner sc) {\n\t\tSystem.out.println(\"请输入要查询的学生姓名\");\r\n\t\tString name=sc.next();\r\n\t\tfor(Student i:list){\r\n\t\t\tif(name.equals(i.getName())){\r\n\t\t\t\ti.info();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@GET\r\n\t@Produces(\"application/JSON\")\r\n\t@Path(\"/query\")\r\n\tpublic List<ZooStaff> getStaffByRole(@QueryParam(\"role\")String role) {\r\n\t\treturn service.getStaffByRole(role);\r\n\t}", "private int find(Student s) {\r\n\t\tint i = 0;\r\n\t\t\r\n\t\tString name = null;\r\n\t\t\r\n\t\twhile (i < numStudents) {\r\n\t\t\t\r\n\t\t\tif(list[i] instanceof Instate) {\r\n\t\t\t\tname = ((Instate)list[i]).get_fname() + \" \" + ((Instate)list[i]).get_lname();\r\n\t\t\t}\r\n\t\t\telse if(list[i] instanceof Outstate) {\r\n\t\t\t\tname = ((Outstate)list[i]).get_fname() + \" \" + ((Outstate)list[i]).get_lname();\r\n\t\t\t}\r\n\t\t\telse if (list[i] instanceof International) {\r\n\t\t\t\tname = ((International)list[i]).get_fname() + \" \" + ((International)list[i]).get_lname();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint bool = s.compareTo(name);\r\n\t\t\t\r\n\t\t\tif(bool == 0) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn -1;\r\n\t\t\t\r\n\t}", "public interface Search {\n ArrayList<Section> searchSecByTitle(String info);\n\n ArrayList<Section> searchSecByCourse_id(String info);\n}", "@GetMapping(value = \"/search\")\n\tpublic String searchName(@RequestParam(name = \"fname\") String fname, Model model) {\n\t\tmodel.addAttribute(\"employees\", employeerepository.findByFnameIgnoreCaseContaining(fname));\n\t\treturn \"employeelist\";\n\t}", "public Student getStudent(String match);", "List<User> findByfnameContaining(String search);", "List<TypePatientPropertyCondition> search(String query);", "public void searchRecords(Scanner input) {\n\t\tSystem.out.print(\"Enter a call number> \");\n\t\tString callNumber = input.nextLine();\n\n\t\tSystem.out.print(\"Enter title keywords> \");\n\t\tString[] keywords = null;\n\t\tString line = input.nextLine();\n\t\tif (!line.equals(\"\"))\n\t\t\tkeywords = line.split(\"[ ,\\n]+\");\n\n\t\tint startYear = Integer.MIN_VALUE, endYear = Integer.MAX_VALUE;\n\t\tboolean valid;\n\t\tdo {\n\t\t\tvalid = true;\n\t\t\tSystem.out.print(\"Enter a time period (startYear-endYear)> \");\n\t\t\tline = input.nextLine();\n\t\t\tif (!line.equals(\"\")) {\n\t\t\t\tint hyphen = line.indexOf('-');\n\t\t\t\tif (hyphen < 0)\n\t\t\t\t\tvalid = false;\n\t\t\t\telse {\n\t\t\t\t\tString startValue = line.substring(0, hyphen);\n\t\t\t\t\tint start = startValue.equals(\"\") ? Integer.MIN_VALUE: Integer.parseInt(startValue);\n\t\t\t\t\tString endValue = line.substring(hyphen + 1, line.length());\n\t\t\t\t\tint end = endValue.equals(\"\") ? Integer.MAX_VALUE : Integer.parseInt(endValue);\n\t\t\t\t\tif (start > Integer.MIN_VALUE\n\t\t\t\t\t\t\t&& (start < 1000 || start > 9999)\n\t\t\t\t\t\t\t|| end < Integer.MAX_VALUE\n\t\t\t\t\t\t\t&& (end < 1000 || end > 9999))\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\telse {\n\t\t\t\t\t\tstartYear = start;\n\t\t\t\t\t\tendYear = end;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!valid)\n\t\t\t\tSystem.out.println(\"All year values should be between 1000 and 9999.\");\n\t\t} while (!valid); /* Loop to enter only a valid year range */\n\n\t\t/* search for matched references */\n\t\tSystem.out.println(\"Matched references: \");\n\t\t/* Performs sequential search if search query does not contain a 'title' */\n\t\tif (keywords == null) {\n\t\t\tsearchBooks(callNumber, keywords, startYear, endYear);\n\t\t\tsearchJournals(callNumber, keywords, startYear, endYear);\n\t\t} else\n\t\t\t/* Performs HashMap search for records if search query contains a 'title' */\n\t\t\tsearchHashMap(keywords, callNumber, startYear, endYear);\n\t}", "private void searchMoviesSpecific() throws IOException {\n\t\t//the message prints the search parameter they are using by getting the value from the movieMenu map\n\t\tprint(\"Please enter the \"+movieMenu.get(currentSearch)+\" you wish to search for movies by\");\n\t\t//get the search param\n\t\tString searchParam = br.readLine();\n\t\t//more complicated boolean logic: if the currentSearch is 1, search by actor, else, if the currentSearch is 3, search by genre, else, search by title\n\t\tSet<Movie> results = (currentSearch == 1 ? searchByActor(searchParam) : \n\t\t\t(currentSearch == 3 ? searchByGenre(searchParam) : searchByTitle(searchParam)));\n\t\t\n\t\t//printResults() returns a boolean as to whether there is at least one title returned. If it returns true, print out the results\n\t\tif (printResults(results)) for (Movie mov : results) print(mov.getTitle());\n\t\t//print the menu that allows a user to search again or return to the login menu\n\t\tprintMovieMiniMenu();\n\t}", "public void search(Map<String, String> searchParam);", "public static Map<String, Long> searchFirstName(){\n boolean keepLooping = true;\n Map<String, Long> outputMap;\n do{\n outputMap = new HashMap<>();\n myScanner.nextLine();\n System.out.println(\"\\nEnter your search string: \\n\");\n String searchTerm = myScanner.next();\n myScanner.nextLine();\n\n for(Contact result : contactObjList){\n String firstName = result.getFirstName();\n if(firstName.toLowerCase().contains(searchTerm.toLowerCase())){\n outputMap.put(result.toContactString(), result.getId());\n }\n }\n if(outputMap.size() == 0){\n System.out.println(\"\\nNo results found.\\n\");\n } else {\n System.out.println(\"\\nHere are your search results:\\n\");\n }\n for(Map.Entry<String, Long> entry : outputMap.entrySet()){\n System.out.println(entry.getKey());\n }\n System.out.println(\"\\n\");\n int userSelect = selectFromList(repeatAction);\n if (userSelect==1){\n keepLooping=false;\n }\n } while(keepLooping);\n return outputMap;\n }", "public Collection<IPatient> searchPatients(String svn, String fname, String lname){\n _model = Model.getInstance();\n Collection<IPatient> searchresults = null;\n\n try {\n searchresults = _model.getSearchPatientController().searchPatients(svn, fname, lname);\n } catch (BadConnectionException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"BadConnectionException - Please contact support\");\n } catch (at.oculus.teamf.persistence.exception.search.InvalidSearchParameterException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"FacadeException - Please contact support\");\n } catch (CriticalDatabaseException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"CriticalDatabaseException - Please contact support\");\n } catch (CriticalClassException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"CriticalClassException - Please contact support\");\n }\n\n return searchresults;\n }", "private static void searchAnimalByName() {\n\t\tshowMessage(\"type in the animal's name: \\n\");\n\t\t\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listAnimal(AnimalSearch.byName(name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n\t\t//if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchAnimalByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t\t\n\t}", "List<Card> search(String searchString, long userId) throws PersistenceCoreException;", "public List<StaffPojo> staffSearchByAll(String all) {\n\t\treturn staffDao.staffSearchByAll(all);\n\t}", "protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }" ]
[ "0.68051517", "0.65295947", "0.63725966", "0.62887305", "0.60093623", "0.59561193", "0.590915", "0.5902549", "0.58880156", "0.583705", "0.5822339", "0.5799669", "0.5791722", "0.5730074", "0.570451", "0.5648435", "0.564704", "0.56303436", "0.56203103", "0.56203103", "0.5613338", "0.5587641", "0.55681384", "0.55654615", "0.5559392", "0.554673", "0.5545424", "0.55310714", "0.5512707", "0.54888767", "0.5487544", "0.54820305", "0.5458527", "0.5444166", "0.5436467", "0.5416728", "0.54075754", "0.540018", "0.53939795", "0.5393057", "0.5391979", "0.5387216", "0.5386836", "0.5351048", "0.53318506", "0.53258", "0.53038186", "0.52812666", "0.52762467", "0.52720356", "0.5255857", "0.52519315", "0.5246587", "0.5243692", "0.52374136", "0.5224458", "0.5221068", "0.5212646", "0.5199735", "0.5191693", "0.5190382", "0.51778245", "0.51679295", "0.51648104", "0.5157299", "0.51416814", "0.5130829", "0.5120682", "0.5099557", "0.5084826", "0.50743157", "0.5061359", "0.5051105", "0.50501555", "0.5042159", "0.5034427", "0.50327975", "0.5018641", "0.5017159", "0.5014724", "0.5002204", "0.5001039", "0.4997958", "0.49958318", "0.49938932", "0.49812552", "0.49659905", "0.49574524", "0.49503663", "0.49480623", "0.49473307", "0.4946675", "0.49453092", "0.4942978", "0.49279374", "0.4926462", "0.4924377", "0.4911211", "0.49020234", "0.49019265" ]
0.75237685
0
/ Region Methods printRegionNames: prints out the names of all regions.
public void printRegionsNames() { for (int i = 0; i < regionList.length; i++) { System.out.println("Region #" + (i + 1) + ": " + regionList[i].getRegionName()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printRegionStatus() {\n for (int i = 0; i < numRegions; i++) {\n System.out.print(regionList[i].getRegionName() + \" is \");\n if (regionList[i].checkOpen()) {\n System.out.println(\"open. :D\");\n } else {\n System.out.println(\"closed. D:\");\n }\n }\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public java.util.List<String> getRegionNames() {\n if (regionNames == null) {\n regionNames = new com.amazonaws.internal.SdkInternalList<String>();\n }\n return regionNames;\n }", "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "public String getRegionName() {\r\n return regionName;\r\n }", "public String getRegionName() {\n return regionName;\n }", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public String toString() {\n String output = \"\";\n for (int i = 0; i < numRegions; i++) {\n if (regionList[i] instanceof Arctic) \n output += (i+1) + \". \" + ((Arctic)regionList[i]).toString();\n else if (regionList[i] instanceof Aquarium) \n output += (i+1) + \". \" + ((Aquarium)regionList[i]).toString();\n else if (regionList[i] instanceof AmazonRainforest) \n output += (i+1) + \". \" + ((AmazonRainforest)regionList[i]).toString();\n }\n return output;\n }", "public List<Region> listRegions() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Region.class);\n\t}", "private String regions(List<String> regions) {\n List<String> mutableRegions = new ArrayList<>(regions);\n Collections.sort(mutableRegions);\n return COMMA_JOINER.join(mutableRegions);\n }", "public List<Region> getAllRegions() {\n\t\treturn regionDao.findWithNamedQuery(Region.QUERY_FIND_ALL, null);\n\t}", "public String getRegionFullName() {\n return regionFullName;\n }", "private static void mostrarRegiones (List<Regions> list)\n\t{\n\t\tIterator<Regions> it = list.iterator();\n\t\tRegions rg;\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\trg = it.next();\n\t\t\tSystem.out.println(rg.getRegionName() + \" \" +rg.getRegionId());\n\t\t\tSet<Countries> paises = rg.getCountrieses();\n\t\t\tSystem.out.println(\"PAISES\");\n\t\t\tIterator<Countries> it_paises = paises.iterator();\n\t\t\t\n\t\t\twhile (it_paises.hasNext())\n\t\t\t{\n\t\t\t\tCountries country = it_paises.next();\n\t\t\t\tSystem.out.println(country.getCountryName());\n\t\t\t}\n\t\t}\n\t}", "public List<String> regions() {\n return this.regions;\n }", "public byte [] getRegionName() {\n return regionName;\n }", "public List<PDGRegion> getPDGRegions();", "public static java.util.List<de.fraunhofer.fokus.movepla.model.Region> findAll()\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().findAll();\n }", "public void printAllRecipeNames() {\r\n for (Recipe currentRecipe : listOfRecipes) {\r\n System.out.println(currentRecipe.getRecipeName());\r\n }\r\n }", "public void printName()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar);//sort by names\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(i+\". \"+it.next().getName());\n\t\t\ti++;\n\t\t}\n\t}", "public Regions getRegions () {\n return this.regions;\n }", "private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}", "public void printAll() {\n\t\tfor(int i = 0; i<r.length; i++)\n\t\t\tprintReg(i);\n\t\tprintReg(\"hi\");\n\t\tprintReg(\"lo\");\n\t\tprintReg(\"pc\");\n\t}", "public void setRegionname(java.lang.String newRegionname) {\n\tregionname = newRegionname;\n}", "public void printGS(){\r\n\t\tLogger.append(\" ITANet locations:\t\");\r\n\t\tfor (int i = 0; i < this.locVec.length; i++)\r\n\t\t\tLogger.append(this.locVec[i] + \" \");\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Interruption vector:\t\");\r\n\t\tfor(int i = 0; i < this.interVec.length; i++){\r\n\t\t\tif(this.interVec[i] == true)\r\n\t\t\t\tLogger.append(\"true \");\r\n\t\t\telse\r\n\t\t\t\tLogger.append(\"false \");\r\n\t\t}\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" CPUStack:\t\");\r\n\t\tthis.stack.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Control variable:\t\");\r\n\t\tthis.cvMap.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t\t\r\n\t\tLogger.append(\" IRQSwitch: \");\r\n\t\tthis.switches.print();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t}", "@Test\n\tpublic void getAllByRegion() {\n\t\tList<String> consequenceTypeList = new ArrayList<String>();\n\t\tconsequenceTypeList.add(\"2KB_upstream_variant\");\n\t\tconsequenceTypeList.add(\"splice_region_variant\");\n\t\tList<Snp> snps = snpDBAdaptor.getAllByRegion(new Region(\"1\", 10327, 12807), consequenceTypeList);\n\t\tthis.printSNPList(\"getAllByRegion\", snps, 50);\n\t}", "public void printTreeNodes(){\n logger.trace(\"Name: \"+this.getName());\n for(int i=0;i<this.getChildCount();i++){\n SearchBaseNode node = (SearchBaseNode) this.getChildAt(i);\n node.printTreeNodes();\n }\n }", "public void printContents() {\n\t\t\n//\t\tCollections.sort(finalized);\n\t\t\n\t\tSystem.out.print(\"Register Status:\");\n\t\t\n\t\tint i = 0;\n\t\tfor (; i < finalized.length - 1; i++) {\n\t\t\tSystem.out.println(\"Reg \" + i + \": \" + finalized[i].toString());\n\t\t}\n\t\tSystem.out.print(\"Reg \" + i + \": \" + finalized[finalized.length - 1].toString() + \"\\n\");\n\t}", "private List<Region> experimentFullRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Vassar St\n\t\tr = new Region(\"Vassar-1\");\n\t\tr.addVertex(42.36255147026933, -71.09034599930573);\n\t\tr.addVertex(42.36240877523236, -71.08975591332245);\n\t\tr.addVertex(42.36013353836458, -71.09434785515595);\n\t\tr.addVertex(42.360442721730834, -71.0948091951065);\n\t\trs.add(r);\n\n\t\t// Windsor-1\n\t\tr = new Region(\"Windsor-1\");\n\t\tr.addVertex(42.36302711805193, -71.09707297951508);\n\t\tr.addVertex(42.36297955343571, -71.09641852051544);\n\t\tr.addVertex(42.3615288153431, -71.09657945305634);\n\t\tr.addVertex(42.36186970216797, -71.09723391205597);\n\t\trs.add(r);\n\n\t\t// Mass-1\n\t\tr = new Region(\"Mass-1\");\n\t\tr.addVertex(42.362678310030105, -71.0995620694809);\n\t\tr.addVertex(42.3629954083118, -71.09918656021881);\n\t\tr.addVertex(42.36179042632724, -71.09720172554779);\n\t\tr.addVertex(42.361322696830854, -71.09736265808868);\n\t\trs.add(r);\n\n\t\t// Mass-2\n\t\tr = new Region(\"Mass-2\");\n\t\tr.addVertex(42.36114036066024, -71.09588207871246);\n\t\tr.addVertex(42.360791542163774, -71.09660091072845);\n\t\tr.addVertex(42.36106901157985, -71.0969335046463);\n\t\tr.addVertex(42.36156052582344, -71.09657945305634);\n\t\trs.add(r);\n\n\t\t// Mass-3\n\t\tr = new Region(\"Mass-3\");\n\t\tr.addVertex(42.36035551632001, -71.09489502579498);\n\t\tr.addVertex(42.3601731773427, -71.09523834854889);\n\t\tr.addVertex(42.360577493491306, -71.095978638237);\n\t\tr.addVertex(42.36077568673155, -71.0955816713028);\n\t\trs.add(r);\n\n\t\t/*\n\t\t * Albany-1-full r = new Region(\"Albany-1\");\n\t\t * r.addVertex(42.36087874696942, -71.09530272156525);\n\t\t * r.addVertex(42.361227564981775, -71.0956353154831);\n\t\t * r.addVertex(42.362678310030105, -71.092556139534);\n\t\t * r.addVertex(42.362527687785665, -71.09185876519012); rs.add(r);\n\t\t */\n\n\t\t// Albany-1\n\t\tr = new Region(\"Albany-1\");\n\t\tr.addVertex(42.36172700558263, -71.09442295700836);\n\t\tr.addVertex(42.3614891772202, -71.09410109192658);\n\t\tr.addVertex(42.360823253016186, -71.09553875595856);\n\t\tr.addVertex(42.361084866938036, -71.09590353638458);\n\t\trs.add(r);\n\n\t\t// Albany-2\n\t\tr = new Region(\"Albany-2\");\n\t\tr.addVertex(42.362678310030105, -71.09243812233734);\n\t\tr.addVertex(42.36253561528121, -71.09191240937042);\n\t\tr.addVertex(42.36180628150339, -71.09342517525482);\n\t\tr.addVertex(42.36223436974708, -71.09344663292694);\n\t\trs.add(r);\n\n\t\t// Portland-1\n\t\tr = new Region(\"Portland-1\");\n\t\tr.addVertex(42.362757584750575, -71.09386505753326);\n\t\tr.addVertex(42.36273380234492, -71.09342517525482);\n\t\tr.addVertex(42.36217887699113, -71.09354319245148);\n\t\tr.addVertex(42.36198861574153, -71.09409036309052);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-1\");\n\t\tr.addVertex(42.36321737615673, -71.09918656021881);\n\t\tr.addVertex(42.36356618118581, -71.09917583138275);\n\t\tr.addVertex(42.36342348845344, -71.0969335046463);\n\t\tr.addVertex(42.363042972916034, -71.09699787766266);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-2\");\n\t\tr.addVertex(42.36318566651262, -71.09384359986115);\n\t\tr.addVertex(42.36278929461076, -71.09392943054962);\n\t\tr.addVertex(42.36297162599619, -71.09643997818756);\n\t\tr.addVertex(42.36336799674776, -71.09641852051544);\n\t\trs.add(r);\n\n\t\t// Main-3\n\t\tr = new Region(\"Main-3\");\n\t\tr.addVertex(42.36300333574834, -71.09216990143585);\n\t\tr.addVertex(42.36271794740286, -71.09249176651764);\n\t\tr.addVertex(42.36277343968266, -71.09333934456635);\n\t\tr.addVertex(42.363106392332284, -71.09324278504181);\n\t\trs.add(r);\n\n\t\t// Main-4\n\t\tr = new Region(\"Main-4\");\n\t\tr.addVertex(42.36289235154579, -71.09035672814178);\n\t\tr.addVertex(42.36259110772208, -71.09038891464996);\n\t\tr.addVertex(42.36264660011392, -71.09166564614105);\n\t\tr.addVertex(42.36303504548448, -71.09157981545258);\n\t\trs.add(r);\n\n\t\tLocation l;\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36035940296916);\n\t\tl.setLongitude(-71.0944926738739);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36081921192526);\n\t\tl.setLongitude(-71.09338760375977);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36160405047349);\n\t\tl.setLongitude(-71.0919177532196);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3619370093201);\n\t\tl.setLongitude(-71.09123110771179);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36234924163794);\n\t\tl.setLongitude(-71.09039425849915);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3631736981596);\n\t\tl.setLongitude(-71.09626293182373);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36303893196785);\n\t\tl.setLongitude(-71.09436392784119);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362935875273244);\n\t\tl.setLongitude(-71.09288334846497);\n\t\tlog(String.format(\"Test point on Main-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362785253646265);\n\t\tl.setLongitude(-71.09100580215454);\n\t\tlog(String.format(\"Test point on Main-3 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362476081807);\n\t\tl.setLongitude(-71.0936987400055);\n\t\tlog(String.format(\"Test point on Portland-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36099362133876);\n\t\tl.setLongitude(-71.09561920166016);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36154855716084);\n\t\tl.setLongitude(-71.0943853855133);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362008357414815);\n\t\tl.setLongitude(-71.093430519104);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362610849206014);\n\t\tl.setLongitude(-71.09221816062927);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3611521749309);\n\t\tl.setLongitude(-71.09653115272522);\n\t\tlog(String.format(\"Test point on Mass-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3604862471552);\n\t\tl.setLongitude(-71.09537243843079);\n\t\tlog(String.format(\"Test point on Mass-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36238887921827);\n\t\tl.setLongitude(-71.09683156013489);\n\t\tlog(String.format(\"Test point on Windsor-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "@ApiModelProperty(value = \"State/region of IP address\")\n public String getRegionName() {\n return regionName;\n }", "@Secured({\"ROLE_ADMIN\",\"ROLE_USER\"})\n\t@GetMapping(\"/regiones\")\n\tpublic List<Region> index() {\n\t\treturn regionService.findAll();\n\t}", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "public void printVirtualMachines() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tVirtualMachine currVm = (VirtualMachine)mes[i];\r\n\t\t\tSystem.out.printf(\"vm[%d]: Name = %s\\n\", i, currVm.getName());\r\n\t\t}\r\n\t}", "public Set<GeneralRegion> getMemberRegions() {\n\t\tSet<GeneralRegion> result = new HashSet<>();\n\t\tfor(String name : getMembers()) {\n\t\t\tresult.add(plugin.getFileManager().getRegion(name));\n\t\t}\n\t\treturn result;\n\t}", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public void testGetRootRegions() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tList countryList = regionMgr.getRootRegions();\r\n\t\t\tassertTrue(\"Unable to get country list\", countryList.size() > 0);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public void readRegions( String filename ) {\r\n\t\ttry {\r\n\t\t\ts.readRegions(filename, ignoreY);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void printAllScenes() {\r\n\t\tList <Scene> allScenes = handlerBridge.loadScenes();\r\n\t\tfor (Scene scene : allScenes) {\r\n\t\t\tSystem.out.print(\"Name: \" + scene.getName());\r\n\t\t\tSystem.out.println(\" - Ident: \" + scene.getIdentifier());\r\n\t\t}\r\n\t}", "@AutoEscape\n public String getRegion();", "public String toString()\n\t{\n\t\tString result = \"Highlighted region \"+getMinIndex()+\"-\"+getMaxIndex();\n\t\treturn result;\n\t}", "public void setRegionNames(java.util.Collection<String> regionNames) {\n if (regionNames == null) {\n this.regionNames = null;\n return;\n }\n\n this.regionNames = new com.amazonaws.internal.SdkInternalList<String>(regionNames);\n }", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "@Query(\"from Region\")\n\tpublic List<Region> findAllRegiones();", "protected void displayPopulation() {\n \n /**/println(\"\\nDisplaying population:\", 0);\n for(int i = 0; i < population_size; i++) {\n println(\"i = \" + i, 1);\n if(population[i] == null) {\n //System.exit(0);\n }\n displayChromosome(population[i], 0);\n }\n }", "public void displayNames()\r\n {\r\n // ensure there is at least one Cat in the collection\r\n if (catCollection.size() > 0) {\r\n System.out.println(\"The current guests in \"+businessName);\r\n for (Cat eachCat : catCollection) {\r\n System.out.println(eachCat.getName());\r\n }\r\n }\r\n else {\r\n System.out.println(businessName + \" is empty!\");\r\n }\r\n }", "public List<String> getNames(VariantContext variantContext);", "public String getValidRegionDesc();", "public void printFileNames() {\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()) {\n System.out.println(f);\n }\n }", "public void printVisiblePermitcCards(int region, PermitCard[] permits);", "public void printAll() {\n // Sort them by parent for ease of analysis\n // copy it so that we don't mess with the actual pop\n ArrayList<Bacteria> temp = (ArrayList<Bacteria>) inds.clone();\n Collections.sort(temp, new Comparator<Bacteria>() {\n @Override\n public int compare(Bacteria o1, Bacteria o2) {\n if (o1.getParentID() > o2.getParentID()) return 1;\n else if (o1.getParentID() == o2.getParentID()) return 0;\n else return -1;\n }\n });\n\t\tSystem.out.println(\"Bacteria population:\");\n for (int i=0; i < getPopSize(); i++) {\n temp.get(i).print();\n }\n System.out.println();\n\t}", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public void showNAME() {\r\n\t\tSystem.out.println(getName().toUpperCase());\r\n\t}", "public String getRegion() {\n return this.region;\n }", "public void printAllCustomerNames() {\r\n for (Customer customer : customers) {\r\n if (customer != null) {\r\n System.out.format(\"Customer with id[%s] is named %s\\n\", customer.getID(), customer.getName());\r\n }\r\n }\r\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public List<Region> gets() {\r\n return rdao.getAllRegion();\r\n }", "public void setRegion(String region);", "@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\r\n @VTID(17)\r\n java.lang.String[] getNames();", "public String getRegion() {\n return region;\n }", "public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }", "public void printRegistrationPlates(){\n for(RegistrationPlate plates: this.registrationList.keySet()){\n System.out.println(plates);\n }\n }", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "public void testGetRegion() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tRegion region = regionMgr.getRegion(RegionTestBuilder.REGION_ID_INDIA);\r\n\t\t\tassertTrue(\"Unable to get country list\", region.getName()\r\n\t\t\t\t\t.equalsIgnoreCase(\"India\"));\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public void setRegionName(String regionName) {\r\n this.regionName = regionName == null ? null : regionName.trim();\r\n }", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "public void printAllStages() {\n printIndex();\n printRemoval();\n }", "public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}", "public static void displayTextCountries(){\n for (Country country : countryList){\n System.out.println(country.getCountryName() + \",\" + country.getIndicator(1) + \",\" + country.getIndicator(2) + \",\" + country.getIndicator(3) + \",\" + country.getIndicator(4) + \",\" + country.getIndicator(5) + \",\" + country.getIndicator(6) + \",\" + country.getIndicator(7) + \",\" + country.getIndicator(8));\n }\n }", "public ShowRegionElements getShowRegionAccess() {\n\t\treturn pShowRegion;\n\t}", "public void findByRegion(String region)\n {\n boolean found = false;\n for(KantoDex entry : entries)\n {\n if(entry.getRegion().equals(region))\n {\n found = true;\n }\n }\n if(!found)\n {\n System.out.println(\"You have input a nonexistent region.\"); \n }\n else\n {\n System.out.println(region + \" Region entries:\");\n for(KantoDex entry : entries)\n {\n if(entry.getRegion().equals(region))\n {\n entry.display();\n }\n }\n }\n }", "Region region();", "Region region();", "Region region();", "Region region();", "Set<String> getRangeLocalNames();", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<String> getRegion() {\n\t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getRegion\");\r\n\t}", "public static void printName() {\n\t\t\n\t\tSystem.out.println(staName); \t// static only accepts static\n\t}", "public void printCoordinates ()\n\t{\n\t\tfor (int a = 0; a < object.size(); a++)\n\t\t{\n\t\t\tSystem.out.println(\"Polygon \" + (a+1) + \":\");\n\t\t\tobject.get(a).detailedPrint();\n\t\t\tSystem.out.println(\"**********\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tZoneId.getAvailableZoneIds()\r\n\t\t\t .stream()\r\n\t\t\t .filter( s -> s.startsWith(\"Asia\") )\r\n\t\t\t .sorted()\r\n\t\t\t .forEach( s -> System.out.println(s) );\r\n\t}", "List<RegionalClassifierEntity> getItsListOfRegions();", "Iterable<String> getRegisteredNames();", "public java.util.Enumeration getRegion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n return ejbRef().getRegion();\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public Set<String> loadAllSubstanceNames();", "public void regionToStringTest() throws AssertException\r\n {\r\n \t// TODO: implement.\r\n }", "public void printBranches() {\n System.out.println(\"=== Branches ===\");\n List<String> allBranchF = Utils.plainFilenamesIn(Main.ALL_BRANCHES);\n String commitInHead = Utils.readObject(HEADNAME, String.class);\n for (String branch: allBranchF) {\n if (branch.equals(commitInHead)) {\n System.out.println(\"*\" + branch);\n } else {\n System.out.println(branch);\n }\n }\n }", "public String[] listObjectNames();", "default List<SemanticRegion<T>> allChildren() {\n List<SemanticRegion<T>> result = new LinkedList<>();\n for (SemanticRegion<T> r : this) {\n result.add(r);\n }\n return result;\n }", "public Page<HeritageRegionName> findAll(Pageable pageable);", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}" ]
[ "0.68086326", "0.6249903", "0.6249903", "0.6249903", "0.6249903", "0.6207039", "0.61382836", "0.59942126", "0.59823346", "0.596067", "0.5916746", "0.587745", "0.56751806", "0.56711143", "0.5663142", "0.56295645", "0.56123984", "0.56113553", "0.55244696", "0.5501616", "0.54475796", "0.53661084", "0.5299668", "0.5261492", "0.5225943", "0.5216348", "0.50876987", "0.5084427", "0.50655", "0.5061475", "0.505874", "0.5052055", "0.50486946", "0.5033163", "0.50274575", "0.5021415", "0.5018482", "0.5015844", "0.50157917", "0.49985117", "0.49955127", "0.49907842", "0.49851707", "0.4982089", "0.4981684", "0.4973077", "0.49573267", "0.4924307", "0.49111176", "0.48964515", "0.48952767", "0.48936227", "0.4891039", "0.4891039", "0.4891039", "0.48908958", "0.48903787", "0.48802164", "0.4861198", "0.4861198", "0.48579946", "0.48579946", "0.48579946", "0.48579946", "0.48579946", "0.4856541", "0.48492754", "0.4845634", "0.48431218", "0.48393455", "0.4835802", "0.48356682", "0.48310894", "0.48266983", "0.4823704", "0.48197913", "0.4817037", "0.4816038", "0.48083663", "0.47985214", "0.4798184", "0.4798184", "0.4798184", "0.4798184", "0.47977188", "0.479063", "0.4782769", "0.47814563", "0.47755757", "0.47667742", "0.47590655", "0.47583997", "0.47448313", "0.47428262", "0.47411942", "0.4739507", "0.47333795", "0.47309142", "0.47293308", "0.47274813" ]
0.86917675
0
printRegionsNames method /printAllRegionsEarnings: prints out the earnings of each region individually.
public void printAllRegionsEarnings() { for (int i = 0; i < numRegions; i++) { System.out.println("The earning of " + regionList[i].getRegionName() + " is $" + regionList[i].calcEarnings()); } //hey we need to change the double with the good proper formatting }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printRegionsNames() {\n for (int i = 0; i < regionList.length; i++) {\n System.out.println(\"Region #\" + (i + 1) + \": \" + regionList[i].getRegionName());\n }\n }", "public void printRegionStatus() {\n for (int i = 0; i < numRegions; i++) {\n System.out.print(regionList[i].getRegionName() + \" is \");\n if (regionList[i].checkOpen()) {\n System.out.println(\"open. :D\");\n } else {\n System.out.println(\"closed. D:\");\n }\n }\n }", "public String toString() {\n String output = \"\";\n for (int i = 0; i < numRegions; i++) {\n if (regionList[i] instanceof Arctic) \n output += (i+1) + \". \" + ((Arctic)regionList[i]).toString();\n else if (regionList[i] instanceof Aquarium) \n output += (i+1) + \". \" + ((Aquarium)regionList[i]).toString();\n else if (regionList[i] instanceof AmazonRainforest) \n output += (i+1) + \". \" + ((AmazonRainforest)regionList[i]).toString();\n }\n return output;\n }", "public void printAll() {\n\t\tfor(int i = 0; i<r.length; i++)\n\t\t\tprintReg(i);\n\t\tprintReg(\"hi\");\n\t\tprintReg(\"lo\");\n\t\tprintReg(\"pc\");\n\t}", "private static void mostrarRegiones (List<Regions> list)\n\t{\n\t\tIterator<Regions> it = list.iterator();\n\t\tRegions rg;\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\trg = it.next();\n\t\t\tSystem.out.println(rg.getRegionName() + \" \" +rg.getRegionId());\n\t\t\tSet<Countries> paises = rg.getCountrieses();\n\t\t\tSystem.out.println(\"PAISES\");\n\t\t\tIterator<Countries> it_paises = paises.iterator();\n\t\t\t\n\t\t\twhile (it_paises.hasNext())\n\t\t\t{\n\t\t\t\tCountries country = it_paises.next();\n\t\t\t\tSystem.out.println(country.getCountryName());\n\t\t\t}\n\t\t}\n\t}", "private String regions(List<String> regions) {\n List<String> mutableRegions = new ArrayList<>(regions);\n Collections.sort(mutableRegions);\n return COMMA_JOINER.join(mutableRegions);\n }", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public void printAllRecipeNames() {\r\n for (Recipe currentRecipe : listOfRecipes) {\r\n System.out.println(currentRecipe.getRecipeName());\r\n }\r\n }", "public void printAllTransaction() {\n\t\tregister[registerSelected].printAllTransactions();\n\t}", "public <E> void printArray(E []names) {\n\t\tfor(int i = 0; i<names.length; i++) {\n\t\t\tSystem.out.println(names[i]);\n\t\t}\n\t\tfor(E x: names) {\t\t// This is another method which can be used in place of traditional for.\n\t\t\tSystem.out.println(x);\n\t\t}\n\t}", "public double avgRegionEarnings() {\n double total = 0;\n total = calcTotalEarnings();\n return total/numRegions;\n }", "public static void printEmployees() {\n List<Employee> employees = null;\n try {\n employees = employeeRepository.getAll(dataSource);\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n if (employees.isEmpty()) {\n System.out.println(\"\\n\" + resourceBundle.getString(\"empty.list\") + \"\\n\");\n LOGGER.warn(\"The list of employees is empty\");\n return;\n }\n System.out.println();\n employees.forEach(System.out::println);\n }", "public void printAllStages() {\n printIndex();\n printRemoval();\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "void printestateName(estateName iEstateName)\n {\n System.out.println(iEstateName.getElementValue());\n }", "public void printAll()\n {\n r.showAll();\n }", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "protected void showReservations() {\n storageDao.findAllRented()\n .forEach(System.out::println);\n }", "@Override\n public String toString()\n {\n return stateAbbr + \"/\" + stateName + \"/\" + taxRate;\n }", "public void printAllGradeValues() {\n\t\tfor ( int i = 0; i < gradeValues.size(); i++ ) {\n\t\t\tSystem.out.println( gradeValues.get(i) );\n\t\t}\n\t}", "public static java.util.List<de.fraunhofer.fokus.movepla.model.Region> findAll()\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().findAll();\n }", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tfor (EuroBill e : EuroBill.values()) {\n\t\t\tSystem.out.println(e + \", ordinal \" + e.ordinal());\n\t\t}\n\t}", "@Override\r\n public void printAllVehicles(Integer age) {\r\n if(!drivers.containsKey(age)) {\r\n System.out.println(\"No vehicle found parked by the driver of age \" + age.toString() + \".\");\r\n return;\r\n }\r\n Driver driver = drivers.get(age);\r\n Iterator<Vehicle> it = driver.getVehiclesOwned().iterator();\r\n System.out.print(\"Vehicle Registeration Numbers of all cars parked by driver of age \" + age.toString() + \" are as follows: \");\r\n while(it.hasNext()){\r\n System.out.print(it.next().getVehicleNumber() + \" | \");\r\n }\r\n System.out.println();\r\n }", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }", "public Page<HeritageRegionName> findAll(Pageable pageable);", "private void printAll() {\n int numberToPrint = searchResultsTable.getItems().size();\n\n FXMLCustomerController printController = new FXMLCustomerController();\n printController = (FXMLCustomerController) printController.load();\n printController.setUpPrint(numberToPrint);\n\n if (printController.okToPrint()) {\n System.out.println(\"Printing\");\n printController.getStage().show();\n for (SearchRowItem eachItem : searchResultsTable.getItems()) {\n printController.setCustomerDetails(eachItem);\n printController.print();\n System.out.println(\"Printed : \" + eachItem.toString());\n }\n printController.endPrint();\n //printController.getStage().hide();\n }\n }", "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(salariedEmployee.getFirstName()).append(\" \").append(salariedEmployee.getLastName());\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4));\r\n\t}", "public void print() {\r\n for (final Map.Entry<State, StatePolicyProperties> mapping : mStateMap.entrySet()) {\r\n final StatePolicyProperties properties = mapping.getValue();\r\n\r\n // Print the state\r\n mapping.getKey().print();\r\n System.out.println(\" State value = \" + properties.getValue());\r\n\r\n // Print the actions with their probability\r\n for (Map.Entry<Action, Double> actionProbability : properties.getActionProbabilities().entrySet()) {\r\n System.out.println(\" Action probability \" + actionProbability.getKey() + \" = \"\r\n + actionProbability.getValue());\r\n }\r\n // Print the actions with their value\r\n for (Map.Entry<Action, Double> actionValue : properties.getActionValues().entrySet()) {\r\n System.out.println(\" Action value \" + actionValue.getKey() + \" = \" + actionValue.getValue());\r\n }\r\n }\r\n System.out.println();\r\n }", "public void printAllScenes() {\r\n\t\tList <Scene> allScenes = handlerBridge.loadScenes();\r\n\t\tfor (Scene scene : allScenes) {\r\n\t\t\tSystem.out.print(\"Name: \" + scene.getName());\r\n\t\t\tSystem.out.println(\" - Ident: \" + scene.getIdentifier());\r\n\t\t}\r\n\t}", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "private void printAllTransactions(){\n Set<Transaction> transactions = ctrl.getAllTransactions();\n transactions.stream().forEach(System.out::println);\n }", "public double calcTotalEarnings() {\n double total = 0;\n for (int i = 0; i < numRegions; i++) {\n total += regionList[i].calcEarnings();\n }\n return total;\n }", "public void printSummary(){\r\n for (Map.Entry<String, Account[]> list : allAccounts.entrySet()){\r\n Account[] accountList = list.getValue();\r\n for (int i = 0; i < accountList.length; i++){\r\n if (accountList[i] == null){\r\n break;\r\n }\r\n System.out.println(list.getKey() + \" \" + (i+1) + \": \" + accountList[i].getCurrentBalance());\r\n }\r\n }\r\n }", "protected void displayPopulation() {\n \n /**/println(\"\\nDisplaying population:\", 0);\n for(int i = 0; i < population_size; i++) {\n println(\"i = \" + i, 1);\n if(population[i] == null) {\n //System.exit(0);\n }\n displayChromosome(population[i], 0);\n }\n }", "@Test\n\tpublic void getAllByRegion() {\n\t\tList<String> consequenceTypeList = new ArrayList<String>();\n\t\tconsequenceTypeList.add(\"2KB_upstream_variant\");\n\t\tconsequenceTypeList.add(\"splice_region_variant\");\n\t\tList<Snp> snps = snpDBAdaptor.getAllByRegion(new Region(\"1\", 10327, 12807), consequenceTypeList);\n\t\tthis.printSNPList(\"getAllByRegion\", snps, 50);\n\t}", "public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}", "public static void displayTextCountries(){\n for (Country country : countryList){\n System.out.println(country.getCountryName() + \",\" + country.getIndicator(1) + \",\" + country.getIndicator(2) + \",\" + country.getIndicator(3) + \",\" + country.getIndicator(4) + \",\" + country.getIndicator(5) + \",\" + country.getIndicator(6) + \",\" + country.getIndicator(7) + \",\" + country.getIndicator(8));\n }\n }", "public List<Region> getAllRegions() {\n\t\treturn regionDao.findWithNamedQuery(Region.QUERY_FIND_ALL, null);\n\t}", "@Secured({\"ROLE_ADMIN\",\"ROLE_USER\"})\n\t@GetMapping(\"/regiones\")\n\tpublic List<Region> index() {\n\t\treturn regionService.findAll();\n\t}", "public void printAll(){\n for (Triangle triangle : triangles) {\n System.out.println(triangle.toString());\n }\n for (Circle circle : circles) {\n System.out.println(circle.toString());\n }\n for (Rectangle rectangle : rectangles) {\n System.out.println(rectangle.toString());\n }\n }", "public void printStudents()\n {\n for(Student s : students)\n System.out.println(s);\n }", "public static void printOutIndividuals(Collection<DSEIndividual> individuals,\r\n\t\t\tString collectionName) {\r\n\t\t\r\n\t\tif (individuals.iterator().hasNext()){\r\n\t\t\r\n\t\tDSEIndividual firstIndividual = individuals.iterator().next();\r\n\t\tList<Criterion> criteriaToSave = determineCriterionsToSave(firstIndividual);\r\n\t\tList<Criterion> criteriaWithConfidence = determineCriteriaWithConfidenceInterval(firstIndividual);\r\n\t\t\t\t\r\n\t\tlogger.warn(\"------------ RESULTS \" + collectionName\r\n\t\t\t\t+ \" ----------------------\");\r\n\t\tlogger.warn(\"Printing results (number is \" + individuals.size() + \").\");\r\n\t\t\r\n\t\tList<Exception> exceptionList = new ArrayList<Exception>();\r\n\t\t\r\n\t\tint counter = 0;\r\n\t\r\n\t\tStringBuilder output = new StringBuilder(10000);\r\n\t\t\r\n\t\tlogger.warn(\"------------ PRETTY CSV RESULTS \" + collectionName\r\n\t\t\t\t+ \" ----------------------\");\r\n\t\t\r\n\t\toutput.append(\"\\n\");\r\n\t\toutput = prettyPrintHeadlineCSV(individuals, output,criteriaToSave);\r\n\t\r\n\t\t// content\r\n\t\tfor (DSEIndividual ind2 : individuals) {\r\n\t\t\ttry {\r\n\t\t\toutput = prettyPrintResultLineCSV(output, ind2,criteriaToSave, criteriaWithConfidence);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\texceptionList.add(new Exception(\"Encountered corrupted result number \"+counter+\", skipped it\", e));\r\n\t\t\t}\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\tlogger.warn(output);\r\n\t\t\r\n\t\tif (exceptionList.size() > 0){\r\n\t\t\tlogger.warn(\"Encountered exceptions while printing results\");\r\n\t\t\tfor (Exception exception : exceptionList) {\r\n\t\t\t\texception.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t}", "private void PrintTotalPopulation() {\n\t\tif (totalPopulation == 0) {\n\t\t\ttotalPopulation = populationReader.GetTotalPopulation();\n\t\t}\n\t\tSystem.out.println(totalPopulation);\n\t}", "public void printSummary() {\n\t\tSystem.out.println(MessageFormat.format(\"\\nSummary:\\n Name: {0}\\n Range: 1 to {1}\\n\", this.name, this.numSides));\n\t}", "public void printAverageOccupancy() {\n long steps = station.schedule.getSteps();\n for (int i = 0; i < numRows; i++) {\n for (int j = 0; j < numCols; j++) {\n System.out.printf(occupancyMatrix[i][j] / (double) steps + \"\");\n if (j != numCols - 1) {\n System.out.printf(\",\");\n }\n }\n System.out.printf(\"\\n\");\n }\n System.out.println(\"\\n\");\n }", "public String getRegionName() {\r\n return regionName;\r\n }", "public void printName()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar);//sort by names\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(i+\". \"+it.next().getName());\n\t\t\ti++;\n\t\t}\n\t}", "public void testGetRootRegions() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tList countryList = regionMgr.getRootRegions();\r\n\t\t\tassertTrue(\"Unable to get country list\", countryList.size() > 0);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public void printAll() {\n // Sort them by parent for ease of analysis\n // copy it so that we don't mess with the actual pop\n ArrayList<Bacteria> temp = (ArrayList<Bacteria>) inds.clone();\n Collections.sort(temp, new Comparator<Bacteria>() {\n @Override\n public int compare(Bacteria o1, Bacteria o2) {\n if (o1.getParentID() > o2.getParentID()) return 1;\n else if (o1.getParentID() == o2.getParentID()) return 0;\n else return -1;\n }\n });\n\t\tSystem.out.println(\"Bacteria population:\");\n for (int i=0; i < getPopSize(); i++) {\n temp.get(i).print();\n }\n System.out.println();\n\t}", "public void printContents() {\n\t\t\n//\t\tCollections.sort(finalized);\n\t\t\n\t\tSystem.out.print(\"Register Status:\");\n\t\t\n\t\tint i = 0;\n\t\tfor (; i < finalized.length - 1; i++) {\n\t\t\tSystem.out.println(\"Reg \" + i + \": \" + finalized[i].toString());\n\t\t}\n\t\tSystem.out.print(\"Reg \" + i + \": \" + finalized[finalized.length - 1].toString() + \"\\n\");\n\t}", "private static void print_Student(Gradebook gradebook, String firstName, String lastName) {\n\n Student stud = gradebook.getStudent(firstName, lastName);\n\n if (stud == null){\n\n System.out.println(\"Invalid student.\");\n System.exit(255);\n }\n\n Map<Assignment, Integer> assignments = gradebook.getStudentGrades(stud);\n List<Assignment> assignList = gradebook.getAllAssignments();\n\n for(Assignment a : assignList){\n System.out.println(\"(\" + a.getName() + \", \" + assignments.get(a) + \")\");\n }\n\n return;\n }", "public void printVisiblePermitcCards(int region, PermitCard[] permits);", "public void print()\n\t{\n\t\tminGenes = Integer.MAX_VALUE;\n\t\tmaxGenes = 0;\n\t\tcreatureGenesQty = 0;\n\t\tfor (Creature creature : creatures)\n\t\t{\n\t\t\tminGenes = (minGenes > creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : minGenes;\n\t\t\tmaxGenes = (maxGenes < creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : maxGenes;\n\t\t\tcreatureGenesQty += creature.getGenotype().size();\n\t\t\t//creature.print();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t}\n\t\tavgGenes = creatureGenesQty / ((float) size());\n\n\t\t// add some statistics\n\t\tSystem.out.println(\"Population size: \" + size());\n\t\tSystem.out.println(\"Minimum number of genes: \" + minGenes);\n\t\tSystem.out.println(\"Average number of genes: \" + avgGenes);\n\t\tSystem.out.println(\"Maximum number of genes: \" + maxGenes);\n\t\tCreatureLog.info(String.valueOf(size()) + \"\\t\" + avgGenes + \"\\t\" + minGenes + \"\\t\" +maxGenes);\n\n\t}", "public String getRegionName() {\n return regionName;\n }", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "public void printByLastName() {\r\n\t\tif ( size == 0 ) {\r\n\t\t\tSystem.out.println(\"Database is empty.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tsortByLastName(); \r\n\t\tSystem.out.println(\"--Printing statements by last name--\");\r\n\t\tfor ( int i = 0; i < accounts.length; i++) {\r\n\t\t\tif ( accounts[i] != null ) {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(accounts[i].toString());\r\n\t\t\t\tSystem.out.println(\"-interest: $ \" + String.format(\"%.2f\", accounts[i].monthlyInterest()));\r\n\t\t\t\tSystem.out.println(\"-fee: $ \" + String.format(\"%.2f\", accounts[i].monthlyFee()));\r\n\t\t\t\tdouble totalBalance = (accounts[i].getBalance() + accounts[i].monthlyInterest()) - accounts[i].monthlyFee();\r\n\t\t\t\t\r\n\t\t\t\t//update the total balance\r\n\t\t\t\taccounts[i].setBalance(totalBalance);\r\n\t\t\t\tSystem.out.println(\"-new balance: $ \" + String.format(\"%.2f\", totalBalance));\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"--end of printing--\");\r\n\t\tSystem.out.println();\r\n\t\treturn;\r\n\t}", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public static void printPopulation() {\n printPopulation(false);\n }", "public List<PDGRegion> getPDGRegions();", "public void printAllSpreadSheets() {\n\t\tif(getBubbleSpreadsheetSet().isEmpty())\n\t\t\tSystem.out.println(\"0 Spreadsheets in Bubbledocs\");\n\t\tfor (SpreadSheet f : getBubbleSpreadsheetSet()) {\n\t\t\tSystem.out.println(f);\n\t\t}\n\t}", "public void mostrarReservas() {\n\t\tint numReserva=1;\r\n\t\tfor(Reserva reserva:reservas) {\r\n\t\t\tSystem.out.println(numReserva+\" \"+reserva.toString());\r\n\t\t\tnumReserva++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void displayAll() {\n\t\t\n\t\tbankop.display();\n\t\n\t}", "@Override\n public String toString()\n {\n return sAbbr + \",\" + sName;\n }", "public static void main(String[] args) {\n\t\tString [] cities = {\"New York\", \"San Francisco\", \"Miami\", \"Malmö\" };\n\t\tSystem.out.println(cities[0]);\n\t\tSystem.out.println(cities[1]);\n\t\tSystem.out.println(cities[2]);\n\t\tSystem.out.println(cities[3]);\n\t\t\n //Declare array\n String[] countries;\n \n // Define the array\n countries = new String[3];\n countries[0] = \"USA\";\n countries[1] = \"Denmark\";\n countries[2] = \"Sweden\";\n System.out.println(countries[2]);\n \n System.out.println(\"**********\");\n \n\t\t//Declare & define the array (only size)\n\t\tString[] states = new String [5];\n states [0] = \"California\";\n states [1] = \"Ohio\";\n states [2] = \"New Jersay\";\n states [3] = \"Texas\";\n states [4] = \"Skåne\";\n int i = 0;\n \n // Do Loop: enters the loop THEN tests condition\n do {\n System.out.println(\"STATE \" + states[i]);\n i = i + 1;\n } while (i < 5);\n \n // While Loop: tests condition first then enters loop\n int n = 0;\n boolean stateFound = false;\n while (!stateFound) {\n \t String state = states[n];\n \t System.out.println(state);\n \t if (state == \"Texas\") {\n \t\t System.out.println(\"STATE FOUND!\");\n \t\t stateFound = true;\n \t }\n \tn++;\n }\n System.out.println(\"\\nPRINTING WITH FOR LOOP\");\n // For Loop: Best structure for iterating through an array\n for (int x = 0; x < 5; x++ ) {\n \tSystem.out.println(states[x]);\n }\n }", "public void print(){\n for(Recipe r : recipes){\n System.out.println(r.toString());\n }\n }", "public List<Region> listRegions() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Region.class);\n\t}", "public void regionToStringTest() throws AssertException\r\n {\r\n \t// TODO: implement.\r\n }", "public void showAllSchedules(ArrayList<Scheduler> schedulesToPrint) {\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }", "void closeUserRegions() {\n ArrayList<HRegion> regionsToClose = new ArrayList<HRegion>();\n this.lock.writeLock().lock();\n try {\n synchronized (onlineRegions) {\n for (Iterator<Map.Entry<Integer, HRegion>> i =\n onlineRegions.entrySet().iterator(); i.hasNext();) {\n Map.Entry<Integer, HRegion> e = i.next();\n HRegion r = e.getValue();\n if (!r.getRegionInfo().isMetaRegion()) {\n regionsToClose.add(r);\n i.remove();\n }\n }\n }\n } finally {\n this.lock.writeLock().unlock();\n }\n for(HRegion region: regionsToClose) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"closing region \" + Bytes.toString(region.getRegionName()));\n }\n try {\n region.close();\n } catch (IOException e) {\n LOG.error(\"error closing region \" + region.getRegionName(),\n RemoteExceptionHandler.checkIOException(e));\n }\n }\n this.quiesced.set(true);\n if (onlineRegions.size() == 0) {\n outboundMsgs.add(HMsg.REPORT_EXITING);\n } else {\n outboundMsgs.add(HMsg.REPORT_QUIESCED);\n }\n }", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "public static void ExibirResumo(Registro registros[]) {\n for (Registro registro : registros) {\n System.out.println(registro.toStringSummary());\n }\n }", "private static void printBranchProfit(String brnId, String brnLocation, double q1Profit,\r\n double q2Profit, double q3Profit,\r\n double q4Profit, double annualProfit ) {\r\n\r\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\tformatter.setMinimumFractionDigits(2);\r\n formatter.setMinimumIntegerDigits(1);\r\n System.out.println();\r\n\r\n String format = \"%-15s %-15s %15s %15s %15s %15s %20s\";\r\n System.out.format(format, brnId, brnLocation, formatter.format(q1Profit),\r\n formatter.format(q2Profit), formatter.format(q3Profit),\r\n formatter.format(q4Profit), formatter.format(annualProfit));\r\n }", "public void print() {\n\t\tSystem.out.print(salary);\n\t}", "public static void printPopulation(ArrayList<Chromosome> population) {\n for (Chromosome chromosome : population) {\n System.out.println(chromosome);\n }\n }", "@Override\n protected void printAggregates() {\n printRetrieveStudyAggregates(queryInstancesAggregates, firstResponseAggregates,\n firstFrameAggregates, totalAggregates, transferRateAggregates, frameRateAggregates);\n }", "private static void mostrarSocios() {\n\n\t\tfor (Socio s : socios.values())\n\t\t\tSystem.out.println(s);\n\n\t}", "void registerPrint() {\r\n intArrayPrint(regX);\r\n intArrayPrint(regY);\r\n intArrayPrint(regZ);\r\n }", "public void print() {\n\t\t\n\t\tfor(Solution sol : population) {\n\t\t\tSystem.out.println(sol.getPossibleSolution() + \" \" + sol.getPath());\n\t\t}\n\t}", "private void viewAll(HashMap<Integer, Employee> viewAllEmployee) {\r\n\t\tSet<Entry<String, String>> set = employee.entrySet();\r\n\t\tset.stream().forEach((element) -> System.out.println(element.getValue() + \" \" + element.getKey()));\r\n\t}", "ArrayList<HRegion> closeAllRegions() {\n ArrayList<HRegion> regionsToClose = new ArrayList<HRegion>();\n this.lock.writeLock().lock();\n try {\n regionsToClose.addAll(onlineRegions.values());\n onlineRegions.clear();\n } finally {\n this.lock.writeLock().unlock();\n }\n for(HRegion region: regionsToClose) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"closing region \" + Bytes.toString(region.getRegionName()));\n }\n try {\n region.close(abortRequested);\n } catch (IOException e) {\n LOG.error(\"error closing region \" +\n Bytes.toString(region.getRegionName()),\n RemoteExceptionHandler.checkIOException(e));\n }\n }\n return regionsToClose;\n }", "public void printPersonStats(String fullName)\n\t{\n\t\tSystem.out.println(\"\\n\"+fullName);\n\t\t\n\t\t//assuming person exists in graph\n\t\tfor(String relationship: personMap.get(fullName).inRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+relationship+\" to \"+personMap.get(fullName).inRelationships.get(relationship));\n\t\t\n\t\tfor(String relationship: personMap.get(fullName).outRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+personMap.get(fullName).outRelationships.get(relationship)+\" is the \"+relationship);\n\t}", "public void printAll(){\n\t\tSystem.out.println(\"Single hits: \" + sin);\n\t\tSystem.out.println(\"Double hits: \" + doub);\n\t\tSystem.out.println(\"Triple hits: \" + trip);\n\t\tSystem.out.println(\"Homerun: \" + home);\n\t\tSystem.out.println(\"Times at bat: \" + atbat);\n\t\tSystem.out.println(\"Total hits: \" + hits);\n\t\tSystem.out.println(\"Baseball average: \" + average);\n\t}", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void warnNotAllRegionsSatisfied(final List<Region> regions) {\n String regionNames = regions.stream().map(Region::getName).collect(Collectors.joining(\", \"));\n warnDialogProvider.get().show(\"The following regions do not have their minimum squadron requirement satisfied: \" + regionNames + \".\");\n }", "public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }", "public void printTreeNodes(){\n logger.trace(\"Name: \"+this.getName());\n for(int i=0;i<this.getChildCount();i++){\n SearchBaseNode node = (SearchBaseNode) this.getChildAt(i);\n node.printTreeNodes();\n }\n }", "public void printt() {\n for (int i=0 ; i<number ; i++) {\n System.out.println(\"LAB\" + (i+1) + \" ON \" + labs[i].getDay() + \" TEACHING BY: \" + labs[i].getTeacher());\n for (int j=0 ; j<labs[i].getCurrentSize() ; j++) {\n System.out.println(labs[i].getStudents()[j].getFirstName() + \" \" + labs[i].getStudents()[j].getLastName() + \" \" + labs[i].getStudents()[j].getId() + \" \" +labs[i].getStudents()[j].getGrade());\n }\n System.out.println(\"THE CAPACITY OF THE LAB IS: \" + labs[i].getCapacity());\n System.out.println(\"THE AVERAGE IS : \" + labs[i].getAvg());\n System.out.println();\n }\n }", "public void displayNames()\r\n {\r\n // ensure there is at least one Cat in the collection\r\n if (catCollection.size() > 0) {\r\n System.out.println(\"The current guests in \"+businessName);\r\n for (Cat eachCat : catCollection) {\r\n System.out.println(eachCat.getName());\r\n }\r\n }\r\n else {\r\n System.out.println(businessName + \" is empty!\");\r\n }\r\n }", "public void printAllcourses() {\n\t\tfor (int i = 0; i < CourseManager.courses.size(); i++) {\n\t\t\tSystem.out.println(i + 1 + \". \" + CourseManager.courses.get(i).getName() + \", Section: \" + CourseManager.courses.get(i).getSection());\n\t\t}\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}", "public void outputGrades() {\n System.out.printf(\"The grades are:%n%n\");\n\n // generates output grades each student\n for (int student =0; student < grades.length; student++)\n System.out.printf(\"Student %2d: %3d%n\", student + 1, grades[student]);\n }", "public void printReport() {\n System.out.println(\"=== Product Report ===\");\n productNames.keySet().forEach(k -> {\n System.out.println(\"Name: \" + k + \"\\t\\tCount: \" + productCountMap.get(productNames.get(k)));\n });\n\n }", "private void print() {\r\n // Print number of survivors and zombies\r\n System.out.println(\"We have \" + survivors.length + \" survivors trying to make it to safety (\" + childNum\r\n + \" children, \" + teacherNum + \" teachers, \" + soldierNum + \" soldiers)\");\r\n System.out.println(\"But there are \" + zombies.length + \" zombies waiting for them (\" + cInfectedNum\r\n + \" common infected, \" + tankNum + \" tanks)\");\r\n }" ]
[ "0.72650325", "0.5746348", "0.5338825", "0.53134316", "0.5281881", "0.50610894", "0.5032238", "0.5030447", "0.49680611", "0.49675083", "0.49375415", "0.49349087", "0.4917237", "0.49166533", "0.49133694", "0.4879596", "0.4879596", "0.4879596", "0.4879596", "0.48665604", "0.47892675", "0.47779796", "0.47713453", "0.4770399", "0.47464877", "0.4744492", "0.47261053", "0.47146243", "0.47123224", "0.46878433", "0.4685852", "0.46799368", "0.4664253", "0.46609667", "0.46507686", "0.46383992", "0.46369848", "0.46333674", "0.46279958", "0.46228787", "0.461293", "0.4595799", "0.45912448", "0.45898134", "0.45789105", "0.4576618", "0.45764777", "0.45644465", "0.45564225", "0.45514205", "0.45369664", "0.45354915", "0.45105875", "0.4509741", "0.45067897", "0.4495391", "0.44846913", "0.4484514", "0.44816783", "0.44742438", "0.44739443", "0.4473047", "0.44703957", "0.44623634", "0.44613978", "0.44611183", "0.4448223", "0.4443165", "0.44412807", "0.44348538", "0.44321352", "0.44286972", "0.4423613", "0.44223002", "0.44219783", "0.44213745", "0.44167638", "0.4412441", "0.44083992", "0.44052443", "0.44033432", "0.4403152", "0.44029373", "0.44027308", "0.4401594", "0.44004753", "0.4400044", "0.43989784", "0.43984866", "0.43970072", "0.43842295", "0.43672258", "0.43670797", "0.43666646", "0.43615046", "0.43584567", "0.43502626", "0.43490332", "0.43483987", "0.4345976" ]
0.8281494
0
printAllRegions method /findHighestEarningRegion: returns the region who made the most earnings.
public Region findHighestEarningRegion() { Region highest = regionList[0]; for (int i = 1; i < numRegions; i++) { if (highest.calcEarnings() <= regionList[i].calcEarnings()) highest = regionList[i]; } return highest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "public Region findLowestEarningRegion() {\n Region low = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (low.calcEarnings() >= regionList[i].calcEarnings())\n low = regionList[i];\n }\n return low;\n }", "public String getHighestInterest(){\n if(!interestsNotFilled()) {\n Object highestInterest = interestMap.keySet().toArray()[0];\n for (String interest : interestMap.keySet()) {\n float score = interestMap.get(interest);\n if (score > interestMap.get(highestInterest)) {\n highestInterest = interest;\n }\n }\n return (String) highestInterest;\n }else{\n return null;\n }\n }", "private Restaurant findHighestRevenueRestaurant(){\r\n Restaurant tempRestaurant = new Restaurant(\"dummy\", OrderType.BOTH);\r\n for(Restaurant restaurant : restaurantMap.getRestaurantMap().values()){\r\n if(restaurant.getRevenue() > tempRestaurant.getRevenue()){\r\n tempRestaurant = restaurant;\r\n }\r\n }\r\n return tempRestaurant;\r\n }", "public int getMaxRegions() {\n return maxRegions;\n }", "public static de.fraunhofer.fokus.movepla.model.Region findByc_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchRegionException {\n return getPersistence().findByc_Last(companyId, orderByComparator);\n }", "public double avgRegionEarnings() {\n double total = 0;\n total = calcTotalEarnings();\n return total/numRegions;\n }", "public void printBestIndividual() {\n\t\tSystem.out.println(\"Finalizing\");\n\t\tQuoridorBoard board;\n\t\tfor (int t = 0; t < (Math.log(individuals.length) / Math.log(2)); t++) {\n\t\t\tfor (int i = 0; i < individuals.length - 1; i++) {\n\t\t\t\tif (individuals[i].fitness == t) {\n\t\t\t\t\tfor (int j = i + 1; j < individuals.length; j++) {\n\t\t\t\t\t\tif (individuals[j].fitness == t) {\n\t\t\t\t\t\t\tboard = new QuoridorBoard(individuals[i],\n\t\t\t\t\t\t\t\t\tindividuals[j]);\n\t\t\t\t\t\t\tboard.play();\n\t\t\t\t\t\t\tif (board.getWinner() != null) {\n\t\t\t\t\t\t\t\tAI winner = board.getWinner();\n\t\t\t\t\t\t\t\tAI loser = board.getLoser();\n\t\t\t\t\t\t\t\twinner.fitness++;\n\t\t\t\t\t\t\t\tindividuals[i] = winner;\n\t\t\t\t\t\t\t\tindividuals[j] = loser;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\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\n\t\ttry {\n\t\t\tFileWriter fstream = new FileWriter(\"evoOutput.txt\");\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tint max1 = 0;\n\t\t\tint max2 = 0;\n\t\t\tAI best1 = new AI();\n\t\t\tAI best2 = new AI();\n\t\t\tfor (AI ai : individuals) {\n\t\t\t\tif (ai.fitness > max1) {\n\t\t\t\t\tmax1 = ai.fitness;\n\t\t\t\t\tbest1 = ai.clone();\n\t\t\t\t} else if (ai.fitness > max2) {\n\t\t\t\t\tmax2 = ai.fitness;\n\t\t\t\t\tbest2 = ai.clone();\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.write(best1.outputString() + \"\\r\\n\" + best2.outputString()\n\t\t\t\t\t+ \"\\r\\n\");\n\t\t\tout.close();\n\t\t\tSystem.out.println(\"Done\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "public Employee getHighestRevenueEmployee() {\n\t\tEmployee employee = new Employee();\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\"SELECT R.CustRepId, P.FirstName, P.LastName, E.Email, Count(*) \" +\n\t\t\t\t\t\"FROM Person P, Rental R, Employee E \" +\n\t\t\t\t\t\"WHERE P.SSN = R.CustRepId AND E.SSN = P.SSN \"+\n\t\t\t\t\t\"group by P.FirstName, P.LastName \" +\n\t\t\t\t\t\"ORDER BY COUNT(*) DESC; \"\n\t\t\t\t\t);\n\t\t\trs.next();\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"CustRepId\")));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\n\t\treturn employee;\n\t\t\n\t}", "public String getHighestRank() {\n try {\n FileInputStream fis = new FileInputStream(this.databaseName + \".config\");\n\n // Reading in the number of normal records from the .config file starting from offset 104 bytes (where the number for HIGHEST-RANK begins)\n fis.getChannel().position(104);\n byte[] highestRank = new byte[5];\n \n fis.read(highestRank, 0, 5);\n fis.close();\n return new String(highestRank).trim();\n } catch (IOException ex) {\n ex.printStackTrace();\n return \"Error\";\n }\n }", "public Location findLargest() {\n int max = -1;\n\n final LinkedList<Location> loc = new LinkedList<>();\n\n for (int r = 0; r < board.length; r++)\n for (int c = 0; c < board[0].length; c++)\n if (board[r][c] > max) {\n loc.clear();\n max = board[r][c];\n loc.add(new Location(r, c));\n } else if (board[r][c] == max)\n loc.add(new Location(r, c));\n\n Collections.shuffle(loc);\n\n return loc.pop();\n }", "private static int getLargestBoundedArea(char[][] rowsArray) {\n\t HashMap<Integer, ArrayList<String>> boundedRegionPointsMap = getBoundedRegionsPlotting(rowsArray);\n\n\t boundedRegionPointsMap = checkAndMergeIntersectedPoints(boundedRegionPointsMap);\n\n\t int largestSize = -1;\n\t \n\t // Finally, iterate over the bounded regions to get the region with maximum number of points.\n\t for (Integer key : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> boundedPointsList = boundedRegionPointsMap.get(key);\n\t logInfo(\"getLargestBoundedArea() | Region key = \" + key + \" Region points = \" + boundedPointsList.size());\n\t if (largestSize < boundedPointsList.size()) {\n\t largestSize = boundedPointsList.size();\n\t }\n\t }\n\t \n\t logDebug(\"getLargestBoundedArea() | Largest region size = \"+largestSize);\n\t return largestSize;\n\t}", "protected HRegionInfo[] getMostLoadedRegions() {\n ArrayList<HRegionInfo> regions = new ArrayList<HRegionInfo>();\n synchronized (onlineRegions) {\n for (HRegion r : onlineRegions.values()) {\n if (regions.size() < numRegionsToReport) {\n regions.add(r.getRegionInfo());\n } else {\n break;\n }\n }\n }\n return regions.toArray(new HRegionInfo[regions.size()]);\n }", "public Staff findHighestEarningLabour() {\n Staff highest = new Labourer(null,0,null,0,0);\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() >= ((Labourer)highest).getWage()){\n highest = staffList[i];\n }\n }\n }\n return highest;\n }", "public static de.fraunhofer.fokus.movepla.model.Region fetchByc_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByc_Last(companyId, orderByComparator);\n }", "void printMax(){\r\n\t\tSystem.out.printf(\"\\nThe stock with the highest value is \" + maxNode.stockName + \" with a value of $%.2f%n\",maxNode.stockValue);\r\n\t}", "public RegionManagementDetails getCompleteRegionDetails(String seasonId);", "public long getPropertyBalanceMax();", "@Test()\n public void testGetBiggestPerMonth() {\n\tYearMonth yearMonth = YearMonth.of(2015, 6);\n\tList<Expense> list = expenseManager.getBiggestPerMonth(yearMonth);\n\tassertEquals(\"gas\", list.get(0).getName());\n }", "public static de.fraunhofer.fokus.movepla.model.Region findBycp_Last(\n long companyId, long parentRegion,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchRegionException {\n return getPersistence()\n .findBycp_Last(companyId, parentRegion, orderByComparator);\n }", "public Individual getWorst() {\n\t\treturn individuals[individuals.length-1];\n\t}", "TotalBudget getMaximumBudget() throws NoUserSelectedException;", "public Cell highestCell() {\n for (Cell c : this.board) {\n if (c.height == ForbiddenIslandWorld.ISLAND_SIZE / 2 && !c.isCoastCell()) {\n return c;\n }\n }\n return highestCell();\n }", "protected int getHighestInnovation() {\n\t\treturn highest;\n\t}", "private static int[] FindHighest(int[][] terrainMap) {\n\n int[] highestPosition = {-1, -1};\n int highestValue = terrainMap[0][0];\n\n int i, j;\n\n for (i = 0; i < terrainMap.length; i++) {\n for (j = 0; j < terrainMap[0].length; j++) {\n if (terrainMap[i][j] > highestValue) {\n highestValue = terrainMap[i][j];\n highestPosition[0] = i;\n highestPosition[1] = j;\n }\n }\n }\n\n return highestPosition;\n }", "private Integer getHighestYAt(Location locationIncludingYmax, int minY) {\n int y = locationIncludingYmax.getBlockY();\n while (y >= minY) {\n locationIncludingYmax.setY(y);\n Block block = locationIncludingYmax.getBlock();\n if (block.getType().isSolid())\n return y;\n y--;\n }\n return -1;\n }", "private int[] getHighestPricesInTerm(int[] prices){\n int highest = -1;\n int index = -1;\n for(int i=0;i<prices.length;i++){\n if(prices[i]>highest){\n highest = prices[i];\n index = i;\n }\n }\n return new int[]{highest,index};\n }", "@Test()\n public void testGetBiggestPerYear() {\n\tYear year = Year.of(2015);\n\tList<Expense> list = expenseManager.getBiggestPerYear(year);\n\tassertEquals(\"gas\", list.get(0).getName());\n }", "int getRegionValue();", "private static void findMaxKi67(){\n int cellNum=0;//total cells in region\n Ki67=0;//total Ki67 in region\n float maxdivR=0;//tracks maximum Ki67 over all regions\n int[] inds = {0,0};//tracks indexes of maximum ki67\n for(int i=0;i<Data.aMX;i++){//loop over regions and find max activity\n for (int j = 0; j < Data.aMY; j++) {\n if(Data.activityMesh[i][j]>maxdivR){\n maxdivR=1.f*Data.activityMesh[i][j];\n inds[0]=i;\n inds[1]=j;\n }\n }\n }\n //redefine histology section based on maximum activity area\n Pars.histX=inds[0]*Pars.histSizeX;\n Pars.histY=inds[1]*Pars.histSizeY;\n for (int i = 0; i <cells.size(); i++) {//find %ki67 within max region\n Cell cell = (Cell) cells.get(i);\n //only count mass cells within the region of interest\n if(cell.mass && cell.x>=Pars.histX && cell.x<=Pars.histX+Pars.histSizeX && cell.y>=Pars.histY && cell.y<=Pars.histY+Pars.histSizeY) {\n Ki67+=cell.ki67;//add Ki67 val in area\n cellNum+=1;//add total cells in area\n }\n }\n Functions.writeFloat(Pars.outFile+\"data/Ki.txt\",Ki67/cellNum);//write to file\n }", "@Test()\n public void testGetBiggestPerMonthWithYearly() {\n\tYearMonth yearMonth = YearMonth.of(2015, 8);\n\tList<Expense> list = expenseManager.getBiggestPerMonth(yearMonth);\n\tassertEquals(\"vacation\", list.get(0).getName());\n }", "String highscore(int max) {\r\n\t\tString str = highscoreToSortedMap().toString().replaceAll(\" \", \"\").replaceAll(\"}\", \"\").substring(1);\r\n\t\tString[] a = str.split(\",\");\r\n\t\tString result = \"\";\r\n\t\tif(a.length < max) { // wenn weniger als zehn Spieler im Highscore stehen\r\n\t\t\tfor(int i = 0; i < a.length; i++) { // ... werden je nach dem wie viele es sind an den String angehangen\r\n\t\t\t\tresult += a[i] + \",\";\r\n\t\t\t}\r\n\t\t} else { // wenn mehr als 10 Spieler im Highscore stehen\r\n\t\t\tfor(int i = 0; i < max; i++) { // werden nur die ersten zehn an den String angehangen\r\n\t\t\t\tresult += a[i] + \",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "static void displayMaxProfitableStock(ForeighStockHolding array[])\r\n\t{\n\t\tForeighStockHolding temp = array[0];\r\n\t\t\r\n\t\t//traversing the array to find the max profitable stock\r\n\t\tfor(int i=1; i<array.length; i++)\r\n\t\t{\r\n\t\t\tif((temp.valueInDollars()-temp.costInDollars()) < (array[i].valueInDollars()-array[i].costInDollars()))\r\n\t\t\t{\r\n\t\t\t\ttemp = array[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//printing the maximum profitable stock\r\n\t\tSystem.out.println(\"Maximum Profitable Stock :\");\r\n\t\tSystem.out.println(\"Company Name : \"+temp.companyName);\r\n\t\tSystem.out.println(\"Purchase Share Price : \"+temp.purchaseSharePrice);\r\n\t\tSystem.out.println(\"Current Share Price : \"+temp.currentSharePrice);\r\n\t\tSystem.out.println(\"Number of Shares : \"+temp.numberOfShares);\r\n\t\tSystem.out.println(\"Conversion Rate : \"+temp.conversionRate);\r\n\t\tSystem.out.println();\r\n\t}", "@Test\n public void testHighestIndividualRisk2() throws IOException {\n Data data = getDataObject(\"./data/adult.csv\");\n // Risk before anonymization\n assertTrue(data.getHandle().getRiskEstimator(ARXPopulationModel.create(data.getHandle().getNumRows(), 0.1d)).getSampleBasedReidentificationRisk().getHighestRisk() == 1.0d);\n \n // Risk after anonymization\n assertTrue(getAnonymizedData(data).getRiskEstimator(ARXPopulationModel.create(data.getHandle().getNumRows(), 0.1d)).getSampleBasedReidentificationRisk().getHighestRisk() == 0.5d);\n }", "int getMaxStamina();", "public double getMaxDepthForRuptureInRegionBounds() {\n if(maxDepth == 0)\n getSiteRegionBounds();\n return maxDepth;\n }", "java.lang.String getNextHopRegion();", "void closeUserRegions() {\n ArrayList<HRegion> regionsToClose = new ArrayList<HRegion>();\n this.lock.writeLock().lock();\n try {\n synchronized (onlineRegions) {\n for (Iterator<Map.Entry<Integer, HRegion>> i =\n onlineRegions.entrySet().iterator(); i.hasNext();) {\n Map.Entry<Integer, HRegion> e = i.next();\n HRegion r = e.getValue();\n if (!r.getRegionInfo().isMetaRegion()) {\n regionsToClose.add(r);\n i.remove();\n }\n }\n }\n } finally {\n this.lock.writeLock().unlock();\n }\n for(HRegion region: regionsToClose) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"closing region \" + Bytes.toString(region.getRegionName()));\n }\n try {\n region.close();\n } catch (IOException e) {\n LOG.error(\"error closing region \" + region.getRegionName(),\n RemoteExceptionHandler.checkIOException(e));\n }\n }\n this.quiesced.set(true);\n if (onlineRegions.size() == 0) {\n outboundMsgs.add(HMsg.REPORT_EXITING);\n } else {\n outboundMsgs.add(HMsg.REPORT_QUIESCED);\n }\n }", "@Test\n\tpublic void testFindHighestRentProperty() {\n\t\tBoard board = new Board(4);\n\t\tSquareProperty outer = (SquareProperty)board.getSquareFromBoard(84);\n\t\tSquareProperty inner = (SquareProperty)board.getSquareFromBoard(53);\n\t\touter.rent = 3000;\n\t\tinner.rent = 4000;\n\t\tBank ba = board.bank;\n\t\t\n\t\tint[] a = ba.findHighestRentProperty(3);\n\t\tint[] b = ba.findHighestRentProperty(4);\n\t\tassertTrue(\"findHighestRentProperty() works\",ba.repOk() && (outer.position == a[1] && outer.row == a[0]) && (inner.position == b[1] && inner.row == b[0]));\n\n\t\t\t\n\t}", "public String endYear() throws IOException {\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n int year = actualYear();\r\n if (!checkIfYearExist(spreadSheet, year)) {\r\n return \"NOTSTARTED\";\r\n }\r\n \r\n Sheet sheet = spreadSheet.getSheet(String.valueOf(year));\r\n \r\n BigDecimal income = (BigDecimal) sheet.getCellAt(\"B1\").getValue();\r\n BigDecimal expense = (BigDecimal) sheet.getCellAt(\"B2\").getValue();\r\n BigDecimal sum = (BigDecimal) sheet.getCellAt(\"B3\").getValue();\r\n\r\n \r\n String string =\"year: \" + year + \"\\nsum of income: \" + income + \"\\nsum of expenses: \" + expense\r\n + \"\\nbilance: \" + sum; \r\n int row = sheet.getRowCount() + 1;\r\n sheet.ensureRowCount(row);\r\n sheet.getCellAt(\"A\" + row).setValue(\"end\");\r\n \r\n saveFile(sheet);\r\n return string;\r\n }", "public ResultSet getHighestScore(String map) {\n return query(SQL_SELECT_HIGHEST_SCORE, map);\n }", "public Integer getAgcProHighestEdu() {\n\t\treturn agcProHighestEdu;\n\t}", "public int getMaxCombinationsInRegion();", "public Building mostFitInPopulation(){\n\t\tCollections.sort(population);\n\t\treturn population.get(population.size() - 1);\n\t}", "@POST\r\n\t@Path(\"/findEstablishmentsOpinions\")\r\n\t@Consumes({ MediaType.APPLICATION_FORM_URLENCODED,\r\n\t\t\tMediaType.APPLICATION_JSON })\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic List<Esdopies> findEstablishmentsOpinions(\r\n\t\t\t@FormParam(\"establishmentId\") int establishmentId,\r\n\t\t\t@FormParam(\"maxOpinions\") int maxOpinions) {\r\n\t\tLogLogger.getInstance(getClass()).logger(\r\n\t\t\t\t\"Inicia findEstablishmentsOpinions\", LogLogger.DEBUG);\r\n\t\t// Ejecuta servicio\r\n\t\tList<Esdopies> response = opinionServices.findEstablishmentsOpinions(\r\n\t\t\t\testablishmentId, maxOpinions);\r\n\t\tLogLogger.getInstance(getClass()).logger(\r\n\t\t\t\t\"Finaliza findEstablishmentsOpinions\", LogLogger.DEBUG);\r\n\t\t// Retornamos\r\n\t\treturn response;\r\n\t}", "public Region findRegion(Staff find) {\n for (int i = 0; i < numRegions; i++) {\n Staff[] temp = regionList[i].getRegionStaff();\n for (int j = 0; j < regionList[i].getRegionSpec().getNumStaff(); j++) {\n if (temp[j].equals(find)) {\n return regionList[i]; \n }\n }\n }\n return null;\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public static de.fraunhofer.fokus.movepla.model.Region fetchBycp_Last(\n long companyId, long parentRegion,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchBycp_Last(companyId, parentRegion, orderByComparator);\n }", "public long findMax(long[] incomes) {\n long current_max_index = 0;\n long current_max = incomes[0];\n for (long income : incomes)\n if (current_max < income)\n current_max = income;\n return current_max;\n }", "public double getHighestGrade(){\n double highestGrade = 0;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()> highestGrade)\n highestGrade = students.get(i).getGrades();\n }// end for\n return highestGrade;\n }", "public String getRepayRateRangeMax( ) {\n\t\treturn this.repayRateRangeMax;\n\t}", "public String getLargestCityOf(String province){\n\n if (null == province || province.equals(\"\")) {\n throw new IllegalArgumentException(\"Invalid Province Name\");\n }\n\n for(int i = 0; i < provinces.length; i++) {\n\n if(provinces[i] != null &&\n provinces[i][NAME_OF_PROVINCE] != null &&\n provinces[i][NAME_OF_PROVINCE].equalsIgnoreCase(province)) {\n return provinces[i][NAME_OF_BIGGEST_CITY]; \n }\n\n }\n\n return null;\n }", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "@Override\r\n\tpublic Integer getMaxInvSrno() {\n\t\tQStnLooseMt qStnLooseMt = QStnLooseMt.stnLooseMt;\r\n\t\tJPAQuery query = new JPAQuery(entityManager);\r\n\t\tInteger retVal = -1;\r\n\t\t\r\n\t\tCalendar date = new GregorianCalendar();\r\n\t\t\r\n\t\tList<Integer> maxSrno = query\r\n\t\t\t.from(qStnLooseMt)\r\n\t\t\t.where(qStnLooseMt.invDate.year().eq(date.get(Calendar.YEAR))).list(qStnLooseMt.srNo.max());\r\n\t\t\r\n\t\tfor (Integer srno : maxSrno) {\r\n\t\t\tretVal = (srno == null ? 0 : srno);\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\treturn retVal;\r\n\t}", "public static int mostMoney(int[][] a) { \n double[] totals = new double[3]; \n double rowTotal = 0.0;\n double rowTotal1 = 0.0;\n double rowTotal2 = 0.0;\n \n \n for(int i = 0; i<4; i++){\n rowTotal += a[0][i];\n totals[0] = rowTotal;}\n \n for(int j = 0; j<4; j++){\n rowTotal1 += a[1][j];\n totals[1] = rowTotal1;}\n \n for(int k = 0; k<4; k++){\n rowTotal2 += a[0][k];\n totals[2] = rowTotal2;}\n \n int indexOfBest=0; //used to find index of best year\n double best = totals[0];\n for(int i =0; i < 3; i++) {\n if(totals[i] >= best){\n best = totals[i];\n indexOfBest = i;}\n \n } return indexOfBest;\n }", "@Test\n public void testHighestIndividualRisk() {\n DataProvider provider = new DataProvider();\n provider.createDataDefinition();\n // Risk before anonymization\n assertTrue(provider.getData().getHandle().getRiskEstimator(ARXPopulationModel.create(provider.getData().getHandle().getNumRows(), 0.1d)).getSampleBasedReidentificationRisk().getHighestRisk() == 1.0d);\n \n // Risk after anonymization\n assertTrue(getAnonymizedData(provider.getData()).getRiskEstimator(ARXPopulationModel.create(provider.getData().getHandle().getNumRows(), 0.1d)).getSampleBasedReidentificationRisk().getHighestRisk() == 0.5d);\n }", "public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}", "@Test\n public void testReceiverRegionReturns() {\n ResponseEntity response = dataController.getReceiverDataByOrgans(\"N\", \"Canterbury\", null, null);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "public float getHighestFitness() {\r\n\t\treturn highestScore;\r\n\t}", "public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}", "private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }", "public com.inikah.slayer.model.MMCity fetchByRegionId_Last(long regionId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "kr.pik.message.Profile.HowMe.Region getRegion();", "public HashMap<String, Long> readRegionServerLastLogRollResult() throws IOException {\n return systemTable.readRegionServerLastLogRollResult(backupInfo.getBackupRootDir());\n }", "public float getSalinityMax() {\n return salinityMax;\n }", "String getMax_res();", "public double calcTotalEarnings() {\n double total = 0;\n for (int i = 0; i < numRegions; i++) {\n total += regionList[i].calcEarnings();\n }\n return total;\n }", "@Override\n\tpublic Historic_site_detailVO readRegion_detail(int bno) throws Exception {\n\t\treturn dao.readRegion_detail(bno);\n\t}", "public static de.fraunhofer.fokus.movepla.model.Region fetchByPrimaryKey(\n long regionId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByPrimaryKey(regionId);\n }", "static long maximumPeople(long[] p, long[] x, long[] y, long[] r) {\n city[] allCity = new city[n];\n for(int i = 0; i < n; i++)\n allCity[i] = new city(p[i], x[i]);\n Arrays.sort(allCity);\n for(int i = 0; i < m; i++){\n long start = y[i] - r[i];\n long end = y[i] + r[i];\n int startindex = Arrays.binarySearch(allCity, new city(0, start));\n if(startindex < 0)\n startindex = - startindex - 1;\n else{\n long value = allCity[startindex].loc;\n while(true){\n startindex--;\n if(startindex < 0)\n break;\n if(allCity[startindex].loc != value)\n break;\n }\n startindex++;\n }\n int endindex = Arrays.binarySearch(allCity, new city(0, end));\n if(endindex < 0)\n endindex = -endindex - 2;\n else{\n long value = allCity[endindex].loc;\n while(true){\n endindex++;\n if(endindex >= n)\n break;\n if(allCity[endindex].loc != value)\n break;\n }\n endindex--;\n }\n for(int j = startindex; j <= endindex; j++){\n if(j >= n)\n break;\n allCity[j].clouds.add(i);\n }\n }\n int prev = -1;\n long sunny = 0;\n long max = 0;\n long accu = 0;\n for(int i = 0; i < n; i++){\n if(allCity[i].clouds.size() == 0)\n sunny += allCity[i].population;\n if(allCity[i].clouds.size() == 1){\n if(allCity[i].clouds.get(0) == prev){\n accu += allCity[i].population;\n if(accu > max)\n max = accu;\n }\n else {\n accu = allCity[i].population;\n prev = allCity[i].clouds.get(0);\n if(accu > max)\n max = accu;\n }\n }\n }\n return max + sunny;\n }", "private void getBest()\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(bestTour + \" \" + bestScore);\n\t}", "public int largestRectangleArea(int[] heights) {\r\n int maxArea = 0;\r\n \r\n // store the index\r\n // increasing Stack\r\n Stack<Integer> stack = new Stack<>();\r\n int n = heights.length;\r\n\r\n for (int i = 0; i <= n; i++) {\r\n int currVal = i == n ? 0 : heights[i];\r\n \r\n int right = i - 1;\r\n\r\n while (!stack.isEmpty() && currVal <= heights[stack.peek()]) {\r\n int h = heights[stack.pop()];\r\n // 就是当前位置\r\n int left = stack.isEmpty() ? 0 : stack.peek() + 1;\r\n \r\n int area = h * (right - left + 1);\r\n \r\n maxArea = Math.max(maxArea, area);\r\n }\r\n \r\n stack.push(i);\r\n }\r\n \r\n return maxArea;\r\n }", "public E findMax() {\r\n\t\treturn heap.get(0);\r\n\t}", "public void displayAllProvinceInfo() {\n \n for(int i = 0; i < provinces.length; i++) {\n\n \n if(provinces[i] != null &&\n provinces[i][NAME_OF_PROVINCE] != null && \n provinces[i][NAME_OF_CAPITAL_CITY].equalsIgnoreCase(provinces[i][NAME_OF_BIGGEST_CITY])) {\n System.out.println(\"The capital city of \" + provinces[i][NAME_OF_PROVINCE].toUpperCase() + \" is \" + provinces[i][NAME_OF_CAPITAL_CITY] + \", and it is also the largest city.\");\n \n }\n else if(provinces[i] != null &&\n provinces[i][NAME_OF_PROVINCE] != null) {\n System.out.println(\"The capital city of \" +provinces[i][NAME_OF_PROVINCE].toUpperCase() + \" is \" +provinces[i][NAME_OF_CAPITAL_CITY] + \", but the largest city is \" \n +provinces[i][NAME_OF_BIGGEST_CITY] + \".\");\n }\n \n }\n}", "private void reportClose(HRegionInfo region) {\n reportClose(region, null);\n }", "@java.lang.Override\n public int getMaxStamina() {\n return maxStamina_;\n }", "public void findH()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n if(scores[i][j] > high)\n high = scores[i][j];\n }\n }\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n if(scores[i][j] == high)\n System.out.println(names[i] + \" had the highest score of \" + high);\n break;\n \n }\n \n }\n }", "public int findMaxDegree() {\n\t\tint gradoMax = 0;\n\t\t\n\t\tfor(String s : grafo.vertexSet()) {\n\t\t\tint grado = grafo.degreeOf(s);\n\t\t\t\n\t\t\tif(grado > gradoMax) {\n\t\t\t\tgradoMax = grado;\n\t\t\t\tverticeGradoMax = s;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn gradoMax;\n\t}", "public ArrayList<Country> getRegionPop() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT SUM(country.Population) AS cPopulation, country.Code, country.Name, country.Continent, country.Region, country.Capital\"\n +\" FROM country\"\n +\" GROUP BY country.Region, country.Name, country.Code, country.Continent, country.Capital\"\n +\" ORDER BY country.Region, cPopulation DESC \";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Check one is returned\n ArrayList<Country> Country = new ArrayList<>();\n System.out.println(\"3. All the countries in a REGION organised by largest population to smallest.\");\n System.out.println(\"Code | Name | Continent | Region | Population | Capital\");\n while (rset.next()) {\n // Create new Country (to store in database)\n Country cnt = new Country();\n cnt.Code = rset.getString(\"Code\");\n cnt.Name = rset.getString(\"Name\");\n cnt.Continent = rset.getString(\"Continent\");\n cnt.Region = rset.getString(\"Region\");\n cnt.Population = rset.getInt(\"cPopulation\");\n cnt.Capital = rset.getInt(\"Capital\");\n\n System.out.println(cnt.Code + \" | \" + cnt.Name + \" | \" + cnt.Continent + \" | \" + cnt.Region + \" | \" + cnt.Population + \" | \" + cnt.Capital);\n Country.add(cnt);\n }\n return Country;\n } catch (Exception e) {\n // Capital City not found.\n System.out.println(e.getMessage());\n System.out.println(\"3. Failed to get city details\");\n return null;\n }\n }", "public void printAndDeleteHighestItem(){\n RankedItem highestItem = new RankedItem();\n\n //find the highest ranked item\n for (RankedItem rankedItem: rankedResults){\n if(rankedItem.getWin() >= highestItem.getWin()){\n highestItem = rankedItem;\n }\n }\n //print the highest ranked item if the item doesn't have all 0 values\n if(highestItem.getWin() != 0 || highestItem.getLoss() != 0 || highestItem.getTie() != 0) {\n resultList.append(highestItem.getItemText() + \"\\t\" +\n highestItem.getWin() + \"\\t\" +\n highestItem.getLoss() + \"\\t\" +\n highestItem.getTie() + \"\\n\");\n }\n //remove the highest ranked item from the list\n rankedResults.remove(highestItem);\n }", "public Amount getBalanceThresholdHigh() {\n return this.balanceThresholdHigh;\n }", "public HighScore getMaxScore(){\n HighScore hs;\n db = helper.getReadableDatabase();\n Cursor scoreCursor = db.query(SQLHelper.DB_TABLE_SCORES, SCORES_COLUMNS, null, null, null, null, SQLHelper.KEY_SCORE + \" DESC\", null);\n scoreCursor.moveToFirst();\n if(scoreCursor.getCount() == 0){\n hs = null;\n }\n else{\n hs = new HighScore(scoreCursor.getString(0), scoreCursor.getLong(1),\n scoreCursor.getLong(2), scoreCursor.getString(3), scoreCursor.getString(4));\n scoreCursor.moveToNext();\n if (scoreCursor != null && !scoreCursor.isClosed()) { // Close cursor\n scoreCursor.close();\n }\n }\n db.close();\n return hs; // Return max high score\n }", "public E findMax(){\n if(!isEmpty()){\n AvlNode<E> node = findMax(root);\n return (E)node.value;\n } else {\n return null;\n }\n }", "public EnumRegion getRegion()\n {\n return region;\n }", "public String getHighscore() {\n String str = \"\";\n\t int max = 10;\n \n ArrayList<Score> scores;\n scores = getScores();\n \n int i = 0;\n int x = scores.size();\n if (x > max) {\n x = max;\n } \n while (i < x) {\n \t str += (i + 1) + \".\\t \" + scores.get(i).getNaam() + \"\\t\\t \" + scores.get(i).getScore() + \"\\n\";\n i++;\n }\n if(x == 0) str = \"No scores for \"+SlidePuzzleGUI.getRows()+\"x\"+SlidePuzzleGUI.getCols()+ \" puzzle!\";\n return str;\n }", "public long getPropertyBalanceMax()\n {\n return iPropertyBalanceMax.getValue();\n }", "public int getMaximumEPC(int metadata);", "private void printMostVisited()\r\n\t{\r\n\t\tint greatestIndex = 0;\r\n\t\tint greatest = (int)webVisited[1][greatestIndex];\r\n\t\t\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t{\r\n\t\t\tif ((int)webVisited[1][i] > greatest)\r\n\t\t\t{\r\n\t\t\t\tgreatestIndex = i;\r\n\t\t\t\tgreatest = (int)webVisited[1][greatestIndex];\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Most visited website is: \" + webVisited[0][greatestIndex]);\r\n\t}", "public Money findMaxPrice(long n) {\n\t\tif (!hashMap.containsKey(n)) {\n\t\t\treturn new Money();\n\t\t}\n\t\tTreeSet<Long> idSet = hashMap.get(n);\n\t\tMoney max = new Money();\n\t\tboolean flag = false;\n\t\tfor (Long id : idSet) {\n\t\t if(treeMap.containsKey(id)){\n\t\t\tMoney current = treeMap.get(id).price;\n\t\t\tif (max.compareTo(current) == -1 || !flag) {\n\t\t\t\tmax = current;\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }", "public SysRegionVo getSysRegionBytNo(String tNo);", "private void raceEnd()\n {\n Double max = 0.0;\n String winner = \"\";\n System.out.println();\n System.out.println(\"Race over in \"+(aniContestants.get(0).getTime()-1)+\" seconds!\");\n for(Animal ani : aniContestants)\n {\n if(max < ani.getCurrentPosition())\n {\n max = ani.getCurrentPosition();\n winner = ani.getSpecies();\n }\n }\n System.out.println(winner+\" wins!!!\");\n System.out.println();\n }", "public String getRegionNo() {\n return regionNo;\n }", "private long findMaxId() {\n\t\tlong max = 0;\n\t\tfor (Block block : this.getBlockCollection()) {\n\t\t\tif (block.getId() > max) {\n\t\t\t\tmax = block.getId();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public String getTradeAmtRangeMax( ) {\n\t\treturn this.tradeAmtRangeMax;\n\t}", "public float getMaxBankAngle() { return MaxBankAngle; }", "public int getMax(final float upperBoundPercentage) {\n\t\tfinal int upperBoundPixelValueSum;\n\t\tupperBoundPixelValueSum = Math.round(upperBoundPercentage * pixelCount);\n\n\t\tint addedUpPixelValues = 0;\n\n\t\tfinal int lastHistogramIndex = pixelValueSums.length;\n\t\tint iHistogram = lastHistogramIndex;\n\n\t\tdo {\n\t\t\tiHistogram--;\n\n\t\t\tfinal int pixelValue = pixelValueSums[iHistogram];\n\t\t\taddedUpPixelValues += pixelValue;\n\n\t\t} while (addedUpPixelValues <= upperBoundPixelValueSum\n\t\t\t\t&& iHistogram > 0);\n\n\t\treturn iHistogram;\n\t}" ]
[ "0.5978002", "0.5667982", "0.53775746", "0.52709115", "0.5248383", "0.5129421", "0.50971305", "0.50917953", "0.4941497", "0.48933455", "0.4857716", "0.48543233", "0.48319104", "0.48211625", "0.48209953", "0.4816862", "0.4805593", "0.48026457", "0.47910795", "0.47629106", "0.47418538", "0.47126427", "0.47052008", "0.469919", "0.46635893", "0.4662888", "0.4657611", "0.4656856", "0.46543312", "0.46539235", "0.46461982", "0.46238944", "0.4615917", "0.45939237", "0.45931807", "0.45827276", "0.45796815", "0.45632568", "0.45582274", "0.4547416", "0.4526953", "0.45151708", "0.45132446", "0.45131025", "0.4498103", "0.44847798", "0.4472614", "0.4472614", "0.4472614", "0.4472614", "0.44661292", "0.44643712", "0.44486699", "0.44448596", "0.4441718", "0.4438432", "0.44373766", "0.44289494", "0.44289044", "0.4428779", "0.44213855", "0.44210237", "0.44191194", "0.44175684", "0.44080713", "0.44078383", "0.43968606", "0.43964085", "0.43957147", "0.43913698", "0.43858677", "0.43812698", "0.4371037", "0.43704268", "0.43665677", "0.4366322", "0.4363475", "0.43622145", "0.43595418", "0.43579042", "0.43511376", "0.43509254", "0.43453985", "0.4344113", "0.4343109", "0.43429708", "0.4342117", "0.43354523", "0.43312114", "0.43204954", "0.4311498", "0.4309526", "0.43060178", "0.43051514", "0.4302885", "0.43028605", "0.4302168", "0.43003303", "0.42992803", "0.42953554" ]
0.79647905
0
highestEarningRegion method /findLowestEarningRegion: returns the region who made the least earnings.
public Region findLowestEarningRegion() { Region low = regionList[0]; for (int i = 1; i < numRegions; i++) { if (low.calcEarnings() >= regionList[i].calcEarnings()) low = regionList[i]; } return low; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Region findHighestEarningRegion() {\n Region highest = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (highest.calcEarnings() <= regionList[i].calcEarnings())\n highest = regionList[i];\n }\n return highest;\n }", "public double avgRegionEarnings() {\n double total = 0;\n total = calcTotalEarnings();\n return total/numRegions;\n }", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "public Region findRegion(Staff find) {\n for (int i = 0; i < numRegions; i++) {\n Staff[] temp = regionList[i].getRegionStaff();\n for (int j = 0; j < regionList[i].getRegionSpec().getNumStaff(); j++) {\n if (temp[j].equals(find)) {\n return regionList[i]; \n }\n }\n }\n return null;\n }", "public Region findRegion(String name, int start, int end) { //recursion\n int middle = (start + end) / 2; \n if (end - start > 1) {\n if (findRegion(name, start, middle) != null) {\n return findRegion(name, start, middle);\n } else {\n return findRegion(name, middle, end);\n }\n } else {\n if (regionList[start].getRegionName().equals(name)) {\n return regionList[start];\n } else if (regionList[end].getRegionName().equals(name)) {\n return regionList[end];\n } else {\n return null; \n }\n }\n }", "int getRegionValue();", "private Restaurant findHighestRevenueRestaurant(){\r\n Restaurant tempRestaurant = new Restaurant(\"dummy\", OrderType.BOTH);\r\n for(Restaurant restaurant : restaurantMap.getRestaurantMap().values()){\r\n if(restaurant.getRevenue() > tempRestaurant.getRevenue()){\r\n tempRestaurant = restaurant;\r\n }\r\n }\r\n return tempRestaurant;\r\n }", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "IRegion getRegion();", "@Override\n @Transactional(readOnly = true)\n public Region searchByCode(String inseeCode) {\n log.debug(\"Request to get Region by insee code: {}\", inseeCode);\n List<Region> list = null;\n if(list != null && list.size() > 0)\n return list.get(0);\n else\n return null;\n }", "kr.pik.message.Profile.HowMe.Region getRegion();", "public Staff findLowestEarningLabour() {\n Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){\n lowest = staffList[i];\n }\n }\n }\n return lowest;\n }", "public static de.fraunhofer.fokus.movepla.model.Region findByc_First(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchRegionException {\n return getPersistence().findByc_First(companyId, orderByComparator);\n }", "com.google.ads.googleads.v14.common.IncomeRangeInfo getIncomeRange();", "public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\n }\n else\n {\n for(int i = 0; i < scores.length; i++)\n {\n lowest = scores[0];\n if(scores[i] == null)\n {\n break;\n }\n if(scores[i].getScore() < lowest.getScore())\n {\n lowest = scores[i];\n }\n \n }\n return lowest;\n } \n }", "java.lang.String getRegionCode();", "public Object getMinimumBalance() {\n\treturn null;\n}", "public int getRegionValue() {\n return region_;\n }", "private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public static de.fraunhofer.fokus.movepla.model.Region findBycp_First(\n long companyId, long parentRegion,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchRegionException {\n return getPersistence()\n .findBycp_First(companyId, parentRegion, orderByComparator);\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public int getRegionValue() {\n return region_;\n }", "private int getRegion(Point p) {\n // divide top segment equally\n Segment topSegment = Segment.fromStartAndWidth(this.topLeft.getX(), getWidth());\n EqualSegmentDivision partsOfPaddle = new EqualSegmentDivision(topSegment, REGIONS);\n\n // get index on the line division\n int index = partsOfPaddle.getIndexForPosition(p.getX());\n\n // do validity checks\n if (index < 0) {\n return 0;\n } else if (index >= REGIONS) {\n return REGIONS - 1;\n } else {\n return index;\n }\n }", "Integer getRegionId();", "public int lowestHighscore()\n {\n FileReader filereader;\n PrintWriter writer;\n int lowHighScore = 0;\n try{\n \n filereader = new FileReader(getLevel());\n BufferedReader bufferedreader = new BufferedReader(filereader);\n \n \n String finalLine =\"\";\n for(int i = 0;i<5;i++)\n {\n finalLine = bufferedreader.readLine();\n }\n lowHighScore = Integer.parseInt(finalLine.split(\":\")[1]);\n \n }\n catch(IOException e){}\n return lowHighScore;\n }", "public String getHighestInterest(){\n if(!interestsNotFilled()) {\n Object highestInterest = interestMap.keySet().toArray()[0];\n for (String interest : interestMap.keySet()) {\n float score = interestMap.get(interest);\n if (score > interestMap.get(highestInterest)) {\n highestInterest = interest;\n }\n }\n return (String) highestInterest;\n }else{\n return null;\n }\n }", "private static int[] FindLowest(int[][] terrainMap) {\n\n int[] lowestPosition = {-1, -1};\n int lowestValue = terrainMap[0][0];\n\n int i, j;\n\n for (i = 0; i < terrainMap.length; i++) {\n for (j = 0; j < terrainMap[0].length; j++) {\n if (terrainMap[i][j] < lowestValue) {\n lowestValue = terrainMap[i][j];\n lowestPosition[0] = i;\n lowestPosition[1] = j;\n }\n }\n\n }\n\n return lowestPosition;\n\n }", "public EnumRegion getRegion()\n {\n return region;\n }", "private int[] getLowestPricesInTerm(int[] prices){\n int lowest = Integer.MAX_VALUE;\n int index = -1;\n for(int i=0;i<prices.length;i++){\n if(prices[i]<lowest){\n lowest = prices[i];\n index = i;\n }\n }\n return new int[]{lowest,index};\n }", "java.lang.String getNextHopRegion();", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public static de.fraunhofer.fokus.movepla.model.Region fetchByPrimaryKey(\n long regionId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByPrimaryKey(regionId);\n }", "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}", "public Region getSiteRegionBounds() {\n int numSources = eqkRupForecast.getNumSources();\n\n double minLat = Double.POSITIVE_INFINITY;\n double maxLat = Double.NEGATIVE_INFINITY;\n double minLon = Double.POSITIVE_INFINITY;\n double maxLon = Double.NEGATIVE_INFINITY;\n\n\n //Going over each and every source in the forecast\n for (int sourceIndex = 0; sourceIndex < numSources; ++sourceIndex) {\n // get the ith source\n ProbEqkSource source = eqkRupForecast.getSource(sourceIndex);\n int numRuptures = source.getNumRuptures();\n\n //going over all the ruptures in the source\n for (int rupIndex = 0; rupIndex < numRuptures; ++rupIndex) {\n ProbEqkRupture rupture = source.getRupture(rupIndex);\n\n RuptureSurface rupSurface = rupture.getRuptureSurface();\n\n //getting the iterator for all points on the rupture\n ListIterator it = rupSurface.getLocationsIterator();\n boolean rupInside = false;\n //looping over all the rupture pt locations and if any of those lies\n //within the provided distance range then include the rupture in the list.\n while (it.hasNext()) {\n Location ptLoc = (Location) it.next();\n if (region.contains(ptLoc)) {\n rupInside = true;\n break;\n }\n }\n it = rupSurface.getLocationsIterator();\n while (it.hasNext() && rupInside) {\n Location ptLoc = (Location) it.next();\n double lat = ptLoc.getLatitude();\n double lon = ptLoc.getLongitude();\n double depth = ptLoc.getDepth();\n if (lat < minLat)\n minLat = lat;\n if (lat > maxLat)\n maxLat = lat;\n if (lon < minLon)\n minLon = lon;\n if (lon > maxLon)\n maxLon = lon;\n if (depth > maxDepth)\n maxDepth = depth;\n }\n }\n }\n return new Region(\n \t\tnew Location(minLat, minLon),\n \t\tnew Location(maxLat, maxLon));\n }", "private Region creatRegion(String rName) {\n\t\tfor (Region region : listRegions) {\r\n\t\t\tif (region.getName().equals(rName)) {\r\n\t\t\t\treturn region;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static int CalculateLowest(int[] LowestArray){\n LowestInArray l1 = new LowestInArray();\n l1.LowestNumber = LowestArray[0];\n if (LowestArray.length>1){\n System.out.println(\"Many Elements in Array\");\n for (int i=0; i<LowestArray.length;i++){\n if (LowestArray[i]< l1.LowestNumber){\n l1.LowestNumber = LowestArray[i];\n }\n }\n }\n return l1.LowestNumber;\n }", "public int minY()\n\t{\n\t\tint m = coords[0][1];\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tm = Math.min(m, coords[i][1]);\n\t\t}\n\t\t\n\t\treturn m;\n\t}", "public LocalRegion getRegion() {\n\t\treturn this.region;\n\t}", "java.lang.String getRegionId();", "public static de.fraunhofer.fokus.movepla.model.Region fetchByc_First(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByc_First(companyId, orderByComparator);\n }", "com.google.protobuf.ByteString getRegionCodeBytes();", "public CoordinateRadius getRegion();", "public Employee getHighestRevenueEmployee() {\n\t\tEmployee employee = new Employee();\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\"SELECT R.CustRepId, P.FirstName, P.LastName, E.Email, Count(*) \" +\n\t\t\t\t\t\"FROM Person P, Rental R, Employee E \" +\n\t\t\t\t\t\"WHERE P.SSN = R.CustRepId AND E.SSN = P.SSN \"+\n\t\t\t\t\t\"group by P.FirstName, P.LastName \" +\n\t\t\t\t\t\"ORDER BY COUNT(*) DESC; \"\n\t\t\t\t\t);\n\t\t\trs.next();\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"CustRepId\")));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\n\t\treturn employee;\n\t\t\n\t}", "public Region getRegion() {\n return region;\n }", "public int getAD_Tree_SalesRegion_ID() {\n\t\tInteger ii = (Integer) get_Value(\"AD_Tree_SalesRegion_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public Hotel bestHotel() {\r\n \tArrayList<Hotel> hotels = hotelDAO.getHotelList();\r\n \tHotel bestHotel=hotels.get(0);\r\n \tfor (int i=0; i<hotels.size();i++) {\r\n \t\tif(averageBewertungHotel(bestHotel)<averageBewertungHotel(hotels.get(i))) {\r\n \t\t\tbestHotel=hotels.get(i);\r\n \t\t}\r\n \t}\r\n \treturn bestHotel;\r\n }", "public double getLowestGrade(){\n double lowestGrade = 100;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()< lowestGrade)\n lowestGrade = students.get(i).getGrades();\n } // end for\n return lowestGrade;\n }", "public final SphRegion get_cur_region () {\n\t\tif (!( modstate >= MODSTATE_CATALOG )) {\n\t\t\tthrow new IllegalStateException (\"Access to RJGUIModel.cur_region while in state \" + cur_modstate_string());\n\t\t}\n\t\treturn fetch_fcparams.aftershock_search_region;\n\t}", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public ProtectedRegion regionFromSelection(String regionName) {\n\t Region selection;\n\t LocalSession localSession = this.we.getSession(this.player);\n\t com.sk89q.worldedit.world.World wrappedWorld = BukkitAdapter.adapt(this.player.getWorld());\n\t try {\n\t selection = localSession.getSelection(wrappedWorld);\n\t if (selection == null) {\n\t throw new IncompleteRegionException();\n\t }\n\t } catch (IncompleteRegionException e) {\n\t this.player.sendMessage(ChatColor.RED + \"You must select a region first!\");\n\t return null;\n\t\t}\n\t\t\n\t return new ProtectedCuboidRegion(regionName, selection.getMinimumPoint(), selection.getMaximumPoint());\n\t}", "public static long findMin(Equation e1, Equation e2, long low, long high) {\n if(high - low <= 0) return high;\n long median = (high + low)/2 ;\n System.out.println(low);\n System.out.println(median);\n System.out.println(high);\n\n long medianDifference = e2.evaluate(median) - e1.evaluate(median);\n long medianDifference1 = e2.evaluate(median + 1) - e1.evaluate(median + 1) ;\n\n if(medianDifference < 0) medianDifference = - medianDifference;\n if(medianDifference1 < 0) medianDifference1 = - medianDifference1;\n\n System.out.println(medianDifference);\n System.out.println(medianDifference1);\n System.out.println();\n\n if(medianDifference < medianDifference1) {\n return findMin(e1,e2,low,median);\n } else {\n return findMin(e1,e2,median + 1, high);\n }\n }", "public String getRegionFullName() {\n return regionFullName;\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public TypeOfRegion getRegion();", "public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }", "public float getSalinityMin() {\n return salinityMin;\n }", "public static de.fraunhofer.fokus.movepla.model.Region fetchBycp_First(\n long companyId, long parentRegion,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence()\n .fetchBycp_First(companyId, parentRegion, orderByComparator);\n }", "int getMaxStamina();", "public static de.fraunhofer.fokus.movepla.model.Region fetchByregionName(\n java.lang.String name)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByregionName(name);\n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "public String getRegion() {\n return this.region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public int getRegionid() {\n return regionid;\n }", "public String getRegionNo() {\n return regionNo;\n }", "public int getStartGrade(String gradeRange) {\n\t\tGradeRangeHelper grh = (GradeRangeHelper) gradeRangeMap.get(gradeRange);\n\t\tif (grh == null) {\n\t\t\treturn Integer.MAX_VALUE;\n\t\t}\n\t\t// prtln (\"getStartGrade for \" + grh.label + \": \" + grh.minGrade);\n\t\treturn grh.minGrade;\n\t}", "static String getRegion(Configuration conf, String defaultRegion)\n throws IOException {\n String region = conf.getTrimmed(S3GUARD_DDB_REGION_KEY);\n if (StringUtils.isEmpty(region)) {\n region = defaultRegion;\n }\n try {\n Regions.fromName(region);\n } catch (IllegalArgumentException | NullPointerException e) {\n throw new IOException(\"Invalid region specified: \" + region + \"; \" +\n \"Region can be configured with \" + S3GUARD_DDB_REGION_KEY + \": \" +\n validRegionsString());\n }\n return region;\n }", "public int getRegionID(Region currentRegion,Player player){\n\t\t\t \n\t\t\t int curRegionID = currentRegion.getRegionID();\n\t\t\t \t\t\t \n\t\t\t\n\t\t\t if(player.rBYDownFlag){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tcurRegionID = currentRegion.getRegionID() + rCols;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tplayer.rBYDownFlag = player.rBYUpFlag = false;\n\t\t\t\t\tplayer.rBXLeftFlag = player.rBXRightFlag = false;\n\t\t\t\t}\n\t\t\t\n\t\t\t else if(player.rBYUpFlag){\n\t\t\t\t \t\n\t\t\t\t curRegionID = currentRegion.getRegionID() - rCols;\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tplayer.rBYDownFlag = player.rBYUpFlag = false;\n\t\t\t\t\tplayer.rBXLeftFlag = player.rBXRightFlag = false;\n\t\t\t }\n\t\t\t\t\n\t\t\t else if(player.rBXLeftFlag){\n\t\t\t\t \n\t\t\t\t curRegionID = currentRegion.getRegionID()-1;\t\t\t\t \n\t\t\t\t \n\t\t\t\t \t\t\t\t \n\t\t\t\t\tplayer.rBYDownFlag = player.rBYUpFlag = false;\n\t\t\t\t\tplayer.rBXLeftFlag = player.rBXRightFlag = false;\n\t\t\t }\n\t\t\t \n\t\t\t else if(player.rBXRightFlag){\t\t\t\t \n\t\t\t\t \n\t\t\t\t curRegionID = currentRegion.getRegionID()+1;\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t player.rBYDownFlag = player.rBYUpFlag = false;\n\t\t\t\t player.rBXLeftFlag = player.rBXRightFlag = false;\n\t\t\t }\n\t\t\t \n\t\t\t \t\t\t \t\t\t\n\t\t\t \n\t\t\t return curRegionID;\n\t}", "public String getRegion() {\n return region;\n }", "public int getMin(final float lowerBoundPercentage) {\n\t\tfinal int lowerBoundPixelValueSum;\n\t\tlowerBoundPixelValueSum = Math.round(lowerBoundPercentage * pixelCount);\n\n\t\tint addedUpPixelValues = 0;\n\t\tint iHistogram = -1;\n\n\t\tdo {\n\t\t\tiHistogram++;\n\n\t\t\tfinal int pixelValue = pixelValueSums[iHistogram];\n\t\t\taddedUpPixelValues += pixelValue;\n\n\t\t} while (addedUpPixelValues <= lowerBoundPixelValueSum);\n\n\t\treturn iHistogram;\n\t}", "com.google.ads.googleads.v6.resources.IncomeRangeView getIncomeRangeView();", "public String getRegionName() {\r\n return regionName;\r\n }", "private static int getLargestBoundedArea(char[][] rowsArray) {\n\t HashMap<Integer, ArrayList<String>> boundedRegionPointsMap = getBoundedRegionsPlotting(rowsArray);\n\n\t boundedRegionPointsMap = checkAndMergeIntersectedPoints(boundedRegionPointsMap);\n\n\t int largestSize = -1;\n\t \n\t // Finally, iterate over the bounded regions to get the region with maximum number of points.\n\t for (Integer key : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> boundedPointsList = boundedRegionPointsMap.get(key);\n\t logInfo(\"getLargestBoundedArea() | Region key = \" + key + \" Region points = \" + boundedPointsList.size());\n\t if (largestSize < boundedPointsList.size()) {\n\t largestSize = boundedPointsList.size();\n\t }\n\t }\n\t \n\t logDebug(\"getLargestBoundedArea() | Largest region size = \"+largestSize);\n\t return largestSize;\n\t}", "public int getMaxRegions() {\n return maxRegions;\n }", "public long getRegionId() {\r\n return regionId;\r\n }", "public String getRegionName() {\n return regionName;\n }", "public static Rectangle findSmallest (Rectangle[] rectangles)\n {\n \t// Create rectangle reference that will be returned\n \t\n \tRectangle currentSmallest = rectangles[0];\n \t\n \tfor(Rectangle temp: rectangles)\n \t{\n \t\tint areaOfCurrent = currentSmallest.height * currentSmallest.width;\n \t\tint areaOfTemp = temp.height * temp.width;\n \t\t\n \t\tif(areaOfTemp <= areaOfCurrent)\n \t\t\tcurrentSmallest = temp;\n \t}\n \t\t\n return currentSmallest; // You will write this method as part of programming assignment #7. \n }", "public IsolationLevel lowestCommon(IsolationLevel level) {\r\n return (ordinal() >= level.ordinal()) ? level : this;\r\n }", "public RegionManagementDetails getCompleteRegionDetails(String seasonId);", "public String getRepayRateRangeMin( ) {\n\t\treturn this.repayRateRangeMin;\n\t}", "public String getStrongestCountryConqueredByPlayer(HashMap<String, ArrayList<String>> potentialScenarios) {\r\n\t\t\r\n \tString strongestCountry = null;\r\n \tInteger maxArmyCountEncountered = 1;\r\n \r\n // find the strongest country conquered by the player, knowing it would be contained as a key \r\n for (String country : potentialScenarios.keySet()){\r\n \tInteger currentCountryArmyCount = gameData.gameMap.getCountry(country).getCountryArmyCount();\r\n \tif (currentCountryArmyCount > maxArmyCountEncountered) {\r\n \t\tstrongestCountry = country;\r\n \t\tmaxArmyCountEncountered = currentCountryArmyCount;\r\n \t} \r\n }\r\n \r\n \treturn strongestCountry;\r\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 String getRegionno() {\n return regionno;\n }", "public static Optional<Student> getStudentWithSmallestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(minBy(Comparator.comparing(Student::getGpa)));\n\t}", "private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }", "public int getRegionid() {\n\treturn regionid;\n}", "private static int buyLowSellHigh(int[] prices) {\n int minPrice = Integer.MAX_VALUE;\n int maxProfit = Integer.MIN_VALUE;\n\n for (int v : prices) {\n if (minPrice == Integer.MAX_VALUE) {\n // update min price for the first time\n minPrice = v;\n } else if (v > minPrice) {\n // calculate profit since the stock price is > minPrice\n int profit = v - minPrice;\n maxProfit = Math.max(maxProfit, profit);\n } else {\n // either v is equal to or smaller than minPrice, then update it\n minPrice = v;\n }\n }\n System.out.printf(\"minPrice: %d\\n\", minPrice);\n return maxProfit;\n }", "public Long getRegionId() {\n return this.regionId;\n }" ]
[ "0.77008027", "0.58902055", "0.5258488", "0.5220486", "0.5177842", "0.5173744", "0.5127513", "0.5125943", "0.50479823", "0.5021944", "0.49917608", "0.49908265", "0.49847645", "0.4959753", "0.4950154", "0.49481997", "0.48984087", "0.4896639", "0.48914137", "0.48767936", "0.48756757", "0.4860392", "0.48591805", "0.48429725", "0.48392498", "0.47824547", "0.47726944", "0.47596452", "0.47469595", "0.4742301", "0.4732458", "0.4717695", "0.47156182", "0.4706987", "0.4665782", "0.46638322", "0.464413", "0.46305668", "0.4623398", "0.46201333", "0.4608291", "0.4602518", "0.4602243", "0.459928", "0.45951977", "0.45929763", "0.45926425", "0.4588536", "0.45857614", "0.45815447", "0.4578754", "0.4578754", "0.45698953", "0.45690435", "0.45629618", "0.45585036", "0.45585036", "0.45585036", "0.45585036", "0.45575827", "0.45575827", "0.45575827", "0.4555051", "0.45489448", "0.45416796", "0.45416528", "0.4536879", "0.4534589", "0.4533997", "0.45335588", "0.45331007", "0.45331007", "0.45331007", "0.45331007", "0.45331007", "0.45308724", "0.4520353", "0.45081514", "0.4504332", "0.44995996", "0.44964278", "0.44734925", "0.44734365", "0.4465915", "0.44633782", "0.4459744", "0.44560552", "0.44553927", "0.44500315", "0.44496658", "0.4436829", "0.44359085", "0.4434508", "0.44323197", "0.44297984", "0.44261253", "0.44232348", "0.44218773", "0.441589", "0.44128072" ]
0.8662253
0
lowestEarningRegion method /calcTotalEarnings: returns the total earnings of the region as a double.
public double calcTotalEarnings() { double total = 0; for (int i = 0; i < numRegions; i++) { total += regionList[i].calcEarnings(); } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double avgRegionEarnings() {\n double total = 0;\n total = calcTotalEarnings();\n return total/numRegions;\n }", "public double getTotalEarnings() {\n return this.totalEarnings;\n }", "public double totalEarnings() {\n\t\treturn dayEarnings;\n\t}", "public BigDecimal getTotalEarnings() {\n totalEarnings = new BigDecimal(0);\n for(BigDecimal earnings: earningsList){\n totalEarnings = totalEarnings.add(earnings);\n }\n return totalEarnings.setScale(2, RoundingMode.HALF_UP);\n }", "public Region findLowestEarningRegion() {\n Region low = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (low.calcEarnings() >= regionList[i].calcEarnings())\n low = regionList[i];\n }\n return low;\n }", "public double earnings() {\n\t\treturn getCommissionRate()+getGrossSales();\r\n\t}", "public double earnings() {\r\n double earnings;\r\n double overtime;\r\n double overtimeRate = hourlyRate * 1.5;\r\n\r\n // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1\r\n if (hours < 0 || hourlyRate < 0 || salary < 0) {\r\n earnings = -1;\r\n }\r\n else if (hours > 40) {\r\n overtime = (hours - 40) * overtimeRate;\r\n earnings = overtime + salary;\r\n }\r\n else {\r\n earnings = salary;\r\n }\r\n\r\n return earnings;\r\n }", "public Region findHighestEarningRegion() {\n Region highest = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (highest.calcEarnings() <= regionList[i].calcEarnings())\n highest = regionList[i];\n }\n return highest;\n }", "BigDecimal getAverageSellPrice();", "public double getEarnings() {\n//\t\tif (hoursWorked > 40) {\n//\t\t\treturn (40 * hoursWorked) + \n//\t\t\t\t\t((hoursWorked - 40) * wagePerHour * 1.5);\n//\t\t} else {\n//\t\t\treturn hoursWorked * wagePerHour;\n//\t\t}\n\t\t\t\t// condition \n\t\treturn hoursWorked > 40 ? \n\t\t\t\t// condition true \n\t\t\t(40 * wagePerHour) + ((hoursWorked - 40) * wagePerHour * 1.5) \n\t\t\t\t// condition false\n\t\t\t: hoursWorked * wagePerHour;\t\n\t}", "public BigDecimal getTOTAL_EARNED_PROFIT() {\r\n return TOTAL_EARNED_PROFIT;\r\n }", "public double givenInvestmentIncomeEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(investmentIncomeFindIncome.getSlopeAll());\n\t}", "double getTotalProfit();", "BigDecimal getAverageBuyPrice();", "@Override\n public double earnings() {\n return getCommissionRate() * getGrossSales();\n }", "public double earnings() {\n\t\treturn weeklySalary; \n\t}", "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "private double calculateTotal(){\r\n double total = 0;\r\n\r\n for(Restaurant restaurant: restaurantMap.getRestaurantMap().values()){\r\n total += restaurant.getRevenue();\r\n }\r\n\r\n return total;\r\n }", "public double calcAnnualIncome()\r\n {\r\n return ((hourlyWage * hoursPerWeek * weeksPerYear) * (1 - deductionsRate));\r\n }", "public int getTotalEarnings() {\r\n\t\tint total = 0;\r\n\t\tfor (int i = 0; i < this.receiptissued.size(); i++) {\r\n\t\t\ttotal = total + this.receiptissued.get(i).getPrice();\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t}", "public double getIncomeTotal(){\n\t\tdouble incomeTotal = (((Number)(salaryFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(socialSecurityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(utilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(unemploymentFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(disabilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(foodStampsFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(childSupportFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(otherIncomeFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(tanfFTF.getValue())).doubleValue() );\n\t\t\n\t\treturn incomeTotal;\n\t}", "public double getTotalSalesProfit(){\n return totalSaleProfit;\n }", "@Override\n public double calculatePayDay()\n {\n double perWeekEarned = hourlyRate * hoursPerWeek;\n return (double)Math.round(perWeekEarned * 100) / 100;\n }", "public float calculate_salary() {\r\n\t\tfloat calculate = 1000 + this.calculate_benefits();\r\n\t\treturn calculate;\r\n\t}", "public double getEarnedInterest()\n {\n return startingBalance * (interestRate / 12);\n }", "@Override\n public double earnings() {\n if (getHours() < 40)\n return getWage() * getHours();\n else\n return 40 * getWage() + ( getHours() - 40 ) * getWage() * 1.5;\n }", "public int getTotalPrice() {\n int total = 0;\n for (Scholar s : this.scholars) {\n Calendar start = (Calendar) s.getStartDate().clone();\n while (start.before(s.getEndDate())) {\n if (start.after(this.startDate) && start.before(this.estimatedEnd)) { //Only lists scholar within the the time frame the project is active\n total += s.getSalary();\n }\n start.add(Calendar.MONTH, 1);\n }\n }\n return total;\n }", "Double getTotalSpent();", "public double givenWorkWeeksEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(workWeeksFindIncome.getSlopeAll());\n\t}", "public double getTotalAmountOfInterest(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly - principal_amount;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}", "public double getIncome() throws BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "public double givenWeeklyWageEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(weeklyWageFindIncome.getSlopeAll());\n\t}", "public double getProfit() {\n\n\n double difference = maxRange * GAS_RATE;\n double sum = super.getProfit();\n\n return sum - difference;\n\n }", "public double calcStandardPrice(){\n double standardPrice = getLocation().getBasePrice() + BASE_RATE;\n return standardPrice;\n }", "private void calculateEarnings()\n {\n // get user input\n int items = Integer.parseInt( itemsSoldJTextField.getText() );\n double price = Double.parseDouble( priceJTextField.getText() );\n Integer integerObject = \n ( Integer ) commissionJSpinner.getValue();\n int commissionRate = integerObject.intValue();\n \n // calculate total sales and earnings\n double sales = items * price;\n double earnings = ( sales * commissionRate ) / 100;\n \n // display the results\n DecimalFormat dollars = new DecimalFormat( \"$0.00\" );\n grossSalesJTextField.setText( dollars.format( sales ) );\n earningsJTextField.setText( dollars.format( earnings ) );\n\n }", "public double getAverageReturnPerTrade(){\n\t\treturn Math.round(averageReturnPerTrade*10000.0)/100.0;\n\t}", "public double earnings()\r\n {\r\n /* write code to return the earnings for a PieceWorker */\r\n return getWage() * getPieces();\r\n }", "@Override\r\n\tpublic double calculateTaxes(int year) {\n\t\tdouble taxe1 = 2.0; // public double section1 = minimum;\r\n\t\tdouble taxe2 = 4.0;\r\n\t\tdouble taxe3 = 10.0;\r\n\t\tdouble taxe4 = 25.0;\r\n\t\tdouble totalSalary = monthSalary * 14; // 14 son pagas en año\r\n\r\n\t\tif (totalSalary <= 12600) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe1));\r\n\r\n\t\t} else if (totalSalary <= 15000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe2));\r\n\r\n\t\t} else if (totalSalary <= 21000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe3));\r\n\r\n\t\t} else if (totalSalary > 21000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe4));\r\n\r\n\t\t} else\r\n\t\t\ttotalSalary = -1;\r\n\r\n\t\treturn totalSalary;\r\n\t}", "double getTodaysIncomeAmount() {\n Long time = new Date().getTime();\n Date date = new Date(time - time % (DAY_DURATION));\n return getIncomeAmount(date.getTime(), date.getTime() + DAY_DURATION);\n }", "private Double calculateTotalFitness() {\n double totalFitnessScore = 0;\n\n IgniteCache<Long, Chromosome> cache = ignite.cache(GAGridConstants.POPULATION_CACHE);\n\n SqlFieldsQuery sql = new SqlFieldsQuery(\"select SUM(FITNESSSCORE) from Chromosome\");\n\n // Iterate over the result set.\n try (QueryCursor<List<?>> cursor = cache.query(sql)) {\n for (List<?> row : cursor)\n totalFitnessScore = (Double)row.get(0);\n }\n\n return totalFitnessScore;\n }", "private double calculateRentalPrice(double rentalPricePerDay, Date start, Date end) {\n\t\treturn rentalPricePerDay * Math.ceil((end.getTime() - start.getTime()) / (1000 * 60 * 60 * 24D));\n\t}", "private double getIncomeAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 1)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }", "@Override\n public double earnings() {\n return salary + commission + quantity;\n }", "private static double totalPrice(double price_interest, double dwnpymnt) {\n \treturn price_interest + dwnpymnt;\n }", "public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}", "public double calcInterest(){\n double interest = (interestRate + 1) * balance;\n return interest;\n }", "public BigDecimal getINSURANCE_AMOUNT() {\r\n return INSURANCE_AMOUNT;\r\n }", "public static double calculate(SalariedIndividual individual) {\n int costPerDay = individual.getCostPerDay();\n\n // from that individual object we get the no of days worked in a month - y\n int noOfDays = individual.getNoOfDays();\n\n // salaryWithoutTaxDeducted = x * y\n int salaryWithoutTaxDeducted = costPerDay * noOfDays;\n\n // salaryWithTaxDeducted = salaryWithoutTaxDeducted - 0.1 * salaryWithoutTaxDeducted\n double salaryWithTaxDeducted = salaryWithoutTaxDeducted - (0.1 * salaryWithoutTaxDeducted);\n\n // return salaryWithTaxDeducted\n return salaryWithTaxDeducted;\n }", "public double givenInvestmentIncomeEstimateIncomeAll(int investmentIncome){\n\t\treturn formatReturnValue((investmentIncome * givenInvestmentIncomeEstimateIncomeGetSlopeAll()) + givenInvestmentIncomeEstimateIncomeGetInterceptAll());\n\t}", "double getSubtotal();", "double getSubtotal();", "public double getFractionInRegion(GriddedRegion region) {\n\t\tdouble[] vals = this.getPDF();\n\t\tdouble sum = 0;\n\t\tGriddedRegion nzRegion = new NewZealandRegions.NZ_TEST_GRIDDED();\n\t\tfor (int i = 0; i < region.getNumLocations(); i++) {\n\t\t\tint iLoc = nzRegion.indexForLocation(region.getLocation(i));\n\t\t\tif (iLoc != -1)\n\t\t\t\tsum += vals[iLoc];\n\t\t}\n\t\treturn sum;\n\t}", "@Override\r\n\tpublic double annualSalary() {\r\n\t\tdouble baseSalary;\r\n\t\tdouble annualSalary;\r\n\t\tdouble annualCommissionMax = Math.min((annualSales * .02), 20000.0);\r\n\t\tbaseSalary = (getSalaryMonth() * 12);\r\n\t\tannualSalary = baseSalary + annualCommissionMax;\r\n\t\r\n\t\treturn annualSalary;\r\n\t}", "private double calculatePer(double currentRate, Map<String, String> earningsPerShare) {\n double current = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getCurrentYear()).replace(\",\", \".\"));\n return currentRate / current;\n }", "public java.math.BigDecimal getSaleAvg() \n\t{\n\t\treturn saleAvg;\n\t}", "public void calculateEarnings(){\n if (wages.size() > expenses.size()){\n //check size difference\n int sizeUp = wages.size() - expenses.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no expenses for the week(s))\n expenses.add(BigDecimal.ZERO);\n }\n }\n\n if(expenses.size() > wages.size()){\n //check size difference\n int sizeUp = expenses.size() - wages.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no income for the week(s))\n wages.add(BigDecimal.ZERO);\n }\n }\n for(int i=0; i < wages.size(); i++){\n BigDecimal profits;\n profits = wages.get(i).subtract(expenses.get(i));\n BigDecimal roundUp = profits.setScale(2, RoundingMode.HALF_UP);\n earningsList.add(roundUp);\n }\n }", "public static double totalBalance() {\n return totalBalance;\n }", "public double getAmountEarned(){\r\n return getSalary() + getBonus() + getCommission() * getNumSales();\r\n }", "public double calculateSeverancePay() {\r\n severancePay = (2020 - yearOfStart) * 20 * 0.8;\r\n return severancePay;\r\n }", "@Generated\n @Selector(\"totalRiskScoreFullRange\")\n public native double totalRiskScoreFullRange();", "public BigDecimal getPercentageProfitPStd();", "public void setTOTAL_EARNED_PROFIT(BigDecimal TOTAL_EARNED_PROFIT) {\r\n this.TOTAL_EARNED_PROFIT = TOTAL_EARNED_PROFIT;\r\n }", "public Double getRawGross(java.sql.Timestamp transDate, java.sql.Timestamp eodDate, int storeCode) {\r\n\t\tString query = \"SELECT SUM(i.SELL_PRICE*i.QUANTITY) FROM invoice_item i, invoice o WHERE o.TRANS_DT >= ? AND o.TRANS_DT <= ? AND i.OR_NO = o.OR_NO AND i.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = ?\"\r\n\t\t+ \" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n\t\tPreparedStatement pquery;\r\n\t\tResultSet rs = null;\r\n\t\tDouble dailySale = 0.0d;\r\n\t\ttry {\r\n\t\t\tpquery = Main.getDBManager().getConnection().prepareStatement(query);\r\n\t\t\t\r\n\t\t\tpquery.setTimestamp(1, transDate);\r\n\t\t\tpquery.setTimestamp(2, eodDate);\r\n\t\t\tpquery.setInt(3, storeCode);\r\n\t\t\tlogger.debug(\"TRANS DATE BEFORE\"+transDate.toLocaleString());\r\n\t\t\tlogger.debug(\"TRANS DATE BEFORE\"+eodDate.toLocaleString());\r\n\t\t\t\r\n\t\t\trs = pquery.executeQuery();\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n//\t\t\t\tdouble amount = rs.getDouble(1);\r\n//\t\t\t\tdailySale = amount/getVatRate();\r\n\t\t\t\tdailySale = rs.getDouble(1);\r\n\t\t\t\tlogger.debug(\"Raw Gross BEFORE SUBTRACTION: \"+dailySale);\r\n\t\t\t\t// SUBTRACT all returned items\r\n\t\t\t\tdailySale = dailySale - getDeductibles(transDate, eodDate, storeCode) + getCompletedTransactions(transDate, eodDate, storeCode);\r\n\t\t\t\tlogger.debug(\"Raw Gross AFTER RETURNED SUBTRACTION: \"+dailySale);\r\n\t\t\t\treturn dailySale;\r\n\t\t\t}\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\treturn dailySale;\r\n\r\n\t}", "@Override\n\tpublic double totalSalario() {\n\t\treturn this.precio;\n\t}", "private double calculatePer5years(double currentRate, Map<String, String> earningsPerShare) {\n double next = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getNextYear()).replace(\",\", \".\"));\n double current = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getCurrentYear()).replace(\",\", \".\"));\n // If the data is not up to date at onvista...\n String lastYearEps = earningsPerShare.get(fundamentalData.getLastYear());\n if (lastYearEps == null) {\n lastYearEps = earningsPerShare.get(fundamentalData.getLastYear() + \"e\");\n }\n double last = parseToDoubleOrZero(lastYearEps.replace(\",\", \".\"));\n double twoAgo = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getTwoYearsAgo()).replace(\",\", \".\"));\n double threeAgo = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getThreeYearsAgo()).replace(\",\", \".\"));\n\n double fiveYearsEarnings;\n if (next == 0 && current != 0 && last != 0 && twoAgo != 0 && threeAgo != 0) {\n fiveYearsEarnings = (current + last + twoAgo + threeAgo) / 4;\n } else {\n fiveYearsEarnings = (next + current + last + twoAgo + threeAgo) / 5;\n }\n\n return currentRate / fiveYearsEarnings;\n }", "public static Double getEstimateIncomeInDouble() {\n return estimateIncomeInDouble;\n }", "public BigDecimal getPercentageProfitPLimit();", "public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }", "public double getProfit(){\n return getPrice() * PROFIT_IN_PERCENTS / 100;\n }", "public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}", "public double getIncome() {\n\n return gross;\n }", "public double totalprice()\n {\n \tthis.caltotalprice();\n \tdouble res = Math.round(mTotalPrice);\n \t return res;\n }", "com.google.ads.googleads.v14.common.IncomeRangeInfo getIncomeRange();", "public double givenInvestmentIncomeEstimateIncomeAll(double investmentIncome){\n\t\treturn formatReturnValue((investmentIncome * givenInvestmentIncomeEstimateIncomeGetSlopeAll()) + givenInvestmentIncomeEstimateIncomeGetInterceptAll());\n\t}", "@Override\n\tpublic double averageSalary() {\n\t\treturn 0;\n\t}", "public double regionValue(){\n return counter.regionValue();\n }", "public double getBalancePlusInterest()\n {\n return startingBalance * (1 + (interestRate / 12));\n }", "protected double getTotalBalance()\r\n {\r\n return totalBalance;\r\n }", "@Override\n public double getProfit() {\n double revenue = 0;\n int maxRange = 0;\n double cost = 0;\n double profit;\n if (getPackages().size() == 0) {\n return 0;\n }\n for (int i = 0; i < getPackages().size(); i++) {\n revenue += getPackages().get(i).getPrice();\n }\n for (int i = 0; i < getPackages().size(); i++) {\n int zip = getPackages().get(i).getDestination().getZipCode();\n int distance = Math.abs(zip - getZipDest());\n if (distance >= maxRange) {\n maxRange = distance;\n }\n }\n cost = maxRange * gasRate;\n profit = (revenue - cost);\n\n return (profit);\n }", "public int getRehabilitationArmyPriceInTerritory(Territory territory){\n return territory.getRehabilitationArmyPriceInTerritory();\n }", "private void calculateAvgUnitPrice() {\n\n // If we don't have any active units, the average unit price is 0.\n if( getNumActiveCashUnits() <= 0 ) {\n this.avgCashUnitPrice = 0 ;\n return ;\n }\n else {\n double totalCostPrice = 0 ;\n for( final Trade trade : this.posHldCashTrades ) {\n totalCostPrice += trade.getNumActiveUnits() * trade.getAvgPrice() ;\n }\n this.avgCashUnitPrice = totalCostPrice / getNumActiveCashUnits() ;\n }\n }", "public double monthlyEarning()\n\t{\n\t\treturn hourlyRate * STAFF_MONTHLY_HOURS_WORKED;\n\t}", "public Double getRawGross(int orNo, int storeCode ) {\r\n//\t\tString query = \"SELECT SUM(IF(o.RETURN=0,i.SELL_PRICE*i.QUANTITY,p.AMT)) FROM invoice_item i, invoice o, payment_item p WHERE MONTH (o.TRANS_DT) = '\"+month+\"' && YEAR(o.TRANS_DT) = '\"+year+\"' && DAY(o.TRANS_DT) = '\"+day+\"' AND i.OR_NO = o.OR_NO AND p.OR_NO = o.OR_NO AND p.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = '\"+storeCode+\"'\";\r\n\t\tString query = \"SELECT SUM(i.SELL_PRICE*i.QUANTITY) FROM invoice_item i, invoice o WHERE o.OR_NO= '\"+orNo+\"' AND i.OR_NO = o.OR_NO AND i.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = '\"+storeCode+\"'\"\r\n\t\t+ \" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \"\r\n\t\t;\r\n\t\t\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(query);\r\n//\t\tResultSet rs = Main.getDBManager().executeQuery(\"SELECT sum(p.AMT) from payment_item p WHERE MONTH (p.TRANS_DT) = '\"+month+\"' && YEAR(p.TRANS_DT) = '\"+year+\"' && DAY(p.TRANS_DT) = '\"+day+\"' AND p.STORE_CODE = '\"+storeCode+\"'\");\r\n\t\tDouble dailySale = 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n//\t\t\t\tdouble amount = rs.getDouble(1);\r\n//\t\t\t\tdailySale = amount/getVatRate();\r\n\t\t\t\t\r\n\t\t\t\tdailySale = rs.getDouble(1);\r\n\t\t\t\tlogger.debug(\"Raw Gross BEFORE SUBTRACTION: \"+dailySale);\r\n\t\t\t\t\r\n\t\t\t\tdailySale = dailySale - getDeductibles(orNo, storeCode) + getCompletedTransactions(orNo, storeCode);\r\n\t\t\t\tlogger.debug(\"Raw Gross AFTER SUBTRACTION: \"+dailySale);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n\t\tlogger.debug(\"Raw Gross: \"+dailySale);\r\n\t\treturn dailySale;\r\n\t}", "public BigDecimal getBSCA_ProfitPriceStdEntered();", "BigDecimal getGrandTotal();", "public double CalculateTotalCompensation(){\r\n\t\tsetTotalCompensation(getCommission() + getBaseSalary());\r\n\t\treturn getTotalCompensation();\r\n\t}", "@Override\n\tpublic int calculateSalary() {\n\t\treturn this.getPaymentPerHour() * this.workingHours;\n\t}", "public BigDecimal getSumOfOutstanding(){\n\t\t BigDecimal a = new BigDecimal(0);\r\n//\t\t int outstandingIndex = 0;\r\n//\t\t for (int i=0 ; i<mColumnNames.length ; i++){\r\n//\t\t\t if (mColumnNames[i].equals(DBService.OUTSTANDING)){\r\n//\t\t\t\t outstandingIndex = i;\r\n//\t\t\t\t break;\r\n//\t\t\t }\r\n//\t\t }\r\n\t\t \r\n\t\t for (int i=0 ; i<getRowCount() ; i++){\r\n\t\t\t float value = (Float)getValueAt(i, 11);\r\n\t\t\t \r\n\t\t\t if (value != 0){\r\n\t\t\t\t BigDecimal b = new BigDecimal(value);\r\n\t\t\t\t a = a.add(b);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return a;\r\n\t }", "public double getTotalAmountPaid(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}", "public int calcTotalPrice(){\r\n\t\tint flightPrice = flight.getFlightPrice();\r\n\t\tint bagPrice = nrBag*LUGGAGE_PRICE;\r\n\t\tthis.totalPrice = bagPrice + nrAdult*flightPrice + nrChildren*1/2*flightPrice;\r\n\t\treturn this.totalPrice;\r\n\t}", "@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }", "public double getAvgCashUnitPrice() {\n return this.avgCashUnitPrice ;\n }", "@Override\n public double annualSalary(){\n double bonus = 0.00;\n\n if(currentStockPrice > 50){\n bonus = 30000;\n }\n\n return (super.annualSalary() + bonus);\n }", "public double monthlyEarnings() {\n\t\tif(level == \"AS\") {\n\t\t\treturn FACULTY_MONTH_SALARY;\n\t\t}\n\t\telse if(level == \"AO\") {\n\t\t\treturn FACULTY_MONTH_SALARY*1.5;\n\t\t}\n\t\telse {\n\t\t\treturn FACULTY_MONTH_SALARY*2;\n\t\t}\n\t}", "public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }", "public double calcPrice() {\r\n\t\tdouble drinkPrice = getBasePrice();\r\n\t\tif(this.getSize()==SIZE.MEDIUM) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\telse if(this.getSize()==SIZE.LARGE) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\t\r\n\t\tif(onWeekend) {\r\n\t\t\tdrinkPrice+=0.6;\r\n\t\t}\r\n\t\treturn drinkPrice;\r\n\t}", "@Override\n public double getTotalPrice(int BTWpercentage) {\n double price = 0.0;\n double percentage = BTWpercentage / 100;\n\n for (PurchaseOrderLine orderline : orderLines) {\n price += orderline.getLineTotal();\n }\n price += price * BTWpercentage;\n\n return price;\n }", "public double eigenValueTotal(){\n if(!this.pcaDone)this.pca();\n return this.eigenValueTotal;\n }", "public double countIncome() {\n\n double income = 0;\n for (int i = 0; i < budget.getIncome().size(); i++) {\n income += budget.getIncome().get(i).getAmount();\n }\n\n return income;\n }", "public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }" ]
[ "0.7719023", "0.63152695", "0.6230223", "0.6219029", "0.6197583", "0.5978977", "0.589264", "0.579182", "0.5715816", "0.5658173", "0.5641062", "0.5632249", "0.55640745", "0.5556007", "0.5539034", "0.5498801", "0.54548395", "0.54524785", "0.5442443", "0.5439972", "0.54267406", "0.53288203", "0.5323839", "0.5301459", "0.5285073", "0.5274313", "0.5269124", "0.5264442", "0.5252846", "0.524913", "0.5220491", "0.52197975", "0.52138937", "0.5184057", "0.5176535", "0.516486", "0.5148185", "0.5141285", "0.5139758", "0.51247895", "0.5098966", "0.50645596", "0.50608253", "0.5054033", "0.50323033", "0.50296944", "0.5021656", "0.5017039", "0.5001285", "0.5001275", "0.5001275", "0.4993217", "0.49912268", "0.4990151", "0.49652705", "0.4964182", "0.49625278", "0.49524677", "0.49432442", "0.49396062", "0.49236184", "0.4912609", "0.49116066", "0.48930174", "0.4883065", "0.4880933", "0.4877751", "0.48772675", "0.48702544", "0.48697254", "0.4868317", "0.48623517", "0.48614204", "0.48580155", "0.48538715", "0.4842774", "0.48383737", "0.4837705", "0.48287806", "0.48285133", "0.4810716", "0.48069137", "0.47939804", "0.47891372", "0.47876713", "0.47863814", "0.47828448", "0.47817492", "0.4781085", "0.47753596", "0.47741717", "0.4771284", "0.47647756", "0.47579548", "0.47558874", "0.475336", "0.47523597", "0.47465503", "0.4738112", "0.4728544" ]
0.7921887
0
calcTotalEarnings method /avgRegionEarnings: returns the average earnings of ALL region as a double.
public double avgRegionEarnings() { double total = 0; total = calcTotalEarnings(); return total/numRegions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double calcTotalEarnings() {\n double total = 0;\n for (int i = 0; i < numRegions; i++) {\n total += regionList[i].calcEarnings();\n }\n return total;\n }", "public double getTotalEarnings() {\n return this.totalEarnings;\n }", "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "public BigDecimal getTotalEarnings() {\n totalEarnings = new BigDecimal(0);\n for(BigDecimal earnings: earningsList){\n totalEarnings = totalEarnings.add(earnings);\n }\n return totalEarnings.setScale(2, RoundingMode.HALF_UP);\n }", "public double totalEarnings() {\n\t\treturn dayEarnings;\n\t}", "BigDecimal getAverageSellPrice();", "private double calculateTotal(){\r\n double total = 0;\r\n\r\n for(Restaurant restaurant: restaurantMap.getRestaurantMap().values()){\r\n total += restaurant.getRevenue();\r\n }\r\n\r\n return total;\r\n }", "public double earnings() {\n\t\treturn getCommissionRate()+getGrossSales();\r\n\t}", "public double earnings() {\r\n double earnings;\r\n double overtime;\r\n double overtimeRate = hourlyRate * 1.5;\r\n\r\n // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1\r\n if (hours < 0 || hourlyRate < 0 || salary < 0) {\r\n earnings = -1;\r\n }\r\n else if (hours > 40) {\r\n overtime = (hours - 40) * overtimeRate;\r\n earnings = overtime + salary;\r\n }\r\n else {\r\n earnings = salary;\r\n }\r\n\r\n return earnings;\r\n }", "public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }", "@Override\n public double earnings() {\n return getCommissionRate() * getGrossSales();\n }", "public double givenInvestmentIncomeEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(investmentIncomeFindIncome.getSlopeAll());\n\t}", "private float calculateMean()\n { \n int numberEmployees = employees.size();\n float total = 0, meanGrossPay = 0;\n // Create an array of all gross pays\n float[] allGrossPay = new float[numberEmployees];\n \n // Call method to return an array of float containing all gross pays\n allGrossPay = calculateAllGrossPay();\n // Find total gross pay\n for (int i = 0; i < numberEmployees; i++)\n {\n total += allGrossPay[i];\n }\n // Find mean and return it\n if (numberEmployees > 0)\n {\n meanGrossPay = total/numberEmployees;\n \n }\n return meanGrossPay;\n }", "BigDecimal getAverageBuyPrice();", "public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}", "public static double average(double[] employeeSalaries) {\n\t\t double total=0;int month=0;\n\t\t for(int i=0;i<employeeSalaries.length;i++) {\n\t\t\t if (employeeSalaries[i]>0) {\n\t\t\t\t total+=employeeSalaries[i];\n\t\t\t\t month++;\n\t\t\t }\n\t\t\t }\n\t\t if (total==0) {\n\t\t\t throw new IllegalArgumentException(\"all values in the employeeSalaries array are zero.\");\n\t\t }\n\treturn total/month;\n\t}", "double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}", "public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }", "@Override\n\tpublic double averageSalary() {\n\t\treturn 0;\n\t}", "private void calculateAvgUnitPrice() {\n\n // If we don't have any active units, the average unit price is 0.\n if( getNumActiveCashUnits() <= 0 ) {\n this.avgCashUnitPrice = 0 ;\n return ;\n }\n else {\n double totalCostPrice = 0 ;\n for( final Trade trade : this.posHldCashTrades ) {\n totalCostPrice += trade.getNumActiveUnits() * trade.getAvgPrice() ;\n }\n this.avgCashUnitPrice = totalCostPrice / getNumActiveCashUnits() ;\n }\n }", "private void calculateEarnings()\n {\n // get user input\n int items = Integer.parseInt( itemsSoldJTextField.getText() );\n double price = Double.parseDouble( priceJTextField.getText() );\n Integer integerObject = \n ( Integer ) commissionJSpinner.getValue();\n int commissionRate = integerObject.intValue();\n \n // calculate total sales and earnings\n double sales = items * price;\n double earnings = ( sales * commissionRate ) / 100;\n \n // display the results\n DecimalFormat dollars = new DecimalFormat( \"$0.00\" );\n grossSalesJTextField.setText( dollars.format( sales ) );\n earningsJTextField.setText( dollars.format( earnings ) );\n\n }", "public java.math.BigDecimal getSaleAvg() \n\t{\n\t\treturn saleAvg;\n\t}", "public double givenInvestmentIncomeEstimateIncomeAll(int investmentIncome){\n\t\treturn formatReturnValue((investmentIncome * givenInvestmentIncomeEstimateIncomeGetSlopeAll()) + givenInvestmentIncomeEstimateIncomeGetInterceptAll());\n\t}", "public int getTotalEarnings() {\r\n\t\tint total = 0;\r\n\t\tfor (int i = 0; i < this.receiptissued.size(); i++) {\r\n\t\t\ttotal = total + this.receiptissued.get(i).getPrice();\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t}", "public double calAveragePriceListReBook(double totalPrice, int numOfReBook) {\n double average = totalPrice / numOfReBook;\n return average;\n }", "public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }", "public double getAverageReturnPerTrade(){\n\t\treturn Math.round(averageReturnPerTrade*10000.0)/100.0;\n\t}", "public double getEarnings() {\n//\t\tif (hoursWorked > 40) {\n//\t\t\treturn (40 * hoursWorked) + \n//\t\t\t\t\t((hoursWorked - 40) * wagePerHour * 1.5);\n//\t\t} else {\n//\t\t\treturn hoursWorked * wagePerHour;\n//\t\t}\n\t\t\t\t// condition \n\t\treturn hoursWorked > 40 ? \n\t\t\t\t// condition true \n\t\t\t(40 * wagePerHour) + ((hoursWorked - 40) * wagePerHour * 1.5) \n\t\t\t\t// condition false\n\t\t\t: hoursWorked * wagePerHour;\t\n\t}", "double average();", "public Region findHighestEarningRegion() {\n Region highest = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (highest.calcEarnings() <= regionList[i].calcEarnings())\n highest = regionList[i];\n }\n return highest;\n }", "public double average(){\n\t\t// computes the overall grade\n\t\tfinal double\n\t\t\tPROGRAM_WEIGHT = .40,\n\t\t\tEXAM_WEIGHT = 1 - PROGRAM_WEIGHT;\n\t\t\n\t\tdouble overallGrade;\n\t\t\n\t\toverallGrade = programGrade * PROGRAM_WEIGHT + examGrade * EXAM_WEIGHT;\n\t\t\n\t\treturn overallGrade;\n\t}", "@Override\n public double earnings() {\n return salary + commission + quantity;\n }", "public double getAverage(){\n return getTotal()/array.length;\n }", "public void calculateEarnings(){\n if (wages.size() > expenses.size()){\n //check size difference\n int sizeUp = wages.size() - expenses.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no expenses for the week(s))\n expenses.add(BigDecimal.ZERO);\n }\n }\n\n if(expenses.size() > wages.size()){\n //check size difference\n int sizeUp = expenses.size() - wages.size();\n for(int i = 0; i < sizeUp; i++){\n //add zero(s) to expenses to match up(this assumes no income for the week(s))\n wages.add(BigDecimal.ZERO);\n }\n }\n for(int i=0; i < wages.size(); i++){\n BigDecimal profits;\n profits = wages.get(i).subtract(expenses.get(i));\n BigDecimal roundUp = profits.setScale(2, RoundingMode.HALF_UP);\n earningsList.add(roundUp);\n }\n }", "public double givenInvestmentIncomeEstimateIncomeAll(double investmentIncome){\n\t\treturn formatReturnValue((investmentIncome * givenInvestmentIncomeEstimateIncomeGetSlopeAll()) + givenInvestmentIncomeEstimateIncomeGetInterceptAll());\n\t}", "public List<KeyValue<Integer>> getAvg() {\n\t\tList<KeyValue<Integer>> result = new ArrayList<KeyValue<Integer>>();\n\t\tJavaRDD<Document> rdd = dal.getRDD();\n\t\tList<Tuple2<String, Iterable<Document>>> list = rdd.groupBy(new Function<Document, String>() {\n\t\t\t// 分组\n\t\t\t/**\n\t\t\t * \n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic String call(Document v1) throws Exception {\n\t\t\t\tString province = v1.getString(\"province\");\n\t\t\t\tDouble price = v1.getDouble(\"unitPrice\");\n\t\t\t\tif (v1.getString(\"province\") != null && price > 0) {\n\t\t\t\t\treturn province;\n\t\t\t\t}\n\t\t\t\treturn \"other\";\n\t\t\t}\n\t\t}).collect();\n\t\tfor (Tuple2<String, Iterable<Document>> tuple2 : list) {\n\t\t\t// 循环遍历,统计平均数\n\t\t\tif (tuple2._1.equals(\"other\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tIterator<Document> iterator = tuple2._2.iterator();\n\t\t\tList<Double> prices = new ArrayList<Double>();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tprices.add(iterator.next().getDouble(\"unitPrice\"));\n\t\t\t}\n\t\t\tdouble sum = dal.getSparkContext().parallelize(prices).reduce(new Function2<Double, Double, Double>() {\n\n\t\t\t\t/**\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t\tpublic Double call(Double v1, Double v2) throws Exception {\n\t\t\t\t\treturn v1 + v2;\n\t\t\t\t}\n\t\t\t});\n\t\t\tresult.add(new KeyValue<Integer>(tuple2._1, (int) sum / prices.size()));\n\t\t}\n\t\t// dal.destroy();\n\t\treturn result;\n\t}", "@Override\r\n\tpublic double calculateTaxes(int year) {\n\t\tdouble taxe1 = 2.0; // public double section1 = minimum;\r\n\t\tdouble taxe2 = 4.0;\r\n\t\tdouble taxe3 = 10.0;\r\n\t\tdouble taxe4 = 25.0;\r\n\t\tdouble totalSalary = monthSalary * 14; // 14 son pagas en año\r\n\r\n\t\tif (totalSalary <= 12600) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe1));\r\n\r\n\t\t} else if (totalSalary <= 15000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe2));\r\n\r\n\t\t} else if (totalSalary <= 21000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe3));\r\n\r\n\t\t} else if (totalSalary > 21000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe4));\r\n\r\n\t\t} else\r\n\t\t\ttotalSalary = -1;\r\n\r\n\t\treturn totalSalary;\r\n\t}", "public ArrayList<Double> averageSalaries(){\n\t\tArrayList<Double> averageSalaries = new ArrayList<Double>();\n for(int i=0;i<allSalaries.size();i++) {\n \ttry {\n \t\tdouble averageEmployee=average(allSalaries.get(i));\n \t\taverageSalaries.add(averageEmployee);\n \t}catch(IllegalArgumentException e) {\n \t\tSystem.out.println(\"There is something wrong with input\");\n \t} \t\n\t\t}\n return averageSalaries;\n\t}", "@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}", "public double averageBewertungHotel(Hotel hotel) {\r\n \tArrayList<Integer> bewertung = hotel.getBewertung();\r\n \tdouble wert=0;\r\n \tfor (int i=0;i<bewertung.size();i++) {\r\n \t\twert+=bewertung.get(i);\r\n \t}\r\n \twert=wert/bewertung.size();\r\n \treturn wert;\r\n }", "static double average(double[] data){\n\n // Initializing total placeholder \n double total = 0;\n\n // Traversing data array and adding to total sum\n for (double d : data) {\n total += d;\n }\n\n // Computing average\n double average = (double) total / data.length;\n\n return average;\n }", "public static double average(int[] arr)\n {\n // your code goes here\n\t\tdouble sum =0;\n int i;\n for(i=0;i< arr.length;i++)\n {\n sum+=arr[i];\n }\n\t\t\n\t\treturn sum/arr.length; \n\t}", "private double getAvg() {\n\n double sum = 0;\n\n for (Map.Entry<Integer, Double> entry : values.entrySet()) {\n sum += entry.getValue();\n }\n\n if (values.size() > 0) {\n return sum / values.size();\n } else {\n throw new IllegalStateException(\"no values\");\n }\n }", "public double calcAnnualIncome()\r\n {\r\n return ((hourlyWage * hoursPerWeek * weeksPerYear) * (1 - deductionsRate));\r\n }", "public double averageArticlesPerUser() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageArticlesPerUser();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}", "public static double average(double[] array){\n double sum = 0;\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n return sum/array.length;\n }", "public double averageOfArray() {\n double sum = 0;\n double average = 0;\n int i;\n for (i = 0; i < sirDeLa1La100.length; i++) {\n sum = sum + sirDeLa1La100[i];\n }\n average = sum / sirDeLa1La100.length;\n return average;\n }", "public double givenWeeklyWageEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(weeklyWageFindIncome.getSlopeAll());\n\t}", "public double givenWorkWeeksEstimateIncomeGetSlopeAll(){\n\t return formatReturnValue(workWeeksFindIncome.getSlopeAll());\n\t}", "double average(double[] doubles) {\n double total = 0.0;\n //int count = 0;\n for (double d: doubles) {\n total = total + d;\n //count = count + 1;\n }\n //return total / count;\n return total / doubles.length;\n }", "public int averageOrderPrice() {\n\t\tint orderTotal = 0;\n\n\t\tfor (CustomerWithGoods customerWithGoods : allCustomers) {\n\t\t\torderTotal += customerWithGoods.valueOfGoods();\n\t\t}\n\t\treturn orderTotal /= allCustomers.size();\n\t}", "public void getAvg()\n {\n this.avg = sum/intData.length;\n }", "public double calculateOverallRating() {\n Rating[] ratingArray = this.ratings;\n double sum = 0.0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) { // Making sure it has a rating\n sum = sum + ratingArray[i].getScore();\n } else {\n sum = sum + 0.0;\n }\n }\n return sum;\n }", "static double calculateAverage(int[] array) {\n\n double sum = 0;\n\n for (int i = 0; i < array.length; i++) {\n\n sum = sum + (double) array[i];\n\n\n }\n\n return sum / array.length;//returning average\n\n }", "double getAvgTreatment();", "public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}", "public static double avg(double[] array) {\r\n\t\tdouble ret = sum(array);\r\n\t\treturn ret / array.length;\r\n\t}", "@Override\n public Double average() {\n return (sum() / (double) count());\n }", "public Region findLowestEarningRegion() {\n Region low = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (low.calcEarnings() >= regionList[i].calcEarnings())\n low = regionList[i];\n }\n return low;\n }", "public double getTotalGoldAverage() {\n return StatisticsHelper.getDivision(getTotalGold(), getTotalDeckAmount());\n }", "public BigDecimal getTOTAL_EARNED_PROFIT() {\r\n return TOTAL_EARNED_PROFIT;\r\n }", "public double earnings() {\n\t\treturn weeklySalary; \n\t}", "double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}", "private double calcAverage(int startIndex, int endIndex) {\n\t\t\n\t\t// total for the scores\n\t\tdouble total = 0;\n\t\t\n\t\t// loop between indexes and add the scores\n\t\tfor (int i = startIndex; i < endIndex; i++) \n\t\t\ttotal += scores.get(i);\n\t\t\n\t\t// return the average\n\t\treturn total / (endIndex - startIndex);\n\t}", "@Override\n public double earnings() {\n if (getHours() < 40)\n return getWage() * getHours();\n else\n return 40 * getWage() + ( getHours() - 40 ) * getWage() * 1.5;\n }", "static double averageDoubleArray(double[] inputArray) {\n\t\tdouble doubleSum = 00.00;\n\t\tfor (double element : inputArray) { \n\t\t\tdoubleSum += element;\n\t\t}\n\t\tdouble average = doubleSum / inputArray.length; \n\t\treturn average;\n\t}", "@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }", "public double getAverageGrade(){\n double totalGrade = 0;\n double averageGrade = 0;\n // for loop to iterate over the array\n for(int i = 0; i<students.size(); i++){\n totalGrade += students.get(i).getGrades();\n } // end for\n \n averageGrade = totalGrade / students.size();\n return averageGrade;\n }", "public int getAverage() { return (int)Math.ceil(getSumOfMarks()/ numberOfCourses); }", "public double getAverage()\n {\n return getSum() / 2.0;\n }", "private double computeTotalInterest(Map<Integer, Double> interestMap) {\n\t\tdouble totalInterest = 0.0;\n\t\tif(null != interestMap) {\n\t\tfor (Map.Entry<Integer, Double> entry : interestMap.entrySet())\n\t\t\ttotalInterest = totalInterest + entry.getValue();\n\t\t}\n\t\tDecimalFormat f = new DecimalFormat(\"##.00\");\n\t\tString fmtInterest = f.format(totalInterest);\n\n\t\treturn Double.valueOf(fmtInterest);\n\t}", "public double getGradeAverage() {\n int gradesTotal = 0;\n for (int grade : grades) {\n gradesTotal += grade;\n }\n return gradesTotal / grades.size();\n }", "public double averagePrice() {\r\n\t\tdouble sum = 0;\r\n\t\tfor(Integer price : ticketPrice) {\r\n\t\t\tsum+=price;\r\n\t\t}\r\n\t\treturn sum/ticketPrice.size();\r\n\t}", "public double getTotalDustAverage() {\n return StatisticsHelper.getDivision(getTotalDust(), getTotalDeckAmount());\n }", "public static double countAllAverage(Runner[] runners, int numberOfRunners)//cчитаем среднее значение\n {\n int result = 0;\n for (int i = 0; i < numberOfRunners; i++) {\n result += runners[i].getAverageRun();\n }\n\n return result / numberOfRunners;\n }", "public double getIncomeTotal(){\n\t\tdouble incomeTotal = (((Number)(salaryFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(socialSecurityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(utilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(unemploymentFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(disabilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(foodStampsFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(childSupportFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(otherIncomeFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(tanfFTF.getValue())).doubleValue() );\n\t\t\n\t\treturn incomeTotal;\n\t}", "private Map<String, Double> countAverageRateForOrganization(List<Organization> organizations) {\n\n Map<String, Double> average = new HashMap<>();\n for (Organization org : organizations) {\n Double avg = feedbackServiceImpl.getAsListByOrganization(org.getName()).stream().mapToDouble((feed) -> feed.getRate()).average().orElse(0);\n average.put(org.getName(), avg);\n }\n return average;\n }", "public double getAvgPopulationFitness() {\n\t\tdouble sum=0;\n\t\tfor (int i = 0; i < individuals.length; i++) {\n\t\t\tsum+=individuals[i].getFitness();\n\t\t}\n\t\treturn sum/(double)individuals.length;\n\t}", "public BigDecimal getRows_examined_avg() {\n return rows_examined_avg;\n }", "double getTotalProfit();", "public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }", "private double getIncomeAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 1)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }", "public final Integer getAvgSalary() {\n return avgSalary;\n }", "public int average()\n {\n int average = 0;\n int sum = 0;\n\n for ( int index = 0; index < data.length; index++ )\n {\n sum = sum + data[index];\n }\n average = sum / data.length;\n\n return average;\n }", "public double getAverage() {\n int total = 0;\n\n // sum grades of the student\n for (int grade : grades)\n total += grade;\n\n // return average of the grade\n return (double) total / grades.length;\n }", "double calculateArea();", "double getMeanPrice() {\n List<Double> allPrices = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> pricesOfFirm = firm.getPrices();\n allPrices.addAll(pricesOfFirm.subList(pricesOfFirm.size() - SimulationManager.sizeOfExaminationInterval, pricesOfFirm.size()));\n }\n\n return Calculation.round(Calculation.getMean(allPrices), 2);\n }", "private double calcAvgX(List<Business> business) {\n\t\tdouble avg = 0.0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < business.size(); i++) {\n\t\t\tavg += business.get(i).getPrice();\n\t\t\tcount++;\n\t\t}\n\n\t\treturn avg / count;\n\t}", "public Map<String, Double> readAverageSalaryByGender(IOService ioService) throws CustomPayrollException {\n\t\treturn normalisedDBServiceObj.getAverageSalaryByGender();\n\t}", "public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }", "private double calculateTotalFeesEarned(ArrayList<Pair<Fees, Time>> timeslots) {\n double sumOfFees = 0.00;\n for (DayOfWeek day : DayOfWeek.values()) {\n sumOfFees += calculateFeesEarnedEachDayOfWeek(timeslots, day);\n }\n return sumOfFees;\n }", "public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}", "public static double avg(int[] arr) {\n double sum = 0.0;\n for (int a : arr) sum += a;\n return sum / arr.length;\n }", "public double getAvgCashUnitPrice() {\n return this.avgCashUnitPrice ;\n }", "public double getEarnedInterest()\n {\n return startingBalance * (interestRate / 12);\n }", "public double taxCalc(int income1, int income2, int income3, int income4, int income5) {\n int[] arr = {income1, income2, income3, income4, income5};\n double taxTotal = 0.0;\n for (int i = 0; i < arr.length; i++) {\n taxTotal += (double) (arr[i] * 7 / 100);\n }\n return taxTotal;\n }", "double getAvgControl();", "public BigDecimal getRows_affected_avg() {\n return rows_affected_avg;\n }", "public double getAverageGrade(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100.\");\n }\n double sumOfGrades = 0.0;\n double averageGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n sumOfGrades += grades[studentId];\n }\n averageGrade = sumOfGrades / NUMBER_OF_STUDENTS;\n return averageGrade;\n }", "public double earnings()\r\n {\r\n /* write code to return the earnings for a PieceWorker */\r\n return getWage() * getPieces();\r\n }" ]
[ "0.7899832", "0.6079046", "0.59664965", "0.59087276", "0.5821531", "0.5659985", "0.5594382", "0.5583535", "0.5534966", "0.552775", "0.5485174", "0.54626375", "0.5449865", "0.54405385", "0.5409961", "0.5370034", "0.5332281", "0.5311291", "0.5311117", "0.5288699", "0.5284919", "0.5223752", "0.52180743", "0.52132666", "0.51978797", "0.51667666", "0.51528645", "0.51471967", "0.51442593", "0.5124284", "0.5098622", "0.5094985", "0.50921035", "0.5068608", "0.5056398", "0.5053457", "0.503772", "0.50280905", "0.50187963", "0.50111616", "0.5011096", "0.50105494", "0.5007288", "0.50070995", "0.50058997", "0.49749023", "0.4972848", "0.4961995", "0.49531153", "0.49448907", "0.49426174", "0.49305812", "0.4929628", "0.49206087", "0.4905961", "0.49027187", "0.49015763", "0.48986527", "0.48931742", "0.48924226", "0.4888528", "0.48786855", "0.48721272", "0.48695055", "0.48685002", "0.4863535", "0.485538", "0.4853174", "0.48524052", "0.48508775", "0.48504293", "0.4848523", "0.4848423", "0.48472902", "0.48429242", "0.4842459", "0.48371094", "0.48158842", "0.4803319", "0.4795339", "0.479203", "0.47902688", "0.47866267", "0.47741532", "0.4773016", "0.47707415", "0.47700626", "0.4766405", "0.47510436", "0.47388652", "0.47376493", "0.47343653", "0.4720966", "0.47147122", "0.4714083", "0.47052455", "0.47014365", "0.46976683", "0.4691574", "0.46906433" ]
0.83601284
0
/findRegion: finds a region by taking in a region name as a parameter. Uses binary search recursively. Returns a null if a region is not found, otherwise returns the region object.
public Region findRegion(String name, int start, int end) { //recursion int middle = (start + end) / 2; if (end - start > 1) { if (findRegion(name, start, middle) != null) { return findRegion(name, start, middle); } else { return findRegion(name, middle, end); } } else { if (regionList[start].getRegionName().equals(name)) { return regionList[start]; } else if (regionList[end].getRegionName().equals(name)) { return regionList[end]; } else { return null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Region findRegion(Staff find) {\n for (int i = 0; i < numRegions; i++) {\n Staff[] temp = regionList[i].getRegionStaff();\n for (int j = 0; j < regionList[i].getRegionSpec().getNumStaff(); j++) {\n if (temp[j].equals(find)) {\n return regionList[i]; \n }\n }\n }\n return null;\n }", "public static de.fraunhofer.fokus.movepla.model.Region fetchByregionName(\n java.lang.String name)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByregionName(name);\n }", "public IRegion findWordRegion(int offset) {\r\n \t\tint start = -2;\r\n \t\tint end = -1;\r\n \t\ttry {\r\n \t\t\tint pos = offset;\r\n \t\t\tchar c;\r\n \r\n \t\t\twhile (pos >= 0) {\r\n \t\t\t\tc = this.getChar(pos);\r\n \t\t\t\tif (!language().isValidIdentifierCharacter(c))\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t--pos;\r\n \t\t\t}\r\n \t\t\tstart = pos;\r\n \r\n \t\t\tpos = offset;\r\n \t\t\tint length = this.getLength();\r\n \r\n \t\t\twhile (pos < length) {\r\n \t\t\t\tc = this.getChar(pos);\r\n \t\t\t\tif (!language().isValidIdentifierCharacter(c))\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t++pos;\r\n \t\t\t}\r\n \t\t\tend = pos;\r\n \r\n \t\t} catch (BadLocationException x) {\r\n \t\t}\r\n \r\n \t\tif (start >= -1 && end > -1) {\r\n \t\t\tif (start == offset && end == offset) {\r\n \t\t\t\treturn new Region(offset, 0);\r\n \t\t\t}\r\n \t\t\telse if (start == offset) {\r\n \t\t\t\treturn new Region(start, end - start);\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\treturn new Region(start + 1, end - start - 1);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn null;\r\n \t}", "IRegion getRegion();", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "public static java.lang.String getRegion(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "public static de.fraunhofer.fokus.movepla.model.Region fetchByPrimaryKey(\n long regionId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByPrimaryKey(regionId);\n }", "private Region creatRegion(String rName) {\n\t\tfor (Region region : listRegions) {\r\n\t\t\tif (region.getName().equals(rName)) {\r\n\t\t\t\treturn region;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public RegionState getRegionForState(String state);", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic static Image getRegion(String slideRef, Object... varargs) {\n\t\tString sessionID = null;\n\t\tif (varargs.length > 5) {\n\t\t\tif (!(varargs[5] instanceof String) && varargs[5] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid sessionID\");\n\t\t\t}\n\t\t\tsessionID = (String) varargs[5];\n\t\t}\n\n\t\tsessionID = sessionId(sessionID);\n\t\tif (slideRef.startsWith(\"/\")) {\n\t\t\tslideRef = slideRef.substring(1);\n\t\t}\n\n\t\ttry {\n\t\t\tString url = getRegionUrl(slideRef, varargs);\n\t\t\tURL urlResource = new URL(url);\n\t\t\tURLConnection con = urlResource.openConnection();\n\t\t\tImage img = ImageIO.read(con.getInputStream());\n\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + con.getInputStream().toString().length());\n\t\t\treturn img;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "public static Finder<Long, Region> find() {\n return new Finder<Long, Region>(Long.class, Region.class);\n }", "public static de.fraunhofer.fokus.movepla.model.Region fetchByregionName(\n java.lang.String name, boolean retrieveFromCache)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByregionName(name, retrieveFromCache);\n }", "@Override\n @Transactional(readOnly = true)\n public Region searchByCode(String inseeCode) {\n log.debug(\"Request to get Region by insee code: {}\", inseeCode);\n List<Region> list = null;\n if(list != null && list.size() > 0)\n return list.get(0);\n else\n return null;\n }", "public TypeOfRegion getRegion();", "@Override\n\tpublic Region getRegionById(String id) {\n\t\treturn null;\n\t}", "static String getRegion(Configuration conf, String defaultRegion)\n throws IOException {\n String region = conf.getTrimmed(S3GUARD_DDB_REGION_KEY);\n if (StringUtils.isEmpty(region)) {\n region = defaultRegion;\n }\n try {\n Regions.fromName(region);\n } catch (IllegalArgumentException | NullPointerException e) {\n throw new IOException(\"Invalid region specified: \" + region + \"; \" +\n \"Region can be configured with \" + S3GUARD_DDB_REGION_KEY + \": \" +\n validRegionsString());\n }\n return region;\n }", "public ProtectedRegion regionFromSelection(String regionName) {\n\t Region selection;\n\t LocalSession localSession = this.we.getSession(this.player);\n\t com.sk89q.worldedit.world.World wrappedWorld = BukkitAdapter.adapt(this.player.getWorld());\n\t try {\n\t selection = localSession.getSelection(wrappedWorld);\n\t if (selection == null) {\n\t throw new IncompleteRegionException();\n\t }\n\t } catch (IncompleteRegionException e) {\n\t this.player.sendMessage(ChatColor.RED + \"You must select a region first!\");\n\t return null;\n\t\t}\n\t\t\n\t return new ProtectedCuboidRegion(regionName, selection.getMinimumPoint(), selection.getMaximumPoint());\n\t}", "public CoordinateRadius getRegion();", "public java.util.Enumeration getRegion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n return ejbRef().getRegion();\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "protected HRegionInfo getRegionInfo(final byte [] regionName) {\n String encodedName = HRegionInfo.encodeRegionName(regionName);\n RegionState regionState = regionStates.get(encodedName);\n if (regionState != null) {\n return regionState.getRegion();\n }\n\n try {\n Pair<HRegionInfo, ServerName> p =\n MetaReader.getRegion(server.getCatalogTracker(), regionName);\n HRegionInfo hri = p == null ? null : p.getFirst();\n if (hri != null) {\n createRegionState(hri);\n }\n return hri;\n } catch (IOException e) {\n server.abort(\"Aborting because error occoured while reading \" +\n Bytes.toStringBinary(regionName) + \" from .META.\", e);\n return null;\n }\n }", "Integer getRegionId();", "public void findByRegion(String region)\n {\n boolean found = false;\n for(KantoDex entry : entries)\n {\n if(entry.getRegion().equals(region))\n {\n found = true;\n }\n }\n if(!found)\n {\n System.out.println(\"You have input a nonexistent region.\"); \n }\n else\n {\n System.out.println(region + \" Region entries:\");\n for(KantoDex entry : entries)\n {\n if(entry.getRegion().equals(region))\n {\n entry.display();\n }\n }\n }\n }", "Region region();", "Region region();", "Region region();", "Region region();", "public TextureRegion loadTextureRegion(Texture texture, Rectangle rec);", "kr.pik.message.Profile.HowMe.Region getRegion();", "@Nullable public abstract URI region();", "public SysRegionVo getSysRegionBytNo(String tNo);", "@Override\r\n\tpublic Country find(String name) {\r\n\t\tCountry retDM = null;\r\n\r\n\t\tif (name == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treadMapFromFile();\r\n\t\t\tretDM=this.daoMap.get(name);\r\n\r\n\t\t} catch (JsonSyntaxException | JsonIOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn retDM;\r\n\t}", "public EclipseEditorTag getReferenceEditorTagAtRegion(IRegion region){\r\n \t\tfinal int offset = region.getOffset();\r\n \t\t// build a predicate that checks if the EditorTag includes the offset:\r\n \t\tSafePredicate<EclipseEditorTag> predicate = new SafePredicate<EclipseEditorTag>(){\r\n \t\t\t@Override\r\n \t\t\tpublic boolean eval(EclipseEditorTag editorTag) {\r\n \t\t\t\treturn (editorTag.getName().equals(PositionMetadata.CROSSREFERENCE)) && editorTag.includes(offset);\r\n \t\t\t}\r\n \t\t};\r\n \t\tCollection<EclipseEditorTag> tags = new TreeSet<EclipseEditorTag>(EclipseEditorTag.lengthComparator);\r\n \t\tgetEditorTagsWithPredicate(predicate, tags);\r\n \t\tif(tags.size()==0){\r\n \t\t\treturn null;\r\n \t\t}\r\n \t\treturn tags.iterator().next();\r\n \t}", "public File getWorldRegionFolder(String worldName);", "java.lang.String getRegionId();", "public static de.fraunhofer.fokus.movepla.model.Region removeByregionName(\n java.lang.String name)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchRegionException {\n return getPersistence().removeByregionName(name);\n }", "public Handle search(String name) {\n int homePos = hash(table, name);\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n // possibly iterate over entire table, but will\n // likely stop before then\n pos = (homePos + i * i) % table.length;\n if (table[pos] == null) {\n break;\n }\n else if (table[pos] != GRAVESTONE\n && table[pos].getStringAt().equals(name)) {\n return table[pos];\n }\n } // end for\n\n return null;\n }", "Optional<RegionDTO> findOne(Long id);", "public boolean findRegionDesc(String regAux);", "static int binarySearch(@NotNull int[] search, int find) {\n int start, end, midPt;\n start = 0;\n end = search.length - 1;\n\n while (start <= end) {\n midPt = (start + end) / 2;\n if (search[midPt] == find) {\n return midPt;\n } else if (search[midPt] < find) {\n start = midPt + 1;\n } else {\n end = midPt - 1;\n }\n }\n\n return -1;\n }", "private Node search(String name)\r\n\t{\r\n\t\t// Check to see if the list is empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Return null which will be checked for by the method that called it\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Tree is not empty so use the recursive search method starting at the root reference \r\n\t\t// to find the correct Node containing the String name\r\n\t\treturn search(getRoot(), name);\r\n\t}", "java.lang.String getRegionCode();", "@Delegate\n @Path(\"/projects/{project}/regions/{region}\")\n RegionOperationApi getRegionOperationApi(@PathParam(\"project\") String project, @PathParam(\"region\") String region);", "public EclipseEditorTag getReferencePositionAtRegion(IRegion region){\r\n \t\ttry {\r\n \t\t\tPosition[] positions = getPositions(EclipseEditorTag.CHAMELEON_CATEGORY);\r\n \t\t\t// Find smallest decorater including the specified region:\r\n \t\t\tint minLength = Integer.MAX_VALUE;\r\n \t\t\tEclipseEditorTag result = null;\r\n \t\t\tfor (Position position : positions) {\r\n \t\t\t\tif(position instanceof EclipseEditorTag ){\r\n \t\t\t\t\tEclipseEditorTag decorator = (EclipseEditorTag) position;\r\n \t\t\t\t\tif(decorator.getName().equals(PositionMetadata.CROSSREFERENCE)){\r\n \t\t\t\t\t\tif(decorator.includes(region.getOffset()) && decorator.getLength()<minLength){\r\n \t\t\t\t\t\t\tresult = decorator;\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\t\t\r\n \t\t\t}\r\n \t\t\treturn result;\r\n \t\t} catch (BadPositionCategoryException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}", "com.google.protobuf.ByteString getRegionCodeBytes();", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public static String[] getRegion(String dataType, String region){\r\n String line = \"\"; \r\n try{ \r\n BufferedReader br = new BufferedReader(new FileReader(\"dataSets//Continents.csv\")); \r\n while ((line = br.readLine()) != null){\r\n String[] lineArr= line.split(\",\"); \r\n if(lineArr[0].equals(region)){\r\n String[] rez= new String[lineArr.length-1];\r\n for(int i=0; i!=rez.length; i++){\r\n rez[i]=lineArr[i+1];\r\n }\r\n return rez;\r\n }\r\n }\r\n }\r\n catch (IOException e){} \r\n return new String[]{\"Error404\"};\r\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }", "@NotNull\n @Generated\n @Selector(\"region\")\n public native UIRegion region();", "public int search(String name){\n\t\tfor(Map.Entry<String, Integer> e : map.entrySet()){\n\t\t\tif(e.getKey().equals(name)){\n\t\t\t\treturn e.getValue();\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t/*\n\t\twhile(pointer < locations.length){\n\t\t\tif(locations[pointer].getName() == name){\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t\treturn locations[pointer - 1].getID();\n\t\t\t} else {\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t*/\n\t}", "public List<Region> find(Object data) {\r\n return rdao.searchByRegions(data);\r\n }", "public void secondaryRemoveRegion(com.hps.july.persistence.Region arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondaryRemoveRegion(arg0);\n }", "public int findMatchingBracket(\n final IDocument document,\n final int offset,\n boolean exact)\n {\n if (exact) bracketMatcher.setViewer(null);\n try\n {\n final int[] ret = new int[1];\n \n IRegion matchRegion = bracketMatcher.match(document, offset);\n \n if (matchRegion == null) ret[0] = -1;\n else ret[0] =\n matchRegion.getOffset() == offset - 1\n ? matchRegion.getOffset() + matchRegion.getLength() - 1\n : matchRegion.getOffset();\n \n return ret[0];\n }\n finally\n {\n if (exact) bracketMatcher.setViewer(sourceViewer);\n }\n }", "public static de.fraunhofer.fokus.movepla.model.Region findByc_First(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchRegionException {\n return getPersistence().findByc_First(companyId, orderByComparator);\n }", "public com.hps.july.persistence.SuperRegionAccessBean getSuperregion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n instantiateEJB();\n com.hps.july.persistence.SuperRegion localEJBRef = ejbRef().getSuperregion();\n if ( localEJBRef != null )\n return new com.hps.july.persistence.SuperRegionAccessBean(localEJBRef);\n else\n return null;\n }", "private Node search(Node traverse, String name)\r\n\t{\t\r\n\t\t// Haven't reached a dead-end yet\r\n\t\tif(traverse != null)\r\n\t\t{\r\n\t\t\t// Check to see if the current Node matches the String\r\n\t\t\tif(name.equalsIgnoreCase(traverse.getName()))\r\n\t\t\t{\r\n\t\t\t\t// return the location of the node\r\n\t\t\t\treturn traverse;\r\n\t\t\t}\r\n\t\t\t// The name is lexicographically less than the current Node's name\r\n\t\t\telse if(name.compareToIgnoreCase(traverse.getName()) < 0)\r\n\t\t\t{\r\n\t\t\t\t// Keep searching through the left subtree\r\n\t\t\t\treturn search(traverse.getLeftChild(), name); \r\n\t\t\t}\r\n\t\t\t// The name is lexicographically greater than the current Node's name\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Keep searching through the right subtree\r\n\t\t\t\treturn search(traverse.getRightChild(), name);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t// Node not found in the Binary Tree\r\n\t\treturn null;\r\n\t}", "Object find(String name);", "public static int getRegionIndex(Vector3 position, Team team)\n\t{\n\t\tVector2 pitchPosition = PitchUtils.globalToPitch(position.x, position.y);\n\t\t\n\t\tint xCoord = new Double(pitchPosition.x / REGION_WIDTH_IN_PX).intValue();\n\t\tint yCoord = new Double(pitchPosition.y / REGION_HEIGHT_IN_PX).intValue();\n\n\t\txCoord = xCoord < 0 ? 0 : (xCoord >= REGION_COLUMNS ? REGION_COLUMNS - 1 : xCoord);\n\t\tyCoord = yCoord < 0 ? 0 : (yCoord >= REGION_ROWS ? REGION_ROWS - 1 : yCoord);\n\n\t\tint regionIndex = xCoord * REGION_ROWS + yCoord;\n\n\t\treturn team.getDirection() == Direction.NORTH ? regionIndex : REGIONS_COUNT - 1 - regionIndex;\n\t}", "public EnumRegion getRegion()\n {\n return region;\n }", "public static String GetRegionInformation(String Region) {\n\t\tString regionString = null;\n\t\tDocument doc;\n\t\tFile Xml = new File(\"Regions.xml\");\n try {\n if (!Xml.exists()) {\n\t\t\tSystem.out.println(\"- Extracting Region.xml...\");\n\n InputStream is = Tools.class.getClass().getResourceAsStream(\n \"/Regions.xml\");\n FileOutputStream out = new FileOutputStream(new File(\n \"Regions.xml\"));\n\n int read;\n byte[] bytes = new byte[1024];\n\n while ((read = is.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n }\n\n\n\t\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t\t\t\t.newInstance();\n\t\t\t\tDocumentBuilder dBuilder;\n\n\t\t\t\tdBuilder = dbFactory.newDocumentBuilder();\n\n\t\t\t\tdoc = dBuilder.parse(Xml);\n\t\t\t\tdoc.getDocumentElement().normalize();\n\t\t\t\tNodeList nList = doc.getElementsByTagName(Region);\n\n\t\t\t\tfor (int temp = 0; temp < nList.getLength(); temp++) {\n\t\t\t\t\tNode nNode = nList.item(temp);\n\t\t\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\tElement eElement = (Element) nNode;\n\t\t\t\t\t\tregionString = eElement.getElementsByTagName(\"Region\")\n\t\t\t\t\t\t\t\t.item(0).getTextContent();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t\tlogger.error(e.getClass() + \" \" + e.getMessage());\n\t\t\t\tregionString = null;\n\t\t\t}\n return regionString;\n\t\t}", "@Override\n\tpublic Historic_site_detailVO readRegion_detail(int bno) throws Exception {\n\t\treturn dao.readRegion_detail(bno);\n\t}", "int getRegionValue();", "private int getRegion(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getRegion(java.lang.String):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getRegion(java.lang.String):int\");\n }", "void removeRegion(Region region);", "public void addRegion(com.hps.july.persistence.Region arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().addRegion(arg0);\n }", "@Override\n\tpublic Etape find(String search) {\n\t\treturn null;\n\t}", "public int nameBinarySearch (String name) {\n\t\t//sorting records by first name alphabetical order\n\t\tthis.nameQuickSort(this.getList(), 0, getSize()-1);\n\t\tint low = 0;\n\t\tint high = this.size-1;\n\t\tint middle;\n\n\t\twhile (low<=high) { \n\t\t\tmiddle = (low+high)/2;\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) == 0) { //check if name found\n\t\t\t\treturn middle; //return index\n\t\t\t}\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) <0) { //check if name to find is in the lower half\n\t\t\t\thigh = middle-1; //move the high to one lower than the middle\n\t\t\t}\n\t\t\telse { //if it is in higher part of the list\n\t\t\t\tlow = middle+1; //move the low to one higher than the middle\n\t\t\t}\n\t\t}\n\t\t//not found\n\t\treturn -1;\n\t}", "public void setRegion(String region);", "public static Node findByName (Node bst, String name){\n\t\tif(bst != null){\n\t\t\tif(bst.getName().equals(name)){\n\t\t\t\tSystem.out.println(\"The node \" + bst + \" is found!\");\n\t\t\t\treturn bst;\t\t\t\t\t\t\t\n\t\t\t}else if(bst.getName().compareTo(name)>0){\n\t\t\t\tSystem.out.println(bst.getLeft().getName() + \" <- \" + bst.getName());\n\t\t\t\treturn findByName(bst.getLeft(), name);\n\t\t\t}else{ \n\t\t\t\tSystem.out.println(bst.getName() + \" -> \" + bst.getRight().getName());\n\t\t\t\treturn findByName(bst.getRight(), name);\n\t\t\t\n\t\t\t}\n\t\t}else\n\t\treturn null;\n\t}", "public static Node find(Node node, int search_key){\n if(node!=null){ // node ที่รับมาต้องมีตัวตน\n if (search_key== node.key){ //ถ้าเจอ node ที่ตามหา ส่งค่าออกไป\n return node;\n }\n else if (search_key > node.key) { //ถ้า search_key มากกว่า node.key ตอนนี้ แสดงว่า อยู่ทางด้านขวา\n return find(node.right,search_key); // recursive โดยส่ง right-subtree\n }\n else{\n return find(node.left,search_key); // recursive โดยส่ง left-subtree\n }\n }\n else return null;\n\n }", "public Region getRegion() {\n return region;\n }", "public T caseGeographicalRegion(GeographicalRegion object) {\n\t\treturn null;\n\t}", "com.google.protobuf.ByteString\n getRegionIdBytes();", "public RegionManagementDetails getCompleteRegionDetails(String seasonId);", "public void secondaryAddRegion(com.hps.july.persistence.Region arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondaryAddRegion(arg0);\n }", "private int[] determineRegion(int X, int Y ,int H){\n int[] quadrantPoint = new int[2];\n for(int y = 0; y < BITMAP_SIZE /H; y++){\n for(int x = 0; x < BITMAP_SIZE /H; x++){\n Region reg = regions[x][y];\n if (X >= reg.leftX && X <= reg.rightX && Y >= reg.topY && Y <= reg.bottomY){\n quadrantPoint[0] = x;\n quadrantPoint[1] = y;\n return quadrantPoint;\n }\n }\n }\n\n return null;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "void addRegion(Region region);", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "private RoomCard findRoomCard(String search) {\n for (RoomCard card : this.getRoomCards()) {\n if (card.getName().toLowerCase().equals(search.toLowerCase())) {\n return card;\n }\n }\n return null;\n }", "public static myRemoteInterface lookUp(String name){\n\t\n\t\tRegistryInterface stub = null;\n\t\ttry{\n\t\t\tstub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t}catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn (myRemoteInterface)stub.lookUp(name);\n\t\t\n\t}", "@SuppressWarnings({ \"unchecked\" })\n\tpublic static String getRegionUrl(String slideRef, Object... varargs) throws Exception {\n\t\t// setting the default values when arguments' values are omitted\n\t\tInteger x = 0;\n\t\tInteger y = 0;\n\t\tInteger width = 0;\n\t\tInteger height = 0;\n\t\tInteger scale = 1;\n\t\tInteger zStack = 0;\n\t\tString sessionID = null;\n\t\tString format = \"jpg\";\n\t\tInteger quality = 100;\n\t\tInteger rotation = 0;\n\t\tInteger contrast = null;\n\t\tInteger brightness = null;\n\t\tInteger postGamma = null;\n\t\tInteger dpi = 300;\n\t\tBoolean flipVertical = false;\n\t\tBoolean flipHorizontal = false;\n\t\tString annotationsLayerType = null;\n\t\tInteger drawFilename = 0;\n\t\tBoolean downloadInsteadOfDisplay = false;\n\t\tBoolean drawScaleBar = false;\n\t\tString gamma = null;\n\t\tString channelClipping = null;\n\n\t\tif (varargs.length > 0) {\n\t\t\tif (!(varargs[0] instanceof Integer) && varargs[0] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, X is required\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"X is required\");\n\t\t\t}\n\t\t\tx = (Integer) varargs[0];\n\t\t}\n\t\tif (varargs.length > 1) {\n\t\t\tif (!(varargs[1] instanceof Integer) && varargs[1] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, Y is required\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Y is required\");\n\t\t\t}\n\t\t\ty = (Integer) varargs[1];\n\t\t}\n\t\tif (varargs.length > 2) {\n\t\t\tif (!(varargs[2] instanceof Integer) && varargs[2] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, width is required\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Width is required\");\n\t\t\t}\n\t\t\twidth = (Integer) varargs[2];\n\t\t}\n\t\tif (varargs.length > 3) {\n\t\t\tif (!(varargs[3] instanceof Integer) && varargs[3] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, height is required\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Height is required\");\n\t\t\t}\n\t\t\theight = (Integer) varargs[3];\n\t\t}\n\t\tif (varargs.length > 4) {\n\t\t\tif (!(varargs[4] instanceof Integer) && varargs[4] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, zStack is required\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"ZStack is required\");\n\t\t\t}\n\t\t\tzStack = (Integer) varargs[4];\n\t\t}\n\t\tif (varargs.length > 5) {\n\t\t\tif (!(varargs[5] instanceof String) && varargs[5] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, invalid sessionId\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid session id\");\n\t\t\t}\n\t\t\tsessionID = (String) varargs[5];\n\t\t}\n\t\tif (varargs.length > 6) {\n\t\t\tif (!(varargs[6] instanceof String) && varargs[6] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, invalid format parameter\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid format parameter\");\n\t\t\t}\n\t\t\tformat = (String) varargs[6];\n\t\t}\n\t\tif (varargs.length > 7) {\n\t\t\tif (!(varargs[7] instanceof Integer) && varargs[7] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, invalid quality parameter\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid quality parameter\");\n\t\t\t}\n\t\t\tquality = (Integer) varargs[7];\n\t\t}\n\t\tif (varargs.length > 8) {\n\t\t\tif (!(varargs[8] instanceof Integer) && varargs[8] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument, invalid rotation parameter\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid rotation parameter\");\n\t\t\t}\n\t\t\trotation = (Integer) varargs[8];\n\t\t}\n\t\tif (varargs.length > 9) {\n\t\t\tif (!(varargs[9] instanceof Integer) && varargs[9] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument constrast\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid contrast parameter\");\n\t\t\t}\n\t\t\tcontrast = (Integer) varargs[9];\n\t\t}\n\t\tif (varargs.length > 10) {\n\t\t\tif (!(varargs[10] instanceof Integer) && varargs[10] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument brightness\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid brightness parameter\");\n\t\t\t}\n\t\t\tbrightness = (Integer) varargs[10];\n\t\t}\n\t\tif (varargs.length > 11) {\n\t\t\tif (!(varargs[11] instanceof Integer) && varargs[11] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument postGamma\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid post gamma parameter.\");\n\t\t\t}\n\t\t\tpostGamma = (Integer) varargs[11];\n\t\t}\n\t\tif (varargs.length > 12) {\n\t\t\tif (!(varargs[12] instanceof Integer) && varargs[12] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument dpi\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid dpi parameter\");\n\t\t\t}\n\t\t\tdpi = (Integer) varargs[12];\n\t\t}\n\t\tif (varargs.length > 13) {\n\t\t\tif (!(varargs[13] instanceof Boolean) && varargs[13] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument flipVertical\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\" Invalid paramter flipVertical\");\n\t\t\t}\n\t\t\tflipVertical = (Boolean) varargs[13];\n\t\t}\n\t\tif (varargs.length > 14) {\n\t\t\tif (!(varargs[14] instanceof Boolean) && varargs[14] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument flipHorizontal\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid argument flipHorizontal\");\n\t\t\t}\n\t\t\tflipHorizontal = (Boolean) varargs[14];\n\t\t}\n\t\tif (varargs.length > 15) {\n\t\t\tif (!(varargs[15] instanceof String) && varargs[15] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument annotationsLayerType\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid argument annotationsLayerType\");\n\t\t\t}\n\t\t\tannotationsLayerType = (String) varargs[15];\n\t\t}\n\t\tif (varargs.length > 16) {\n\t\t\tif (!(varargs[16] instanceof Integer) && varargs[16] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument drawFilename\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid argument drawFilename\");\n\t\t\t}\n\t\t\tdrawFilename = (Integer) varargs[16];\n\t\t}\n\t\tif (varargs.length > 17) {\n\t\t\tif (!(varargs[17] instanceof Boolean) && varargs[17] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument downloadInsteadOfDisplay\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid argument downloadInsteadOfDisplay\");\n\t\t\t}\n\t\t\tdownloadInsteadOfDisplay = (Boolean) varargs[17];\n\t\t}\n\t\tif (varargs.length > 18) {\n\t\t\tif (!(varargs[18] instanceof Boolean) && varargs[18] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument drawScaleBar\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid argument drawScaleBar\");\n\t\t\t}\n\t\t\tdrawScaleBar = (Boolean) varargs[18];\n\t\t}\n\t\tif (varargs.length > 19) {\n\t\t\tif (!(varargs[19] instanceof ArrayList) && varargs[19] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument gamma\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid argument gamma\");\n\t\t\t}\n\n\t\t\tgamma = String.join(\",\", (List<String>) varargs[19]);\n\t\t}\n\t\tif (varargs.length > 20) {\n\t\t\tif (!(varargs[20] instanceof ArrayList) && varargs[20] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getRegion(): Invalid argument channelClipping\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid argument channelClipping\");\n\t\t\t}\n\t\t\tchannelClipping = String.join(\",\", (List<String>) varargs[19]);\n\t\t}\n\n\t\tsessionID = sessionId(sessionID);\n\t\tif (slideRef.startsWith(\"/\")) {\n\t\t\tslideRef = slideRef.substring(1);\n\t\t}\n\n\t\tString url;\n\t\turl = pmaUrl(sessionID);\n\t\tif (url == null) {\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tPMA.logger.severe(\"Unable to determine the PMA.core instance belonging to \" + sessionID);\n\t\t\t}\n\t\t\tthrow new Exception(\"Unable to determine the PMA.core instance belonging to \" + sessionID);\n\t\t}\n\t\ttry {\n\t\t\turl += \"region\" + \"?SessionID=\" + PMA.pmaQ(sessionID) + \"&channels=\" + PMA.pmaQ(\"0\") + \"&layer=\"\n\t\t\t\t\t+ zStack.toString() + \"&timeframe=\" + PMA.pmaQ(\"0\") + \"&layer=\" + PMA.pmaQ(\"0\") + \"&pathOrUid=\"\n\t\t\t\t\t+ PMA.pmaQ(slideRef) + \"&x=\" + x.toString() + \"&y=\" + y.toString() + \"&width=\" + width.toString()\n\t\t\t\t\t+ \"&height=\" + height.toString() + \"&scale=\" + scale.toString() + \"&format=\" + PMA.pmaQ(format)\n\t\t\t\t\t+ \"&quality=\" + PMA.pmaQ(quality.toString()) + \"&rotation=\" + rotation.toString() + \"&contrast=\"\n\t\t\t\t\t+ contrast.toString() + \"&brightness=\" + brightness.toString() + \"&postGamma=\"\n\t\t\t\t\t+ postGamma.toString() + \"&dpi=\" + dpi.toString() + \"&flipVertical=\" + flipVertical.toString()\n\t\t\t\t\t+ \"&flipHorizontal=\" + flipHorizontal.toString() + \"&annotationsLayerType=\"\n\t\t\t\t\t+ PMA.pmaQ(annotationsLayerType) + \"&drawFilename=\" + drawFilename.toString()\n\t\t\t\t\t+ \"&downloadInsteadOfDisplay=\" + downloadInsteadOfDisplay.toString() + \"&drawScaleBar=\"\n\t\t\t\t\t+ drawScaleBar.toString() + \"&gamma=\" + PMA.pmaQ(gamma) + \"&channelClipping=\"\n\t\t\t\t\t+ PMA.pmaQ(channelClipping) + \"&cache=\" + pmaUseCacheWhenRetrievingTiles.toString().toLowerCase();\n\t\t\treturn url;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "@Delegate\n @Path(\"/projects/{project}\")\n RegionApi getRegionApi(@PathParam(\"project\") String projectName);", "public static String getDsInstitutionRegion(DigitalObject ds, GbifClient gbifClient){\n String institutionRegion = null;\n String institutionId = DigitalSpecimenUtils.getTermFromDsDwcaJson(ds, DwcTerm.institutionID);\n String institutionCode = DigitalSpecimenUtils.getStringPropertyFromDS(ds,\"institutionCode\");\n String collectionCode = DigitalSpecimenUtils.getStringPropertyFromDS(ds,\"collectionCode\");\n String collectionId = DigitalSpecimenUtils.getTermFromDsDwcaJson(ds, DwcTerm.collectionID);\n String identifier = DigitalSpecimenUtils.getTermFromDsDwcaJson(ds, DcTerm.identifier);\n try{\n JsonObject institutionInfo = null;\n if (StringUtils.isNotBlank(institutionId) && DigitalSpecimenUtils.isStringAValidUuid(institutionId)){\n institutionInfo = gbifClient.getInstitutionInfoByInstitutionId(institutionId);\n } else if (StringUtils.isNotBlank(institutionCode)){\n JsonArray posibleInstitutions = gbifClient.getInstitutionsInfoByInstitutionCode(institutionCode);\n if (posibleInstitutions.size()==1){\n institutionInfo = posibleInstitutions.get(0).getAsJsonObject();\n } else if (posibleInstitutions.size()>1){\n //There are several institution with that institution code\n //Check if all of them are from the same region\n String possibleRegion = \"UNKNOWN\";\n if (posibleInstitutions.get(0).getAsJsonObject().has(\"country\")){\n possibleRegion = posibleInstitutions.get(0).getAsJsonObject().getAsJsonObject(\"country\").get(\"region\").getAsString();\n }\n boolean sameRegion=true;\n for (JsonElement posibleInstitution:posibleInstitutions) {\n if (!posibleInstitution.getAsJsonObject().has(\"country\") || !possibleRegion.equalsIgnoreCase(posibleInstitution.getAsJsonObject().getAsJsonObject(\"country\").get(\"region\").getAsString())){\n sameRegion=false;\n break;\n }\n }\n if (sameRegion){\n institutionInfo=posibleInstitutions.get(0).getAsJsonObject();\n } else if (StringUtils.isNotBlank(collectionCode)){\n //Try to see if we can find what institution this digital specimen belongs to by looking at the collection code\n for (Iterator<JsonElement> iter = posibleInstitutions.iterator(); iter.hasNext(); ) {\n JsonObject posibleInstitution = (JsonObject) iter.next();\n JsonObject collectionInfo = gbifClient.getCollectionInfoByInstitutionIdAndCollectionCode(posibleInstitution.get(\"key\").getAsString(),collectionCode);\n if (collectionInfo==null){\n iter.remove();\n }\n }\n if (posibleInstitutions.size()==1){\n institutionInfo=posibleInstitutions.get(0).getAsJsonObject();\n }\n }\n }\n }\n\n if (institutionInfo!=null && institutionInfo.has(\"country\")){\n institutionRegion = institutionInfo.getAsJsonObject(\"country\").get(\"region\").getAsString();\n } else{\n //As last attempt, try to get the country from the record institutionId, collectionsId or identifier if they are valid url\n UrlValidator urlValidator = new UrlValidator();\n CountryResponse countryResponse = null;\n if (StringUtils.isNotBlank(institutionId) && urlValidator.isValid(institutionId)){\n logger.debug(\"Obtaining institution code from \");\n countryResponse = NetUtils.getCountryInfoFromUrl(institutionId);\n } else if (StringUtils.isNotBlank(collectionId) && urlValidator.isValid(collectionId)){\n countryResponse = NetUtils.getCountryInfoFromUrl(collectionId);\n } else if (StringUtils.isNotBlank(identifier) && urlValidator.isValid(identifier)){\n countryResponse = NetUtils.getCountryInfoFromUrl(identifier);\n }\n if (countryResponse!=null){\n institutionRegion = countryResponse.getContinent().getName();\n }\n }\n\n if (StringUtils.isBlank(institutionRegion)){\n String physicalSpecimenId=DigitalSpecimenUtils.getStringPropertyFromDS(ds,\"physicalSpecimenId\");\n String scientificName=DigitalSpecimenUtils.getStringPropertyFromDS(ds,\"scientificName\");\n logger.warn(\"It was not possible to obtain institution's regions for ds [\" + scientificName\n + \" || \" + institutionCode + \" || \"+ physicalSpecimenId + \"]\");\n }\n } catch (Exception e){\n logger.error(\"Unexpected error trying to obtain institution's region for ds \" + e.getMessage(),ds);\n }\n return institutionRegion;\n }", "public interface RegionService {\n\t\n\tRegion getById(Long id);\n\tList<Region> getAll();\n}", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public LocalRegion getRegion() {\n\t\treturn this.region;\n\t}", "public static de.fraunhofer.fokus.movepla.model.Region findBycp_First(\n long companyId, long parentRegion,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchRegionException {\n return getPersistence()\n .findBycp_First(companyId, parentRegion, orderByComparator);\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "int binarySearchWithRecursion(int[] arr, int low, int high, int key){\n if (high < low)\n return -1;\n int mid = (low + high) / 2;\n if (key == arr[mid])\n return mid;\n if (key > arr[mid])\n return binarySearchWithRecursion(arr,(mid + 1), high, key);\n return binarySearchWithRecursion(arr, low, (mid - 1), key);\n }", "Optional<Resource> find(Session session, IRI identifier);", "public String getRegion() {\n return region;\n }" ]
[ "0.6651528", "0.5675909", "0.55057", "0.5339062", "0.53014195", "0.52665484", "0.5257985", "0.52118164", "0.5205357", "0.51918536", "0.5132687", "0.50124365", "0.5006584", "0.5001377", "0.49638674", "0.49124345", "0.485698", "0.48247847", "0.48212746", "0.48106378", "0.48106378", "0.48106378", "0.48106378", "0.48035014", "0.47549567", "0.4745943", "0.46683997", "0.46683997", "0.46683997", "0.46683997", "0.46615353", "0.46535686", "0.46495712", "0.46442223", "0.4631623", "0.4626734", "0.46137235", "0.46018434", "0.4566784", "0.4525661", "0.45082092", "0.44886947", "0.44882852", "0.44776368", "0.4470866", "0.44441143", "0.44303417", "0.44275597", "0.442728", "0.44190848", "0.4416524", "0.44152156", "0.44084063", "0.44001502", "0.43948764", "0.43943736", "0.4380074", "0.43717653", "0.43716338", "0.43702325", "0.43686587", "0.43633768", "0.43418983", "0.43382254", "0.4302356", "0.43009993", "0.4300562", "0.42907897", "0.42831418", "0.42577913", "0.42504746", "0.4249338", "0.42449635", "0.4220346", "0.4214644", "0.4212689", "0.4204691", "0.42008927", "0.41894296", "0.4185704", "0.4184685", "0.41781598", "0.41767552", "0.41597044", "0.41597044", "0.415876", "0.4158583", "0.41475576", "0.4147249", "0.41379744", "0.4135542", "0.41308007", "0.41290298", "0.41284797", "0.41266748", "0.41266748", "0.41266748", "0.41225496", "0.41195038", "0.4119219" ]
0.6749402
0
/findHighestEarningEmployee: Finds the highest wage employee by looping once through the staffList and comparing the wage of each Labourer.
public Staff findHighestEarningLabour() { Staff highest = new Labourer(null,0,null,0,0); for (int i = 0; i < staffList.length; i++) { if (staffList[i] instanceof Labourer) { if (((Labourer)staffList[i]).getWage() >= ((Labourer)highest).getWage()){ highest = staffList[i]; } } } return highest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employee getHighestRevenueEmployee() {\n\t\tEmployee employee = new Employee();\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\"SELECT R.CustRepId, P.FirstName, P.LastName, E.Email, Count(*) \" +\n\t\t\t\t\t\"FROM Person P, Rental R, Employee E \" +\n\t\t\t\t\t\"WHERE P.SSN = R.CustRepId AND E.SSN = P.SSN \"+\n\t\t\t\t\t\"group by P.FirstName, P.LastName \" +\n\t\t\t\t\t\"ORDER BY COUNT(*) DESC; \"\n\t\t\t\t\t);\n\t\t\trs.next();\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"CustRepId\")));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\n\t\treturn employee;\n\t\t\n\t}", "public Staff findLowestEarningLabour() {\n Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){\n lowest = staffList[i];\n }\n }\n }\n return lowest;\n }", "public double findAvgWage() {\n int numLabourer = 0;\n double total = 0;\n \n for (int i = 0; i < staffList.length; i++) {\n if (staffList[i] instanceof Labourer) {\n total += ((Labourer) staffList[i]).getWage();\n numLabourer ++;\n }\n }\n \n return total/numLabourer;\n }", "public double getHighestGrade(){\n double highestGrade = 0;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()> highestGrade)\n highestGrade = students.get(i).getGrades();\n }// end for\n return highestGrade;\n }", "public static MyStudent studentWithHighest ( List<MyStudent> list) {\n\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-1).findFirst().get();\n\t}", "public static MyStudent SecondHighest (List<MyStudent> list) {\n\t\t\t\n\t\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-2).findFirst().get();\n\t\t\t\n\t\t}", "public int employeeSalaryForBenefits(String employeeName) {\n\n int actualSalaryOfEmployee = 0;\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n actualSalaryOfEmployee = Integer.valueOf(salaryField);\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n return actualSalaryOfEmployee;\n\n }", "public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }", "@Override\n\tpublic User getBestEmployee(int idBuisness) {\n\t\tQuery query = em\n\t\t\t\t.createQuery(\"select u from UserBuisness ub join ub.id.user u where ub.id.buisness=\" + idBuisness);\n\t\tList<User> users = (List<User>) query.getResultList();\n\t\tfor (User u : users) {\n\t\t\tu = userServiceLocal.getFull(u.getId());\n\t\t}\n\t\tboolean verif = false;\n\t\twhile (verif == false) {\n\t\t\tverif = true;\n\t\t\tfor (int i = 0; i < users.size() - 1; i++) {\n\t\t\t\tSystem.out.println(\"i.\" + i);\n\t\t\t\tint counter = 0;\n\t\t\t\tfor (UserSkill us1 : users.get(i).getUserSkills()) {\n\t\t\t\t\tSystem.out.println(\"userskill\" + us1.getLevel());\n\t\t\t\t\tboolean exist = false;\n\t\t\t\t\tfor (UserSkill us2 : users.get(i + 1).getUserSkills()) {\n\t\t\t\t\t\tif (us1.getSkill().getId() == us2.getSkill().getId()) {\n\t\t\t\t\t\t\tif (us1.getLevel() < us2.getLevel()) {\n\t\t\t\t\t\t\t\tcounter--;\n\t\t\t\t\t\t\t} else if (us1.getLevel() > us2.getLevel()) {\n\t\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!exist) {\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (counter < 0) {\n\t\t\t\t\tUser aux = users.get(i);\n\t\t\t\t\tusers.set(i, users.get(i + 1));\n\t\t\t\t\tusers.set(i + 1, aux);\n\t\t\t\t\tverif = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn users.get(0);\n\t}", "static int findMaxProfit(int numOfPredictedDays, int[] predictedSharePrices) {\n int max = 0;\n for(int i = 0; i< numOfPredictedDays -1; i++)\n {\n for (int j = i+1; j< numOfPredictedDays;j++)\n {\n int temp = predictedSharePrices[j] - predictedSharePrices[i];\n if(temp > max)\n {\n max = temp;\n }\n }\n }\n return max;\n }", "static void compareEmployeeSalary(EmployeeQ7 e1, EmployeeQ7 e2) {\n\t\tif (e1.getSalary() > e2.getSalary()) {\n\t\t\te1.display();\n\t\t} else {\n\t\t\te2.display();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n long[] salaries= {120000, 85000, 95000, 145000};\n\n for(long eachSalary : salaries){\n System.out.println(eachSalary);\n }\n\n long max=salaries[0];\n for (int i = 0; i <salaries.length ; i++) {\n if(salaries[i]>max);\n max=salaries[i];\n }\n System.out.println(\"max = \" + max);\n\n\n }", "public double getWages() {\r\n int x = -1;\r\n for(int i = 0; i < 7; i++) {\r\n if (idInput == EMPLOYEEID[i]) {\r\n x = i;\r\n break;\r\n }\r\n }\r\n return wages[x];\r\n }", "private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }", "public Region findHighestEarningRegion() {\n Region highest = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (highest.calcEarnings() <= regionList[i].calcEarnings())\n highest = regionList[i];\n }\n return highest;\n }", "public Hotel bestHotel() {\r\n \tArrayList<Hotel> hotels = hotelDAO.getHotelList();\r\n \tHotel bestHotel=hotels.get(0);\r\n \tfor (int i=0; i<hotels.size();i++) {\r\n \t\tif(averageBewertungHotel(bestHotel)<averageBewertungHotel(hotels.get(i))) {\r\n \t\t\tbestHotel=hotels.get(i);\r\n \t\t}\r\n \t}\r\n \treturn bestHotel;\r\n }", "public int employeeSalary(String employeeName) {\n\n int actualSalaryOfEmployee = 0;\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n actualSalaryOfEmployee = Integer.valueOf(salaryField);\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"The salary earned by this employee is: \");\n return actualSalaryOfEmployee;\n\n }", "public ArrayList<CustomerSpender> getCustomerByHighestSpentAmount(){\n ArrayList<CustomerSpender> customerSpenders = new ArrayList<>();\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT Customer.CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email, Invoice.Total\" +\n \" FROM Customer INNER JOIN Invoice ON Customer.CustomerId = Invoice.CustomerId\" +\n \" ORDER BY Invoice.Total DESC\");\n\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n customerSpenders.add(new CustomerSpender(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\"),\n set.getString(\"total\")\n ));\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return customerSpenders;\n }", "public int _maxProfitAssignment(int[] difficulty, int[] profit, int[] worker) {\n Integer [] indexes = new Integer [difficulty.length];\n for (int idx = 0; idx < indexes.length; idx ++) indexes [idx] = idx;\n\n Arrays.sort(indexes, (a, b) -> difficulty [a] != difficulty [b] ?\n difficulty [a] - difficulty [b] :\n (profit [b] - profit [a]));\n // maxprofit is not working until we sort difficulty properly.\n\n int [] maxProfit = new int [profit.length];\n maxProfit [0] = profit [indexes [0]];\n\n for (int idx = 1; idx < indexes.length; idx ++)\n maxProfit [idx] = Math.max(maxProfit [idx - 1], profit [indexes [idx]]);\n\n int ans = 0;\n for (int val : worker) {\n int idx = binarySearch(indexes, difficulty, val);\n if (idx >= 0) ans += maxProfit [idx];\n }\n return ans;\n }", "public static int computeEmpWageForCompany(String company ,int empRate,int numOfDays,int maxHrs) {\n\n int empHrs = 0;\n int totalEmpHrs = 0;\n int totalWorkingDays = 0;\n\n while (totalEmpHrs < maxHrs && totalWorkingDays < numOfDays) {\n totalWorkingDays ++;\n System.out.println(\"Day:\" + totalWorkingDays);\n\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_PART_TIME:\n System.out.println(\"Empcheck is 1 (parttime)\");\n empHrs = 4;\n break;\n case IS_FULL_TIME:\n System.out.println(\"Empcheck is 2 (fulltime)\");\n empHrs = 8;\n break;\n default:\n System.out.println(\"Empcheck is 0\");\n empHrs = 0;\n }\n totalEmpHrs = (totalEmpHrs + empHrs);\n System.out.println(\"Day : \" +totalWorkingDays+ \"Employee hours:\" + empHrs);\n }\n int totalEmpWage =totalEmpHrs * empRate;\n System.out.println(\"Total Employee wage for company : \" +company+ \"is \"+totalEmpWage);\n return totalEmpWage;\n }", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "public int _maxProfitAssignmentBetter(int[] difficulty, int[] profit, int[] worker) {\n int n = difficulty.length;\n int [][] dp = new int [n][];\n\n for (int i = 0; i < n; i ++)\n dp [i] = new int[] { difficulty[i], profit[i] };\n\n Arrays.sort(dp, (a, b) -> (a [0] != b [0]) ? (a [0] - b [0]) : -(a [1] - b [1]));\n\n int[] xs = new int[n];\n for (int i = 0; i < n; i ++) xs [i] = dp [i][0];\n for (int i = 1; i < n; i ++) dp[i][1] = Math.max(dp [i][1], dp [i - 1][1]);\n\n int ret = 0;\n for(int w : worker){\n int ind = Arrays.binarySearch(xs, w);\n if (ind < 0) ind = -ind - 2;\n if (ind >= 0)\n ret += dp[ind][1];\n }\n return ret;\n }", "public int _maxProfitAssignmentBest(int[] difficulty, int[] profit, int[] worker) {\n // value index reverse array\n int [] dp = new int [100001];\n\n // nice strategy to use in multi-array approach\n // using difficulty as index, profit as value.\n // (difficulty array sorted by default, effort saved)\n for (int idx = 0; idx < difficulty.length; idx ++) {\n // overwrite profit values and keep the max one. (in case of conflict)\n dp [difficulty [idx]] = Math.max (dp [difficulty [idx]], profit [idx]);\n }\n\n // maximize profits stored linearly\n for (int idx = 1; idx < dp.length; idx ++)\n dp [idx] = Math.max (dp [idx - 1], dp [idx]);\n\n // build ans\n int ans = 0;\n for (int w : worker)\n ans += dp [w];\n\n return ans;\n }", "public PracticeResult getHighestGradingByMember(Member member, String practiceType);", "public int giveRaise() throws EmployeeSalaryException {\n try {\n if (this.yearsWorked % 3 == 0) {\n this.salary = (this.salary + 3000);\n this.yearsWorked++;\n if (this.salary > maxEmployeeSalary) {\n this.salary = maxEmployeeSalary;\n throw new EmployeeSalaryException();\n }\n } else {\n this.yearsWorked++;\n }\n } catch (EmployeeSalaryException ex) {\n ex.printStackTrace();\n System.out.println(\"Sorry maximum salary can only be: \" + maxEmployeeSalary);\n }\n return this.salary;\n }", "static public Set<Employee> removeWithWageAbove(Set<Employee> company, Float maximumWage){\n\t\tfor(Iterator<Employee> iterator = company.iterator(); iterator.hasNext(); ){\n\t\t\tEmployee currentEmpl = iterator.next();\n\t\t\tif(currentEmpl.getSalary() > maximumWage) {\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\t\treturn company;\n\t}", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "public Book mostExpensive() {\n //create variable that stores the book thats most expensive\n Book mostExpensive = bookList.get(0);//most expensive book is set as the first in the array\n for (Book book : bookList) {\n if(book.getPrice() > mostExpensive.getPrice()){\n mostExpensive = book;\n }\n } return mostExpensive;//returns only one (theFIRST) most expensive in the array if tehre are several with the same price\n }", "public int calculateWage(CompEmpWage companyDetail){\n\tint workHrs=0 ,totalWage=0, zeroDayHr=0;\n\tdailyWageArrayList = new ArrayList<Integer>();\n\tcompNameArrayList.add(companyDetail.companyName);\n\tfor (int i=1;i<=companyDetail.day && workHrs<=companyDetail.workingHr;i++){\n\t\t\tswitch(getrandom()){\n\t\t\tcase 1:\n\t\t\ttotalWage = gettotalWage(companyDetail.wagePerHr, companyDetail.fullDayHr ,totalWage); \n\t\t\tworkHrs=getWorkingHrs(companyDetail.fullDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, companyDetail.halfDayHr ,totalWage);\n\t\t\tworkHrs=getWorkingHrs(companyDetail.halfDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, zeroDayHr ,totalWage);\n\t\t\t\tworkHrs=getWorkingHrs(zeroDayHr,workHrs);\n\t\t\t}\t\n\t}\n\ttotalWageArrayList.add(totalWage);\n\t\n\treturn totalWage;\n}", "private void processSalaryForEmployee(Epf epf, Esi esi, List<PayOut> payOuts,\r\n\t\t\tReportPayOut reportPayOut, PayrollControl payrollControl, List<LoanIssue> loanIssues, List<OneTimeDeduction> oneTimeDeductionList ) {\r\n\t\t\r\n\t\tPayRollProcessUtil util = new PayRollProcessUtil();\r\n\t\tBigDecimal netSalary = new BigDecimal(0);\r\n\t\tPayRollProcessHDDTO payRollProcessHDDTO = new PayRollProcessHDDTO();\r\n\t\t\r\n\t\tpayRollProcessHDDTO.setPayMonth(payrollControl.getProcessMonth());\r\n\t\tpayRollProcessHDDTO.setEpf(epf);\r\n\t\tpayRollProcessHDDTO.setEsi(esi);\t\r\n\t\tpayRollProcessHDDTO.setReportPayOut(reportPayOut);\r\n\t\tsetProfessionalTax(reportPayOut, payRollProcessHDDTO);\r\n\t\tList<PayRollProcessDTO> earningPayStructures = new ArrayList<PayRollProcessDTO>();\r\n\t\t\r\n\t\tDateUtils dateUtils = new DateUtils();\r\n\t\tDate currentDate = dateUtils.getCurrentDate();\r\n\t\t\r\n\t\t/*List<PayStructure> payStructures = attendanceRepository\r\n\t\t\t\t.fetchPayStructureByEmployee( reportPayOut.getId().getEmployeeId(), currentDate );*/\r\n\t\t\r\n\t\tlogger.info( \" reportPayOut.getId().getEmployeeId() \"+ reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tPayStructureHd payStructureHd = payStructureService.findPayStructure( reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tfor ( PayStructure payStructure : payStructureHd.getPayStructures() ) {\r\n\t\t\tif ( payStructure.getPayHead().getEarningDeduction() == null ) {\r\n\t\t\t\tPayHead payHead = payHeadService.findPayHeadById( payStructure.getPayHead().getPayHeadId() );\r\n\t\t\t\tpayStructure.setPayHead(payHead); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t processEarning( payOuts, reportPayOut, util, payRollProcessHDDTO, earningPayStructures, payStructureHd.getPayStructures() , payrollControl );\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t if (earningPayStructures != null && earningPayStructures.size() > 0) {\r\n\t\t\tpayRollProcessHDDTO.setTotalGrossSalary( reportPayOut.getGrossSalary() );\r\n\t\t\tpayOuts.addAll(calcualteDeduction( payRollProcessHDDTO, reportPayOut, payrollControl, payStructureHd ,loanIssues, oneTimeDeductionList ));\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t if ( reportPayOut.getGrossSalary() != null ) {\r\n\t\t\t netSalary = reportPayOut.getTotalEarning().subtract( reportPayOut.getTotalDeduction() );\r\n\t\t }\r\n\t\t\r\n\t\t reportPayOut.setNetPayableAmount( netSalary );\r\n\t}", "public Fitness worstScore() {\r\n Map.Entry<Fitness, List<Element>> worstEntry\r\n = elementsByFitness.firstEntry();\r\n if (worstEntry == null) {\r\n return null;\r\n }\r\n Fitness result = worstEntry.getKey();\r\n\r\n return result;\r\n }", "private double findMaxY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn Double.NaN;\n\t\t}\n\t\tdouble max = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (max<pointList.get(i).getY())\n\t\t\t\tmax = pointList.get(i).getY();\n\t\treturn max;\n\t}", "Employee getOldestEmployee() {\n\t}", "public static void setMaxPlayerSalary(double maxPlayerSalary) {\r\n BudgetRegulations.maxPlayerSalary = maxPlayerSalary;\r\n }", "public static void main(String[] args) {\n\t\tList<Employee> empList=new ArrayList<Employee>();\r\n\t\tempList.add(new Employee(1, \"Ranjit Kumar Patel\", \"patel.rk091@gmail.com\", 25000));\r\n\t\tempList.add(new Employee(2, \"Benjamin Sobel\", \"ben.min@gmail.com\", 30000));\r\n\t\tempList.add(new Employee(3, \"Joe George\", \"joe.grg@gmail.com\", 29000));\r\n\t\tempList.add(new Employee(4, \"Rajan Kumar Patel\", \"rajan.patel@gmail.com\",15000));\r\n\t\tempList.add(new Employee(5, \"Ashwin Kumar Naik\", \"ashwin.p@gmail.com\", 27000));\r\n\t\t\r\n\t\t/*for(Employee emp:empList) {\r\n\t\t\tif(emp.salary.equals(\"29000\")) {\r\n\t\t\t\tSystem.out.println(emp.salary);\r\n\t\t\t}\r\n\t\t}\r\n*/\t\r\n\r\n\t\tList<String> empSalary = (List<String>) empList.stream().filter(n -> n.name.startsWith(\"R\")).map(n -> n.name)\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tSystem.out.println(empSalary);\r\n\r\n\t\tList<Integer> empIds = empList.stream().filter(f -> f.id % 2 == 0).map(f -> f.id).collect(Collectors.toList());\r\n\t\tSystem.out.println(empIds);\r\n\t\t\r\n\t\tList<Integer> empSals=empList.stream().filter(n->n.salary<30000).map(n->n.salary).collect(Collectors.toList()); \r\n\t\tSystem.out.println(empSals);\r\n\t}", "public static void main(String args[] ) throws Exception {\n int[] stockPricesYesterday = new int[] {10, 7, 5, 8, 11, 9};\n //{10, 6, 18, 7, 5, 8, 11, 9}\n System.out.println(findMaxProfit(stockPricesYesterday));\n\n }", "int findMaxProfitRec(Job arr[], int n)\n {\n // Base case\n if (n == 1) return arr[n-1].profit;\n\n // Find profit when current job is inclueded\n int inclProf = arr[n-1].profit;\n int i = latestNonConflict(arr, n);\n if (i != -1)\n inclProf += findMaxProfitRec(arr, i+1);\n\n // Find profit when current job is excluded\n int exclProf = findMaxProfitRec(arr, n-1);\n\n return max(inclProf, exclProf);\n }", "public ArrayList<Integer> getWeeksIndexWithMaxSales(){\n\t\tArrayList<Integer> maxWeeks = new ArrayList<>();\n\t\tint max = this.weeklySoldItems.get(0);\n\t\t\n\t\tfor(int i = 0; i < this.weeklySoldItems.size(); i++)\n\t\t\tif(this.weeklySoldItems.get(i) > max)\n\t\t\t\tmaxWeeks.add(i);\n\t\t\n\t\treturn maxWeeks;\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Employeearraylist> hs = new ArrayList<>();\n\t\ths.add(new Emp(\"Poornima\",1214,\"Guntur\",30000));\n\t\ths.add(new Emp(\"vaishnavi\",1215,\"banglore\",35000));\n\t\ths.add(new Emp(\"geetha\",1216,\"kolkata\",12000));\n\t\ths.add(new Emp(\"bhavi\",1217,\"hyd\",45000));\n\t\ths.add(new Emp(\"ravi\",1218,\"pune\",56000));\n\t\n\t\tCollections.sort(e, (e1, e2) -> {\n\n\t\t\treturn (e1.name).compareTo(e2.name);\n\t\t});\n\t\tfor (Employeearraylist employee : e) {\n\t\t\tSystem.out.println(employee);\n\t\t}\n\t\tList<Integer> l = new ArrayList<Integer>();\n\t\tList<Integer> i = e.stream().filter(p -> p.salary > 70000).map(p -> p.salary).collect(Collectors.toList());\n\t\tSystem.out.println(\"salary greater than 70000\" + i);\n\t\tOptional<Integer> sal = e.stream().map(p -> p.salary).reduce((sum, salary) -> (sum + salary));\n\t\tSystem.out.println(\"sum of total employee salaries are\" + sal);\n\t\tlong se = e.stream().count();\n\t\tSystem.out.println(se);\n\n\t\t;\n\t}", "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(salariedEmployee.getFirstName()).append(\" \").append(salariedEmployee.getLastName());\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4));\r\n\t}", "public double getBiweeklySalary(){\r\n return this.employeeSalary / 26;\r\n }", "public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"shiyong@cs.sunysb.edu\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "public void calculateAverageFmax(){\n ArrayList<Double> fmaxList = new ArrayList<Double>();//Used to determine the SD\n double fmaxSum = 0;\n int profileCount = 0;\n if (averageProfileList == null){\n return;\n }\n for (AverageProfile avProfile: averageProfileList){\n for(Profile profile: avProfile.getReplicateProfileList()){\n if(profile.hasAnLreWindowBeenFound() && !profile.isExcluded()){\n fmaxSum += profile.getFmax();\n profileCount++;\n fmaxList.add(profile.getFmax());\n }\n }\n }\n if (profileCount >= 1 && fmaxSum > 0){\n averageFmax = fmaxSum/profileCount;\n if(fmaxList.size()>1){\n avFmaxCV = MathFunctions.calcStDev(fmaxList)/averageFmax;\n }else{\n avFmaxCV = 0;\n }\n } else {\n averageFmax = 0;\n }\n }", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n return findMaxProfitRec(arr, n);\n }", "private float standardDeviation()\n {\n // Calculate standard deviation based on math formula\n int numberEmployees = employees.size();\n float stdev = 0f, sumSquares = 0f, \n meanGrossPay = calculateMean();\n \n // Call method to return an array of float containing all gross pays\n float[] allGrossPay = calculateAllGrossPay();\n \n // Find sum of squares\n for (int i = 0; i < numberEmployees; i++)\n {\n sumSquares += Math.pow((allGrossPay[i] - meanGrossPay), 2); \n }\n // Calculate standard deviation\n if (numberEmployees > 1)\n {\n stdev = (float) Math.sqrt(sumSquares/(numberEmployees - 1));\n }\n return stdev;\n }", "public double earnings() {\r\n double earnings;\r\n double overtime;\r\n double overtimeRate = hourlyRate * 1.5;\r\n\r\n // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1\r\n if (hours < 0 || hourlyRate < 0 || salary < 0) {\r\n earnings = -1;\r\n }\r\n else if (hours > 40) {\r\n overtime = (hours - 40) * overtimeRate;\r\n earnings = overtime + salary;\r\n }\r\n else {\r\n earnings = salary;\r\n }\r\n\r\n return earnings;\r\n }", "public static long stockmax(List<Integer> prices) {\n\t\t// Write your code here\n\t\tlong profit=0L;\n\t\tlong maxSoFar=0L;\n\t\t for (int i = prices.size() - 1; i > -1 ; i--) {\n\t if (prices.get(i) >= maxSoFar) {\n\t maxSoFar = prices.get(i);\n\t }\n\t profit += maxSoFar - prices.get(i);\n\t }\n\t return profit;\n\t}", "public static void setMaxRefereeSalary(double maxRefereeSalary) {\r\n BudgetRegulations.maxRefereeSalary = maxRefereeSalary;\r\n }", "@EpiTest(testDataFile = \"buy_and_sell_stock.tsv\")\n public static double computeMaxProfit(List<Double> prices) {\n\t Double min_price = Double.MAX_VALUE;\n\t double max_profit = 0;\n\t \n\t for(Double price : prices) {\n\t\t if(price< min_price) {\n\t\t\t min_price = price;\n\t\t }else {\n\t\t\t max_profit = Math.max(max_profit, price - min_price);\n\t\t }\n\t }\n return max_profit;\n }", "Price getHighestPricedTrade(Collection<Trade> trades);", "@Test()\n public void testGetBiggestPerYear() {\n\tYear year = Year.of(2015);\n\tList<Expense> list = expenseManager.getBiggestPerYear(year);\n\tassertEquals(\"gas\", list.get(0).getName());\n }", "public static int maxProfit(final List<Integer> a) {\n if(a == null || a.size() == 0)\n return 0;\n int profit = 0;\n \n int minElement = Integer.MAX_VALUE;\n for(int i = 0; i < a.size(); i++){\n profit = Math.max(profit, a.get(i) - minElement);\n minElement = Math.min(minElement, a.get(i));\n }\n return profit;\n \n }", "private static double getHighestScore (List<Double> inputScores) {\n\n\t\tCollections.sort(inputScores, Collections.reverseOrder());\n\n\t\treturn inputScores.get(0);\n\n\t}", "public int _maxProfitAssignmentSortedCollectors(int[] difficulty, int[] profit, int[] worker) {\n int n = difficulty.length;\n int [][] dp = new int [n][2]; // difficulty, profit pair (dp)\n\n for (int idx = 0; idx < n; idx ++) {\n dp [idx][0] = difficulty [idx];\n dp [idx][1] = profit [idx];\n }\n\n Arrays.sort (dp, (a, b) -> a [0] - b [0]);\n\n // sort the collectors.\n Arrays.sort (worker);\n\n int ans = 0, best = 0, idx = 0;\n for (int w : worker) {\n // compute maxima and save it for next we well to build upon the max (best) seen so far.\n while (idx < n && w >= dp [idx][0]) { // increase difficulty slowly\n best = Math.max (best, dp [idx][1]);\n idx ++;\n }\n ans += best;\n }\n return ans;\n }", "private Restaurant findHighestRevenueRestaurant(){\r\n Restaurant tempRestaurant = new Restaurant(\"dummy\", OrderType.BOTH);\r\n for(Restaurant restaurant : restaurantMap.getRestaurantMap().values()){\r\n if(restaurant.getRevenue() > tempRestaurant.getRevenue()){\r\n tempRestaurant = restaurant;\r\n }\r\n }\r\n return tempRestaurant;\r\n }", "public static void maxStreak(int m, List<String> data) {\r\n\t\t//public static int maxStreak(int m, List<String> data) {\r\n \t\r\n\t\tint total_employees=m;\r\n\t\tint total_allPresent=0;\r\n\t\tString attendance=null;\r\n\t\t\r\n\t\tfor (int i=0;i<total_employees;i++)\r\n\t\t{\r\n\t\t\tif(attendance==null)\r\n\t\t\t{\r\n\t\t\t\tattendance=\"Y\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tattendance+=\"Y\";\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor (int index=0;index<data.size();index++)\r\n\t\t{\r\n\t\t\tif (attendance.equalsIgnoreCase(data.get(index)))\r\n\t\t\t{\r\n\t\t\t\ttotal_allPresent++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tSystem.out.println(\"Total Present Days :\" + Integer.toString(total_allPresent));\r\n }", "public float getHighestFitness() {\r\n\t\treturn highestScore;\r\n\t}", "public static double calculateEmployeeBonus(int employeeSalaryForBenefits, int numberOfYearsWithCompany, String employeePerformance) {\n double total = 0;\n\n try {\n Scanner stdin = new Scanner(System.in);\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n numberOfYearsWithCompany = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if (Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0])) {\n numberOfYearsWithCompany--;\n }\n\n System.out.println(\"Please enter this year's performance, as indicated by HR: \");\n employeePerformance = stdin.nextLine();\n stdin.close();\n\n if (numberOfYearsWithCompany >= 1) {\n if (employeePerformance.equals(\"Excellent\")) {\n total = (employeeSalaryForBenefits * 0.15);\n } else if (employeePerformance.equals(\"Good\")) {\n total = (employeeSalaryForBenefits * 0.10);\n } else if (employeePerformance.equals(\"Average\")) {\n total = (employeeSalaryForBenefits * 0.05);\n } else if (employeePerformance.equals(\"Bad\")) {\n total = 0;\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"This will be the yearly bonus for this Employee's performance: \" + total);\n return total;\n }", "@GetMapping(\"/employeewiseapprovals\")\n\t\tpublic List<Approval> getEmployeeWiseApprovals(@RequestParam(\"employeeId\") int employeeId)\n\t\t{\n\t\t\tList<Approval> approval= service.searchemployeewiseapproval(employeeId);\n\t\t\treturn approval;\n\t\t}", "public static int max(ArrayList<Course> list) {\r\n\t\tint max;\r\n\t\tmax = 0;\r\n\t\tfor (Course course : list) {\r\n\t\t\tif (course.numberOfStudents > max) {\r\n\t\t\t\tmax = course.numberOfStudents;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "void searchMax(ArrayList<SanPham> list);", "@Test()\n public void testGetBiggestPerMonthWithYearly() {\n\tYearMonth yearMonth = YearMonth.of(2015, 8);\n\tList<Expense> list = expenseManager.getBiggestPerMonth(yearMonth);\n\tassertEquals(\"vacation\", list.get(0).getName());\n }", "@Test()\n public void testGetBiggestPerMonth() {\n\tYearMonth yearMonth = YearMonth.of(2015, 6);\n\tList<Expense> list = expenseManager.getBiggestPerMonth(yearMonth);\n\tassertEquals(\"gas\", list.get(0).getName());\n }", "public Employee SearchEmployee(int idEmployee)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) return emp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Integer getWishMaxSalary() {\n return wishMaxSalary;\n }", "public static void main(String[] args) {\n\t\tSalariedEmployee salariedemployee = new SalariedEmployee(\"John\",\"Smith\",\"111-11-1111\",new Date(9,25,1993),800.0);\n\t\tHourlyEmployee hourlyemployee = new HourlyEmployee(\"Karen\",\"Price\",\"222-22-2222\",new Date(10,25,1993),900.0,40);\n\t\t\n\t\tCommissionEmployee commissionemployee = new CommissionEmployee(\"jahn\",\"L\",\"333-33-333\",new Date(11,25,1993),1000.0,.06);\n\t\t\n\t\tBasePlusCommissionEmployee basepluscommissionemployee = new BasePlusCommissionEmployee(\"bob\",\"L\",\"444-44-444\",new Date(12,25,1993),1800.0,.04,300);\n\t\t\n\t\tPieceWorker pieceworker = new PieceWorker(\"julee\",\"hong\", \"555-55-555\",new Date(12,25,1993) , 1200, 10);\n\t\tSystem.out.println(\"Employees processes individually\");\n\t\t//System.out.printf(\"%n%s%n%s: $%,.2f%n%n\", SalariedEmployee,\"earned\",SalariedEmployee.earnings());\n\n\t\t//creating employee array\n\t\t\n\t\tEmployee[] employees = new Employee[5];\n\t\t\n\t\t//intializing array with employees \n\t\temployees[0] = salariedemployee;\n\t\temployees[1] = hourlyemployee;\n\t employees[2] = commissionemployee;\n\t\temployees[3] = basepluscommissionemployee;\n\t\temployees[4]= pieceworker;\n\t\t\n\t\tSystem.out.println(\"employees processed polymorphically\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\tint currentMonth = Integer.parseInt(new SimpleDateFormat(\"MM\").format(cal.getTime()));\n\t\t\n\t\t//processing each element into the array\n\t\tfor(Employee currentemployee:employees){\n\t\t\t\n\t\t\t/*if(currentemployee.getBirthDate().getMonth()==currentMonth)\n\t\tSystem.out.println(\"current earnings\"+(currentemployee.earnings()+100));\n\t\t\telse\n\t\t\t\tSystem.out.println(\"current earnings\"+currentemployee.earnings());\n\t\t\t\t*/\n\t\t\tSystem.out.println(currentemployee.toString());\n\t\t}\n\t}", "public void saveStaffList(String fileName) {\n try {\n BufferedWriter out = new BufferedWriter(new FileWriter(fileName));\n out.write(maxStaff+\"\\r\\n\");\n \n out.write(numStaff+\"\\r\\n\");\n \n \n for (int i = 0; i < numStaff; i++) {\n if (staffList[i] instanceof Labourer) {\n out.write(staffList[i].toFile());\n } else if (staffList[i] instanceof Manager) {\n out.write(staffList[i].toFile());\n }\n }\n out.close();\n } catch (IOException iox) {\n System.out.println(\"Error saving to \" + fileName);\n }\n }", "private String whoIsWinnerTeam(List<HandBallScorePoints> handBallScorePointsList) {\n\n Map<String, Integer> teamGoalsMatchMap = new HashMap<>();\n for (HandBallScorePoints handBallScorePoints : handBallScorePointsList) {\n\n //Add to goals team map the goals of this player\n if (teamGoalsMatchMap.containsKey(handBallScorePoints.getTeam())) {\n teamGoalsMatchMap.put(handBallScorePoints.getTeam(),\n teamGoalsMatchMap.get(handBallScorePoints.getTeam()) + handBallScorePoints.getGoalsMade());\n } else {\n teamGoalsMatchMap.put(handBallScorePoints.getTeam(), handBallScorePoints.getGoalsMade());\n }\n }\n\n String winner = null;\n for (String team : teamGoalsMatchMap.keySet()) {\n log.debug(\"Team {}: {} goals\", team, teamGoalsMatchMap.get(team));\n winner = (winner == null)\n ? team : (teamGoalsMatchMap.get(team) > teamGoalsMatchMap.get(winner))\n ? team : winner;\n }\n\n log.info(\"Winner team: {}\", winner);\n return winner;\n }", "public Individual getWorst() {\n\t\treturn individuals[individuals.length-1];\n\t}", "public Staff2 ()\n {\n staffList = new StaffMember2[8];\n\n staffList[0] = new Executive2 (\"Sam\", \"123 Main Line\",\n \"555-0469\", \"123-45-6789\", 2423.07);\n\n staffList[1] = new Employee2 (\"Carla\", \"456 Off Line\",\n \"555-0101\", \"987-65-4321\", 1246.15);\n staffList[2] = new Employee2 (\"Woody\", \"789 Off Rocker\",\n \"555-0000\", \"010-20-3040\", 1169.23);\n\n staffList[3] = new Hourly2 (\"Diane\", \"678 Fifth Ave.\",\n \"555-0690\", \"958-47-3625\", 10.55);\n\n staffList[4] = new Volunteer2 (\"Norm\", \"987 Suds Blvd.\",\n \"555-8374\");\n staffList[5] = new Volunteer2 (\"Cliff\", \"321 Duds Lane\",\n \"555-7282\");\n\n staffList[6] = new Commission (\"Ron\", \"546 Mainland Dr.\",\n \t\"555-8141\", \"547-87-9845\", 11.75, .20);\n staffList[7] = new Commission (\"Sammy\", \"180 Barkley Lane\",\n \t\"555-6256\", \"695-14-3824\", 14.50, .15);\n\n ((Executive2)staffList[0]).awardBonus (500.00);\n\n ((Commission)staffList[6]).addHours(35);\n ((Commission)staffList[6]).addSales(400);\n\n ((Commission)staffList[7]).addHours(40);\n ((Commission)staffList[7]).addSales(950);\n\n ((Hourly2)staffList[3]).addHours (40);\n }", "public Staff searchStaff() { //takes in inputs from user find a Staff\n while (true) { //will keep looping util returns a value\n System.out.print(\"Search by entering Name or Employee Number: \");\n String findEmp = \"\"; \n try {\n findEmp = sc.nextLine();\n if (findStaff(Integer.parseInt(findEmp), 0, numStaff - 1) != null) { //if can parse search for emp num\n return findStaff(Integer.parseInt(findEmp), 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n } catch (NumberFormatException NFX) { //if cannot parse search for emp name\n if (findStaff(findEmp, 0, numStaff - 1) != null) {\n return findStaff(findEmp, 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner myScan = new Scanner(System.in);\r\n\t\tString strAns, empName;\r\n\t\tdouble sumSalaries=0;\r\n\t\tboolean found=false;\r\n\t\tDeptEmployee[ ] department = new DeptEmployee [6];\r\n\t\tGregorianCalendar hired;\r\n\t\t\r\n\t\t//Professors\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tProfessor prof1 = new Professor(\"Joseph\",200000,hired.getTime(),10);\r\n\t\thired = new GregorianCalendar(2019,5,1);\r\n\t\tProfessor prof2 = new Professor(\"Carlos\",150000,hired.getTime(),10);\r\n\t\thired = new GregorianCalendar(2019,6,1);\r\n\t\tProfessor prof3 = new Professor(\"Mauricio\",100000,hired.getTime(),10);\r\n\t\t\r\n\t\t//Secretaries\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tSecretary sec1 = new Secretary(\"Lina\",50000,hired.getTime(),200);\r\n\t\thired = new GregorianCalendar(1998,5,1);\r\n\t\tSecretary sec2 = new Secretary(\"Lucy\",55000,hired.getTime(),200);\r\n\t\t\r\n\t\t//Administrators\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tAdministrator admin1 = new Administrator(\"Monica\",180,hired.getTime(),160);\r\n\t\t\r\n\t\t//Populate array\r\n\t\tdepartment[0] = prof1;\r\n\t\tdepartment[1] = prof2;\r\n\t\tdepartment[2] = prof3;\r\n\t\tdepartment[3] = sec1;\r\n\t\tdepartment[4] = sec2;\r\n\t\tdepartment[5] = admin1;\r\n\t\t\r\n\t\tSystem.out.println(\"Do you want to see the sum of salaries in department? (Y/N)\");\r\n\t\tstrAns = myScan.next();\r\n\t\tif (strAns.equalsIgnoreCase(\"Y\")) {\r\n\t\t\tfor (DeptEmployee e : department) \r\n\t\t\t\tsumSalaries += e.computeSalary();\r\n\t\t\tSystem.out.println(\"Sum of department salaries is: \"+sumSalaries);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Do you want to locate an employee in department? (Y/N)\");\r\n\t\tstrAns = myScan.next();\r\n\t\tif (strAns.equalsIgnoreCase(\"Y\")) {\r\n\t\t\tSystem.out.println(\"Enter the employee name:\");\r\n\t\t\tstrAns = myScan.next();\r\n\t\t\t\r\n\t\t\tfor (DeptEmployee e : department) {\r\n\t\t\t\tempName=e.getName();\r\n\t\t\t\tif (strAns.equals(e.getName())) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tSystem.out.println(e);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tSystem.out.printf(\"The employee %s doesn't exists in department\",strAns);\r\n\t\t\t}\r\n\t }\r\n\t}", "private int findEmp(String name) {\n int i;\n for (i = 0; i <= counter; i++) {\n \tif(employees[i].name.equals(name))\n \t\treturn i;\n }\n return -1;\n\t}", "public void calculateWage(){\n\t\tfor(CompEmpWage detail: arrayList){\n\t\t\tdetail.setTotalWage(calculateWage(detail));\n detail.print();\n System.out.println(\" Daily Wage : \" + dailyWageArrayList);\n\t\t}\n}", "public ArrayList<Double> getHighestFitnesses() { return highFitnesses; }", "public static void main(String[] args) {\t\r\n\t\tList<Employee> empList = new ArrayList<>();\r\n\t\tempList.add(new Employee(\"Amit\", \"DSFSDF8989\", 67));\r\n\t\tempList.add(new Employee(\"Ranjit\", \"SDFSDF23423\", 63));\r\n\t\tempList.add(new Employee(\"Syamala\", \"SDFSDF23423\", 343));\r\n\t\r\n//\t\tusing ifPresent to avoid returning empty data.\r\n\t\tempList.stream()\r\n\t\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t\t.findFirst()\r\n\t\t\t\t.ifPresent(System.out::println);\r\n\t\t\r\n//\t\t\r\n\t\tOptional<Employee> optionalEmployee = empList.stream()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.filter(emp -> emp.getName().matches(\"dummy\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t.findFirst();\r\n\t\tSystem.out.println(\"optionalEmployee: \" + optionalEmployee.toString());\r\n\t\t\r\n\t\t\r\n//\t\tuse of Stream.findAny() method\r\n//\t\tunlike findFirst() the findAny() method select any element of the stream in parallel stream,\r\n//\t\tto increase the performance of the application,\r\n//\t\tThe cost of invoking multiple invocation on same source of data may not return same result!\r\n//\t\thence try to use the findFirst() instread.\r\n\t\tempList.stream()\r\n\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t.findAny()\r\n\t\t\t.ifPresent(System.out::println);\r\n\r\n\t\t\r\n\t\t\r\n\t}", "private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "public static boolean checkRefereeSalary(double playerSalary){\r\n return maxRefereeSalary >= playerSalary && playerSalary >= minRefereeSalary;\r\n }", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n // Create an array to store solutions of subproblems. table[i]\n // stores the profit for jobs till arr[i] (including arr[i])\n int *table = new int[n];\n table[0] = arr[0].profit;\n\n // Fill entries in M[] using recursive property\n for (int i=1; i<n; i++)\n {\n // Find profit including the current job\n int inclProf = arr[i].profit;\n int l = latestNonConflict(arr, i);\n if (l != -1)\n inclProf += table[l];\n\n // Store maximum of including and excluding\n table[i] = max(inclProf, table[i-1]);\n }\n\n // Store result and free dynamic memory allocated for table[]\n int result = table[n-1];\n delete[] table;\n\n return result;\n }", "public float calculate_salary() {\r\n\t\tfloat calculate = 1000 + this.calculate_benefits();\r\n\t\treturn calculate;\r\n\t}", "public double getEarnings() {\n//\t\tif (hoursWorked > 40) {\n//\t\t\treturn (40 * hoursWorked) + \n//\t\t\t\t\t((hoursWorked - 40) * wagePerHour * 1.5);\n//\t\t} else {\n//\t\t\treturn hoursWorked * wagePerHour;\n//\t\t}\n\t\t\t\t// condition \n\t\treturn hoursWorked > 40 ? \n\t\t\t\t// condition true \n\t\t\t(40 * wagePerHour) + ((hoursWorked - 40) * wagePerHour * 1.5) \n\t\t\t\t// condition false\n\t\t\t: hoursWorked * wagePerHour;\t\n\t}", "public void fibTest(){\r\n \r\n for(int j=0;j<eDB.staff.size();j++){\r\n String y = eDB.staff.get(j).getId().replaceAll(\"[^\\\\d.]\", \"\"); //removes letters from id\r\n int n = Integer.parseInt(y);\r\n\r\n {\r\n int a=0, b=1 ,c=0; \r\n \r\n while(c<n) \r\n {\r\n c = a + b; \r\n a = b;\r\n b = c;\r\n }\r\n \r\n \r\n \r\n if(c==n) \r\n fibSpies.add(eDB.staff.get(j));\r\n \r\n \r\n }\r\n \r\n}\r\n }", "public static void greatestIncomeAfterSavings(double [] house1, double [] house2, double [] house3) {\n\t\t //Greatest income after expenditure\n if (house1[1] > 0 && house1[1] >= house2[1]) \n maxAfterExp = house1[1];\n else \n maxAfterExp = house2[1];\n if (house3[1] > maxAfterExp) \n maxAfterExp = house3[1]; \n System.out.println(\"After savings: \" + maxAfterExp);\n\t}", "public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}", "float getMonthlySalary();", "public void updateEmployeeSalaryInDBThenInList(String name, double salary) throws CustomPayrollException {\n\t\tint result = normalisedDBServiceObj.updateEmployeeData(name, salary);\n\t\tif (result == 0) {\n\t\t\treturn;\n\t\t}\n\t\tContact contact = this.getEmployeePayrollData(name);\n\t\tif (contact != null)\n\t\t\tcontact.salary = salary;\n\t}", "public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "public void payday ()\n {\n double amount;\n\n for (int count=0; count < staffList.length; count++)\n {\n System.out.println (staffList[count]);\n\n amount = staffList[count].pay(); // polymorphic\n\n if(count == 0)\n {\n\t\t\t ChristmasBonus bonus;\n\t\t\t bonus = new Executive2(\"Sam\", \"123 Main Line\", \"555-0469\", \"123-45-6789\", 2423.07);\n\t\t\t bonus.BonusPay();\n\t\t }\n if(count == 1)\n {\n\t\t\t ChristmasBonus bonus;\n\t\t\t bonus = new Employee2(\"Carla\", \"456 Off Line\", \"555-0101\", \"987-65-4321\", 1246.15);\n\t\t\t bonus.BonusPay();\n\t\t }\n\t\t if(count == 2)\n\t\t {\n\t\t\t ChristmasBonus bonus;\n\t\t\t bonus = new Employee2(\"Woody\", \"789 Off Rocker\", \"555-0000\", \"010-20-3040\", 1169.23);\n\t\t\t bonus.BonusPay();\n\t\t }\n\t\t if(count == 3)\n\t\t {\n\t\t\t ChristmasBonus bonus;\n\t\t\t bonus = new Hourly2(\"Diane\", \"678 Fifth Ave.\", \"555-0690\", \"958-47-3625\", 10.55);\n\t\t\t bonus.BonusPay();\n\t\t }\n\t\t if(count == 4)\n\t\t {\n\t\t\tChristmasBonus bonus;\n\t\t\tbonus = new Volunteer2(\"Norm\", \"987 Suds Blvd.\", \"555-8374\");\n\t\t\tbonus.BonusPay();\n\t\t}\n\t\tif(count == 5)\n\t\t{\n\t\t\tChristmasBonus bonus;\n\t\t\tbonus = new Volunteer2(\"Cliff\", \"321 Duds Lane\", \"555-7282\");\n\t\t\tbonus.BonusPay();\n\t\t}\n\t\tif(count == 6)\n\t\t{\n\t\t\tChristmasBonus bonus;\n\t\t\tbonus = new Commission(\"Ron\", \"546 Mainland Dr.\", \"555-8141\", \"547-87-9845\", 11.75, .20);\n\t\t\tbonus.BonusPay();\n\t\t}\n\t\tif(count == 7)\n\t\t{\n\t\t\tChristmasBonus bonus;\n\t\t\tbonus = new Commission(\"Sammy\", \"180 Barkley Lane\", \"555-6256\", \"695-14-3824\", 14.50, .15);\n\t\t\tbonus.BonusPay();\n\t\t}\n\n if (amount == 0.0)\n System.out.println (\"Thanks!\");\n else\n System.out.println (\"Paid: \" + amount);\n\n System.out.println (\"-----------------------------------\");\n }\n }", "public int prIce_Per_GUeSt(int NO_OF_PEOPLE){\r\n if (NO_OF_PEOPLE>50){\r\n price_per_guest=lower_price_per_guest;\r\n System.out.println(\"PER_PERSON_PRICE = \"+lower_price_per_guest);\r\n int total_price = price_per_guest* NO_OF_PEOPLE;\r\n return total_price;\r\n }\r\n else\r\n {price_per_guest=Highest_price_per_guest;\r\n int total_price = price_per_guest* NO_OF_PEOPLE;\r\n System.out.println(\"PER_PERSON_PRICE = \"+Highest_price_per_guest);\r\n return total_price;}\r\n }", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public void setHighestPeriodNum(java.lang.Integer highestPeriodNum) {\n this.highestPeriodNum = highestPeriodNum;\n }", "public Fitness bestScore() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n Fitness result = bestEntry.getKey();\r\n\r\n return result;\r\n }", "WorkdayPaygroupEmployeeTimeOff findEmployeeTimeOff(long employeeId, long companyId, String code);", "@Test\r\n public void testGetLargestValueShouldReturnLargestValueFromNestedList() {\r\n nestedList=new NestedList();\r\n int largest=nestedList.getLargestValue();\r\n assertEquals(66,largest);\r\n }", "public void increaseSalary(double hIncrease,double hThreshold,double wIncrease,double wThreshold){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n System.out.print(\"\\nIncreased Salaries:\\n\");\n pw.print(\"\\nIncreased Salaries:\\n\");\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getRate()=='H'&&e.getSalary()<hThreshold){\n e.setSalary(e.getSalary()+hIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n else if(e.getRate()=='W'&&e.getSalary()<wThreshold){\n e.setSalary(e.getSalary()+wIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }", "public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays, Integer maxAge);", "private Employee findEmployee(String employeeName)\n {\n int index = -1;\n //nameJRadioButtonMenuItem.doClick();\n for(int i = 0; i < employees.size(); i++)\n {\n if(employeeName.equals(employees.get(i).getName()))\n index = i;\n }\n if(index >= 0)\n return employees.get(index);\n else\n return null;\n }", "private void loadAllEmployees() throws AccessException, SQLException {\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = constructSQL();\n\t\tint[] empID = new int[1];\n\t\tint dailyOffset=0;\n\t\tif (WorkedNMinutesAlertSource.DAILY_CHECK.equalsIgnoreCase(\"yesterday\")) {\n\t\t\tdailyOffset = -1;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tif (minAgeSet) {\n\t\t\t\tDatetime birthThreshold = DateHelper.addDays(DateHelper.getCurrentDate(), -(365*minAge));\n\t\t\t\tps.setDate(1, new java.sql.Date(birthThreshold.getTime()));\n\t\t\t}\n\t\t\trs = ps.executeQuery();\n\t\t\tboolean isWeekly = tPeriod.equalsIgnoreCase(\"weekly\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\t//for each employee, retrieve work details for the day before\n\t\t\t\t//and process accordingly.\n\t\t\t\tempID[0] = new Integer(rs.getString(1)).intValue();\n\t\t\t\tWorkDetailAccess wrkDetAccess = new WorkDetailAccess(conn);\n\t\t\t\tWorkDetailList wdl = null;\n\n\t\t\t\tif (!isWeekly) {\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), \"D\", null);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString firstDayOfWeek = Registry.getVarString(\"/system/WORKBRAIN_PARAMETERS/DAY_WEEK_STARTS\");\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper.getWeeksFirstDate(\n\t\t\t\t\t\t\tDateHelper.getCurrentDate(), firstDayOfWeek), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getWeeksFirstDate(DateHelper.getCurrentDate(), \n\t\t\t\t\t\t\t\t\tfirstDayOfWeek), 7), \"D\", null);\n\t\t\t\t}\n\t\t\t\tIterator wdlIter = wdl.iterator();\n\t\t\t\taccumulatedTime=0;\n\t\t\t\twhile (wdlIter.hasNext()) {\n\t\t\t\t\tprocessWorkDetail((WorkDetailData) wdlIter.next(), rs\n\t\t\t\t\t\t\t.getString(2));\n\t\t\t\t}\n\t\t\t\tif (accumulatedTime >= new Integer(nMinutes).intValue()) {\n\t\t\t\t\tfor (int i=0;i < tempRows.size(); i++) {\n\t\t\t\t\t\trows.add(tempRows.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttempRows = null;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException();\n\t\t} finally {\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\n\t\t\tif (ps != null)\n\t\t\t\tps.close();\n\t\t}\n\n\t}" ]
[ "0.60664916", "0.6042925", "0.5685341", "0.5608324", "0.5512059", "0.547247", "0.54657644", "0.54168916", "0.5416422", "0.53938144", "0.5374236", "0.53503716", "0.52936345", "0.5282082", "0.52775395", "0.5272674", "0.52693594", "0.5267227", "0.52255034", "0.5214006", "0.51772803", "0.51572627", "0.5136807", "0.5123546", "0.51193726", "0.51043886", "0.50831056", "0.5058185", "0.50493276", "0.50315404", "0.5005769", "0.49929035", "0.49925965", "0.4952454", "0.49454865", "0.49346897", "0.49289882", "0.4917339", "0.49064034", "0.4905719", "0.49052227", "0.4905211", "0.48709628", "0.4850122", "0.48499623", "0.48394507", "0.48388016", "0.4836364", "0.48310694", "0.48290634", "0.48283094", "0.48244894", "0.4808742", "0.48080274", "0.48049715", "0.4804143", "0.47998124", "0.4795901", "0.4784153", "0.4783953", "0.47835836", "0.47753015", "0.47707605", "0.4762252", "0.47553408", "0.4746148", "0.47299144", "0.47254097", "0.4722905", "0.4719241", "0.4719091", "0.47096533", "0.46938226", "0.46923402", "0.46914813", "0.46825564", "0.46765321", "0.46677363", "0.46478093", "0.46471676", "0.46429843", "0.46378523", "0.46354556", "0.46273673", "0.46271202", "0.4623295", "0.46174794", "0.46063796", "0.46063164", "0.45971394", "0.4597112", "0.4590466", "0.458593", "0.4585736", "0.45851165", "0.45839372", "0.45832333", "0.45830196", "0.4582306", "0.4569838" ]
0.7865438
0
/findLowestEarningEmployee: Finds the lowest wage employee by looping once through the staffList and comparing the wage of each Labourer.
public Staff findLowestEarningLabour() { Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@ for (int i = 0; i < staffList.length; i++) { if (staffList[i] instanceof Labourer) { if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){ lowest = staffList[i]; } } } return lowest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Staff findHighestEarningLabour() {\n Staff highest = new Labourer(null,0,null,0,0);\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() >= ((Labourer)highest).getWage()){\n highest = staffList[i];\n }\n }\n }\n return highest;\n }", "public double findAvgWage() {\n int numLabourer = 0;\n double total = 0;\n \n for (int i = 0; i < staffList.length; i++) {\n if (staffList[i] instanceof Labourer) {\n total += ((Labourer) staffList[i]).getWage();\n numLabourer ++;\n }\n }\n \n return total/numLabourer;\n }", "static double getMinScoreForScholarship(List<Student> studentsWithScholarship) {\n return studentsWithScholarship.stream()\n .mapToDouble(Student::getAverageScore)\n .min()\n .orElseThrow(() -> new RuntimeException(\"No students eligible for scholarship\"));\n }", "public double getLowestGrade(){\n double lowestGrade = 100;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()< lowestGrade)\n lowestGrade = students.get(i).getGrades();\n } // end for\n return lowestGrade;\n }", "private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}", "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 }", "public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\n }\n else\n {\n for(int i = 0; i < scores.length; i++)\n {\n lowest = scores[0];\n if(scores[i] == null)\n {\n break;\n }\n if(scores[i].getScore() < lowest.getScore())\n {\n lowest = scores[i];\n }\n \n }\n return lowest;\n } \n }", "public Region findLowestEarningRegion() {\n Region low = regionList[0];\n for (int i = 1; i < numRegions; i++) {\n if (low.calcEarnings() >= regionList[i].calcEarnings())\n low = regionList[i];\n }\n return low;\n }", "public Hotel bestHotel() {\r\n \tArrayList<Hotel> hotels = hotelDAO.getHotelList();\r\n \tHotel bestHotel=hotels.get(0);\r\n \tfor (int i=0; i<hotels.size();i++) {\r\n \t\tif(averageBewertungHotel(bestHotel)<averageBewertungHotel(hotels.get(i))) {\r\n \t\t\tbestHotel=hotels.get(i);\r\n \t\t}\r\n \t}\r\n \treturn bestHotel;\r\n }", "public static void minSevenEvenEl(List<Integer> list){\n int min = list.stream().filter(t->(t>7 && t%2==0)).reduce(Integer.MAX_VALUE, Math::min);\n System.out.println(min);\n }", "public double getWages() {\r\n int x = -1;\r\n for(int i = 0; i < 7; i++) {\r\n if (idInput == EMPLOYEEID[i]) {\r\n x = i;\r\n break;\r\n }\r\n }\r\n return wages[x];\r\n }", "protected double getEmpPrimaryJobRate(WBData wbData) throws Exception {\n\n \tList jobList = wbData.getEmployeeJobList();\n \tEmployeeJobData jobData = null;\n \tEmployeeJobData primaryJobData = null;\n \tIterator i = null;\n \tdouble primaryJobRate = 0;\n\n \t// Find the primary job.\n \tif (jobList != null) {\n \t\ti = jobList.iterator();\n \t\twhile (i.hasNext()) {\n \t\t\tjobData = (EmployeeJobData) i.next();\n \t\t\tif (jobData.getEmpjobRank() == 1){\n\n \t\t\t\t// If a primary job was already found, then throw an exeception.\n \t\t\t\tif (primaryJobData != null) {\n \t\t\t\t\tthrow new NestedRuntimeException(\"Multiple Primary Job Rates exist.\");\n \t\t\t\t} else {\n \t\t\t\t\tprimaryJobData = jobData;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n\n \t// Find the job rate for the primary job.\n \tif (primaryJobData != null) {\n \t\tprimaryJobRate = wbData.getJobRate(primaryJobData.getJobId(), primaryJobData.getEmpjobRateIndex(), wbData.getWrksWorkDate());\n \t}\n\n \treturn primaryJobRate;\n }", "public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }", "public int employeeSalaryForBenefits(String employeeName) {\n\n int actualSalaryOfEmployee = 0;\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n actualSalaryOfEmployee = Integer.valueOf(salaryField);\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n return actualSalaryOfEmployee;\n\n }", "public int calculateWage(CompEmpWage companyDetail){\n\tint workHrs=0 ,totalWage=0, zeroDayHr=0;\n\tdailyWageArrayList = new ArrayList<Integer>();\n\tcompNameArrayList.add(companyDetail.companyName);\n\tfor (int i=1;i<=companyDetail.day && workHrs<=companyDetail.workingHr;i++){\n\t\t\tswitch(getrandom()){\n\t\t\tcase 1:\n\t\t\ttotalWage = gettotalWage(companyDetail.wagePerHr, companyDetail.fullDayHr ,totalWage); \n\t\t\tworkHrs=getWorkingHrs(companyDetail.fullDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, companyDetail.halfDayHr ,totalWage);\n\t\t\tworkHrs=getWorkingHrs(companyDetail.halfDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, zeroDayHr ,totalWage);\n\t\t\t\tworkHrs=getWorkingHrs(zeroDayHr,workHrs);\n\t\t\t}\t\n\t}\n\ttotalWageArrayList.add(totalWage);\n\t\n\treturn totalWage;\n}", "public void increaseSalary(double hIncrease,double hThreshold,double wIncrease,double wThreshold){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n System.out.print(\"\\nIncreased Salaries:\\n\");\n pw.print(\"\\nIncreased Salaries:\\n\");\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getRate()=='H'&&e.getSalary()<hThreshold){\n e.setSalary(e.getSalary()+hIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n else if(e.getRate()=='W'&&e.getSalary()<wThreshold){\n e.setSalary(e.getSalary()+wIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }", "private void loadAllEmployees() throws AccessException, SQLException {\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = constructSQL();\n\t\tint[] empID = new int[1];\n\t\tint dailyOffset=0;\n\t\tif (WorkedNMinutesAlertSource.DAILY_CHECK.equalsIgnoreCase(\"yesterday\")) {\n\t\t\tdailyOffset = -1;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tif (minAgeSet) {\n\t\t\t\tDatetime birthThreshold = DateHelper.addDays(DateHelper.getCurrentDate(), -(365*minAge));\n\t\t\t\tps.setDate(1, new java.sql.Date(birthThreshold.getTime()));\n\t\t\t}\n\t\t\trs = ps.executeQuery();\n\t\t\tboolean isWeekly = tPeriod.equalsIgnoreCase(\"weekly\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\t//for each employee, retrieve work details for the day before\n\t\t\t\t//and process accordingly.\n\t\t\t\tempID[0] = new Integer(rs.getString(1)).intValue();\n\t\t\t\tWorkDetailAccess wrkDetAccess = new WorkDetailAccess(conn);\n\t\t\t\tWorkDetailList wdl = null;\n\n\t\t\t\tif (!isWeekly) {\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getCurrentDate(), dailyOffset), \"D\", null);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString firstDayOfWeek = Registry.getVarString(\"/system/WORKBRAIN_PARAMETERS/DAY_WEEK_STARTS\");\n\t\t\t\t\twdl = wrkDetAccess.loadByEmpIdsAndDateRange(empID, DateHelper.getWeeksFirstDate(\n\t\t\t\t\t\t\tDateHelper.getCurrentDate(), firstDayOfWeek), DateHelper\n\t\t\t\t\t\t\t.addDays(DateHelper.getWeeksFirstDate(DateHelper.getCurrentDate(), \n\t\t\t\t\t\t\t\t\tfirstDayOfWeek), 7), \"D\", null);\n\t\t\t\t}\n\t\t\t\tIterator wdlIter = wdl.iterator();\n\t\t\t\taccumulatedTime=0;\n\t\t\t\twhile (wdlIter.hasNext()) {\n\t\t\t\t\tprocessWorkDetail((WorkDetailData) wdlIter.next(), rs\n\t\t\t\t\t\t\t.getString(2));\n\t\t\t\t}\n\t\t\t\tif (accumulatedTime >= new Integer(nMinutes).intValue()) {\n\t\t\t\t\tfor (int i=0;i < tempRows.size(); i++) {\n\t\t\t\t\t\trows.add(tempRows.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttempRows = null;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException();\n\t\t} finally {\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\n\t\t\tif (ps != null)\n\t\t\t\tps.close();\n\t\t}\n\n\t}", "private Position getPositionWormMinHealth(ArrayList<Worm> worms) {\n Worm wormWithMinHealth = worms.get(0);\n int i;\n for (Worm worm : worms) {\n if (worm.health < wormWithMinHealth.health) {\n wormWithMinHealth = worm;\n }\n }\n return (wormWithMinHealth.position);\n }", "@Override\n\tpublic User getBestEmployee(int idBuisness) {\n\t\tQuery query = em\n\t\t\t\t.createQuery(\"select u from UserBuisness ub join ub.id.user u where ub.id.buisness=\" + idBuisness);\n\t\tList<User> users = (List<User>) query.getResultList();\n\t\tfor (User u : users) {\n\t\t\tu = userServiceLocal.getFull(u.getId());\n\t\t}\n\t\tboolean verif = false;\n\t\twhile (verif == false) {\n\t\t\tverif = true;\n\t\t\tfor (int i = 0; i < users.size() - 1; i++) {\n\t\t\t\tSystem.out.println(\"i.\" + i);\n\t\t\t\tint counter = 0;\n\t\t\t\tfor (UserSkill us1 : users.get(i).getUserSkills()) {\n\t\t\t\t\tSystem.out.println(\"userskill\" + us1.getLevel());\n\t\t\t\t\tboolean exist = false;\n\t\t\t\t\tfor (UserSkill us2 : users.get(i + 1).getUserSkills()) {\n\t\t\t\t\t\tif (us1.getSkill().getId() == us2.getSkill().getId()) {\n\t\t\t\t\t\t\tif (us1.getLevel() < us2.getLevel()) {\n\t\t\t\t\t\t\t\tcounter--;\n\t\t\t\t\t\t\t} else if (us1.getLevel() > us2.getLevel()) {\n\t\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!exist) {\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (counter < 0) {\n\t\t\t\t\tUser aux = users.get(i);\n\t\t\t\t\tusers.set(i, users.get(i + 1));\n\t\t\t\t\tusers.set(i + 1, aux);\n\t\t\t\t\tverif = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn users.get(0);\n\t}", "private float calculateMean()\n { \n int numberEmployees = employees.size();\n float total = 0, meanGrossPay = 0;\n // Create an array of all gross pays\n float[] allGrossPay = new float[numberEmployees];\n \n // Call method to return an array of float containing all gross pays\n allGrossPay = calculateAllGrossPay();\n // Find total gross pay\n for (int i = 0; i < numberEmployees; i++)\n {\n total += allGrossPay[i];\n }\n // Find mean and return it\n if (numberEmployees > 0)\n {\n meanGrossPay = total/numberEmployees;\n \n }\n return meanGrossPay;\n }", "public int getMinimumScore(){\n\n /*\n * creating variable of type int name it lowestScore go in to index 0 and sub 0\n * and lowestScore is refering to instance variable scores\n */\n int lowestScore = scores[0][0]; // assume this value is the smallest score value\n\n /* enhanced for loop with array of type int named gameScores and it will go trough scores array*/\n for (int[] gameScores : scores){\n\n /*\n * and another enhanced for loop inside first for loop\n * int variable, name score and it will iterate(go/repeat) through array gameScores\n *\n */\n for (int score : gameScores){\n if (score < lowestScore){\n lowestScore = score;\n }\n }\n }\n return lowestScore;\n }", "protected static Point2D.Float getLowestPoint(List<Point2D.Float> points) {\n\n\t\tPoint2D.Float lowest = points.get(0);\n\n\t\tfor (int i = 1; i < points.size(); i++) {\n\n\t\t\tPoint2D.Float temp = points.get(i);\n\n\t\t\tif (temp.y < lowest.y || (temp.y == lowest.y && temp.x < lowest.x)) {\n\t\t\t\tlowest = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn lowest;\n\t}", "private static PizzaModel getCheapest(ArrayList<PizzaModel> pizzaGroup){\n\t\tPizzaModel cheapestPizza = pizzaGroup.get(0);\n\t\tfor(PizzaModel p : pizzaGroup){\n\t\t\tif(p.getPrice()<= cheapestPizza.getPrice())\n\t\t\t\tcheapestPizza = p;\n\t\t}\n\t\treturn cheapestPizza;\n\t}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "public static int CalculateLowest(int[] LowestArray){\n LowestInArray l1 = new LowestInArray();\n l1.LowestNumber = LowestArray[0];\n if (LowestArray.length>1){\n System.out.println(\"Many Elements in Array\");\n for (int i=0; i<LowestArray.length;i++){\n if (LowestArray[i]< l1.LowestNumber){\n l1.LowestNumber = LowestArray[i];\n }\n }\n }\n return l1.LowestNumber;\n }", "public Employee getHighestRevenueEmployee() {\n\t\tEmployee employee = new Employee();\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\"SELECT R.CustRepId, P.FirstName, P.LastName, E.Email, Count(*) \" +\n\t\t\t\t\t\"FROM Person P, Rental R, Employee E \" +\n\t\t\t\t\t\"WHERE P.SSN = R.CustRepId AND E.SSN = P.SSN \"+\n\t\t\t\t\t\"group by P.FirstName, P.LastName \" +\n\t\t\t\t\t\"ORDER BY COUNT(*) DESC; \"\n\t\t\t\t\t);\n\t\t\trs.next();\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"CustRepId\")));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\n\t\treturn employee;\n\t\t\n\t}", "public static MyStudent studentWithHighest ( List<MyStudent> list) {\n\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-1).findFirst().get();\n\t}", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "protected static Marker getLowestPoint(List<Marker> points) {\n\n Marker lowest = points.get(0);\n\n for(int i = 1; i < points.size(); i++) {\n\n Marker temp = points.get(i);\n\n if(temp.getPosition().latitude < lowest.getPosition().latitude || (temp.getPosition().latitude == lowest.getPosition().latitude && temp.getPosition().longitude < lowest.getPosition().longitude)) {\n lowest = temp;\n }\n }\n\n return lowest;\n }", "public static void main(String[] args) {\n\t\tList<Employee> empList=new ArrayList<Employee>();\r\n\t\tempList.add(new Employee(1, \"Ranjit Kumar Patel\", \"patel.rk091@gmail.com\", 25000));\r\n\t\tempList.add(new Employee(2, \"Benjamin Sobel\", \"ben.min@gmail.com\", 30000));\r\n\t\tempList.add(new Employee(3, \"Joe George\", \"joe.grg@gmail.com\", 29000));\r\n\t\tempList.add(new Employee(4, \"Rajan Kumar Patel\", \"rajan.patel@gmail.com\",15000));\r\n\t\tempList.add(new Employee(5, \"Ashwin Kumar Naik\", \"ashwin.p@gmail.com\", 27000));\r\n\t\t\r\n\t\t/*for(Employee emp:empList) {\r\n\t\t\tif(emp.salary.equals(\"29000\")) {\r\n\t\t\t\tSystem.out.println(emp.salary);\r\n\t\t\t}\r\n\t\t}\r\n*/\t\r\n\r\n\t\tList<String> empSalary = (List<String>) empList.stream().filter(n -> n.name.startsWith(\"R\")).map(n -> n.name)\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tSystem.out.println(empSalary);\r\n\r\n\t\tList<Integer> empIds = empList.stream().filter(f -> f.id % 2 == 0).map(f -> f.id).collect(Collectors.toList());\r\n\t\tSystem.out.println(empIds);\r\n\t\t\r\n\t\tList<Integer> empSals=empList.stream().filter(n->n.salary<30000).map(n->n.salary).collect(Collectors.toList()); \r\n\t\tSystem.out.println(empSals);\r\n\t}", "public int employeeSalary(String employeeName) {\n\n int actualSalaryOfEmployee = 0;\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n actualSalaryOfEmployee = Integer.valueOf(salaryField);\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"The salary earned by this employee is: \");\n return actualSalaryOfEmployee;\n\n }", "@Test\n\tpublic void testMin() {\n\t\tList<Integer> tempList = new ArrayList<Integer>();\n\t\ttempList.add(50);\n\t\ttempList.add(20);\n\t\ttempList.add(60);\n\t\tInteger result = SWE619A.min(tempList);\n\t\tassertEquals(new Integer(20), result);\n\t\t\n\t}", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "public Staff findStaff(String staffName, int start, int end) { //because recursive\n int mid = (start + end) / 2;\n if (end - start > 1) {\n if (findStaff(staffName, start, mid) != null) {\n return findStaff(staffName, start, mid);\n } else {\n return findStaff(staffName, mid, end);\n }\n } else {\n if (staffList[start].getStaffName().equals(staffName)) {\n return staffList[start];\n } else if (staffList[end].getStaffName().equals(staffName)) {\n return staffList[end]; \n } else {\n return null; \n }\n }\n }", "public static rk getBestSolutionMin(ArrayList<rk> Sched) {\n\n rk best = Sched.get(0).copyOf();\n for (int i = 1; i < Sched.size(); i++) {\n rk S = Sched.get(i).copyOf();\n if (S.getFitness() < best.getFitness()) {\n\n best = S;\n }\n }\n return best;\n }", "public void calculateWage(){\n\t\tfor(CompEmpWage detail: arrayList){\n\t\t\tdetail.setTotalWage(calculateWage(detail));\n detail.print();\n System.out.println(\" Daily Wage : \" + dailyWageArrayList);\n\t\t}\n}", "public Staff searchStaff() { //takes in inputs from user find a Staff\n while (true) { //will keep looping util returns a value\n System.out.print(\"Search by entering Name or Employee Number: \");\n String findEmp = \"\"; \n try {\n findEmp = sc.nextLine();\n if (findStaff(Integer.parseInt(findEmp), 0, numStaff - 1) != null) { //if can parse search for emp num\n return findStaff(Integer.parseInt(findEmp), 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n } catch (NumberFormatException NFX) { //if cannot parse search for emp name\n if (findStaff(findEmp, 0, numStaff - 1) != null) {\n return findStaff(findEmp, 0, numStaff - 1);\n } else {\n System.out.println(\"Cannot be found\");\n }\n }\n }\n }", "private double findMinY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn 0;\n\t\t}\n\t\tdouble min = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (min>pointList.get(i).getY())\n\t\t\t\tmin = pointList.get(i).getY();\n\t\treturn min;\n\t}", "public Amount<Mineral> searchByName(String name){\n\t\tfor(int i=0; i<this.mineralList.size(); i++) {\n\t\t\tif(this.mineralList.get(i).getObject().getName() == name)\n\t\t\t\treturn this.mineralList.get(i);\n\t\t}\n\t\treturn null;\n\t}", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "public Employee SearchEmployee(int idEmployee)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) return emp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "double getMeanProfit() {\n ArrayList<Double> allProfits = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> profitsOfFirm = firm.getProfits();\n allProfits.addAll(profitsOfFirm.subList(profitsOfFirm.size() - SimulationManager.sizeOfExaminationInterval, profitsOfFirm.size()));\n }\n\n return Calculation.round(Calculation.getMean(allProfits), 2);\n }", "static BigDecimal FindMinPrice(String productname){\n\t\tLong prdname=Long.parseLong(productname);\n\t\tBigDecimal returnVal=new BigDecimal(0);\n\t\tif(productListOnNames.containsKey(prdname)){\n\t\t\tTreeMap<Long,BigDecimal> existingSet=productListOnNames.get(prdname);\n\n\t\t\treturnVal=Collections.min(existingSet.values());\n\n\t\t}\n\n\t\treturn returnVal;\n\n\t}", "public static Optional<Student> getStudentWithSmallestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(minBy(Comparator.comparing(Student::getGpa)));\n\t}", "private Employee findEmployee(String employeeName)\n {\n int index = -1;\n //nameJRadioButtonMenuItem.doClick();\n for(int i = 0; i < employees.size(); i++)\n {\n if(employeeName.equals(employees.get(i).getName()))\n index = i;\n }\n if(index >= 0)\n return employees.get(index);\n else\n return null;\n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "static public Set<Employee> removeWithWageAbove(Set<Employee> company, Float maximumWage){\n\t\tfor(Iterator<Employee> iterator = company.iterator(); iterator.hasNext(); ){\n\t\t\tEmployee currentEmpl = iterator.next();\n\t\t\tif(currentEmpl.getSalary() > maximumWage) {\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\t\treturn company;\n\t}", "static void compareEmployeeSalary(EmployeeQ7 e1, EmployeeQ7 e2) {\n\t\tif (e1.getSalary() > e2.getSalary()) {\n\t\t\te1.display();\n\t\t} else {\n\t\t\te2.display();\n\t\t}\n\n\t}", "public static double findTallest(List<Double> peeps) {\n\t\t double largeNum = 0;\n\t\tfor (int i = 0; i < peeps.size(); i++) {\n\t\t\tif (peeps.get(i)>=largeNum) {\n\t\t\t\tlargeNum =peeps.get(i);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn largeNum;\n\t}", "private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }", "private double getLowerFitness(Individual[] individuals){\n double lower = Double.MAX_VALUE;\n for (int i = 0; i < individuals.length; ++i ){\n \tlower = Math.min(lower, individuals[i].getFitness());\n }\n return lower;\n }", "private void sendCustomerNotificationsBirthday_MinCompare(Customer customer){\n LocalDate curDateTime = LocalDate.now();\n int nextYear = curDateTime.getYear();\n int maxDay = Integer.MAX_VALUE;\n if (curDateTime.getDayOfYear() > customer.birthDate.getDayOfYear()) {\n nextYear ++;\n }\n\n LocalDate nextBirthDate = LocalDate.of(nextYear, customer.birthDate.getMonthValue(), customer.birthDate.getDayOfMonth());\n Event nearestEvent = null;\n for (Event event : events){\n if (event.eventDate.isAfter(nextBirthDate) || event.eventDate.isEqual(nextBirthDate)) {\n int day = event.eventDate.getDayOfYear();\n if (day < maxDay) {\n nearestEvent = event;\n maxDay = day;\n }\n }\n }\n\n if (nearestEvent != null) {\n System.out.println(String.format(\"sendCustomerNotificationsBirthday_MinCompare : nearest event is %s, event date is %s\", nearestEvent.id, nearestEvent.eventDate));\n } else {\n System.out.println(\"no matched event\");\n }\n }", "public static double calculateEmployeeBonus(int employeeSalaryForBenefits, int numberOfYearsWithCompany, String employeePerformance) {\n double total = 0;\n\n try {\n Scanner stdin = new Scanner(System.in);\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n numberOfYearsWithCompany = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if (Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0])) {\n numberOfYearsWithCompany--;\n }\n\n System.out.println(\"Please enter this year's performance, as indicated by HR: \");\n employeePerformance = stdin.nextLine();\n stdin.close();\n\n if (numberOfYearsWithCompany >= 1) {\n if (employeePerformance.equals(\"Excellent\")) {\n total = (employeeSalaryForBenefits * 0.15);\n } else if (employeePerformance.equals(\"Good\")) {\n total = (employeeSalaryForBenefits * 0.10);\n } else if (employeePerformance.equals(\"Average\")) {\n total = (employeeSalaryForBenefits * 0.05);\n } else if (employeePerformance.equals(\"Bad\")) {\n total = 0;\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"This will be the yearly bonus for this Employee's performance: \" + total);\n return total;\n }", "public static void main(String[] args)\n {\n Employee[] employees = {\n new Employee(\"Jason\", \"Red\", 5000, \"IT\"),\n new Employee(\"Ashley\", \"Green\", 7600, \"IT\"),\n new Employee(\"Matthew\", \"Indigo\", 3587.5, \"Sales\"),\n new Employee(\"James\", \"Indigo\", 4700.77, \"Marketing\"),\n new Employee(\"Luke\", \"Indigo\", 6200, \"IT\"),\n new Employee(\"Jason\", \"Blue\", 3200, \"Sales\"),\n new Employee(\"Wendy\", \"Brown\", 4236.4, \"Marketing\")};\n\n // get List view of the Employees\n List<Employee> list = Arrays.asList(employees);\n\n // display all Employees\n System.out.println(\"Complete Employee list:\");\n list.stream().forEach(System.out::println); // A method reference.\n \n List<Employee> list2 = Arrays.asList(employees);\n Collections.sort(list2, new myEmployeeComparator());\n\n //display all Employees\n System.out.println(\"\\nComplete Employee list Ordered:\");\n list2.stream().forEach(System.out::println); // A method reference.\n \n //Predicate (boolean-valued function) that returns true for salaries \n //in the range $4000-$6000\n Predicate<Employee> fourToSixThousand = \n e -> (e.getSalary() >= 4000 && e.getSalary() <= 6000);\n\n //Display Employees with salaries in the range $4000-$6000\n // sorted into ascending order by salary\n System.out.printf(\n \"%nEmployees earning $4000-$6000 per month sorted by salary:%n\");\n\n list.stream()\n .filter(fourToSixThousand)\n .sorted(Comparator.comparing(Employee::getSalary))\n .forEach(System.out::println);\n\n //Display first Employee with salary in the range $4000-$6000\n System.out.printf(\"%nFirst employee who earns $4000-$6000:%n%s%n\",\n list.stream()\n .filter(fourToSixThousand)\n .findFirst()\n .get());\n\n // Functions for getting first and last names from an Employee\n Function<Employee, String> byFirstName = Employee::getFirstName;\n Function<Employee, String> byLastName = Employee::getLastName;\n\n //Comparator for comparing Employees by first name then last name\n Comparator<Employee> lastThenFirst = \n Comparator.comparing(byLastName).thenComparing(byFirstName);\n\n // sort employees by last name, then first name \n System.out.printf(\n \"%nEmployees in ascending order by last name then first:%n\");\n list.stream()\n .sorted(lastThenFirst)\n .forEach(System.out::println);\n\n //sort employees in descending order by last name, then first name\n System.out.printf(\n \"%nEmployees in descending order by last name then first:%n\");\n list.stream()\n .sorted(lastThenFirst.reversed())\n .forEach(System.out::println);\n\n //display unique employee last names sorted\n System.out.printf(\"%nUnique employee last names:%n\");\n list.stream()\n .map(Employee::getLastName)\n .distinct()\n .sorted()\n .forEach(System.out::println);\n\n //display only first and last names\n System.out.printf(\n \"%nEmployee names in order by last name then first nameX:%n\"); \n list.stream()\n .sorted(lastThenFirst)\n .map(Employee::getName)\n .forEach(System.out::println);\n\n //group Employees by department\n System.out.printf(\"%nEmployees by department:%n\"); \n Map<String, List<Employee>> groupedByDepartment =\n list.stream()\n .collect(Collectors.groupingBy(Employee::getDepartment));\n\n groupedByDepartment.forEach(\n (department, employeesInDepartment) -> \n {\n System.out.println(department);\n employeesInDepartment.forEach(\n employee -> System.out.printf(\" %s%n\", employee));\n }\n );\n System.out.printf(\"%nAverage salary by department:%n\"); \n \n groupedByDepartment.forEach(\n \t (department, employeesInDepartment) -> \n \t {\n \t System.out.println(department);\n \t System.out.printf(\" %.2f%n\",employeesInDepartment.stream().mapToDouble(Employee::getSalary).average().getAsDouble());\n \t \n \t }\n \t );\n \n System.out.printf(\"%nMax salary by department:%n\"); \n \n groupedByDepartment.forEach(\n \t (department, employeesInDepartment) -> \n \t {\n \t System.out.println(department);\n \t System.out.printf(\" %.2f%n\",employeesInDepartment.stream().mapToDouble(Employee::getSalary).max().getAsDouble());\n \t \n \t }\n \t );\n\n //count number of Employees in each department\n System.out.printf(\"%nCount of Employees by department:%n\"); \n\n Map<String, Long> employeeCountByDepartment =\n list.stream()\n .collect(Collectors.groupingBy(Employee::getDepartment, \n TreeMap::new, Collectors.counting()));\n\n employeeCountByDepartment.forEach(\n (department, count) -> System.out.printf(\n \"%s has %d employee(s)%n\", department, count));\n\n/* Output looks something like :\n\n HR 4\n IT 8\n Sales 12\n*/\n\n\n // sum of Employee salaries with DoubleStream sum method\n System.out.printf(\n \"%nSum of Employees' salaries (via sum method): %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .sum());\n\n //calculate sum of Employee salaries with Stream reduce method\n System.out.printf(\n \"Sum of Employees' salaries (via reduce method): %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .reduce(0, (value1, value2) -> value1 + value2)); \n\n //average of Employee salaries with DoubleStream average method\n System.out.printf(\"Average of Employees' salaries: %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .average()\n .getAsDouble()); \n \n System.out.printf(\"Number of Lastnames beginning with B %d\",\n \t list.stream()\n \t .map(Employee::getLastName)\n \t .filter(e->e.charAt(0)=='b' || e.charAt(0)=='B')\n \t .count()); \n \n \n System.out.printf(\"\\nList of Employees with lastname beginning with B %s\",\n \t list.stream()\n \t .map(Employee::getLastName)\n \t .filter(e->(e.charAt(0)=='b' || e.charAt(0)=='B'))\n \t .collect(Collectors.toList()\n \t \t\t )); \n \n List<Employee> lastbyB =\n \t list.stream()\n \t .filter(s -> s.getLastName().startsWith(\"B\")||s.getLastName().startsWith(\"b\"))\n \t .collect(Collectors.toList()) ;\n \n System.out.printf(\n \t \"\\nFirst and Lastname upper case \\n\\n\");\n \n \n list.stream()\n\t .filter(s -> s.getLastName().startsWith(\"B\"))\n .map(emp ->{ \n \t return \n \t\t\t new Employee(emp.getFirstName().toUpperCase(), \n \t\t emp.getLastName().toUpperCase(),emp.getSalary(),\n \t\t emp.getDepartment());\n \t })\n .forEach(System.out::println);\n \n System.out.printf(\n \t \"\\nLastname upper case \\n\\n\");\n \n \n\nlist.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t})\n.forEach(System.out::println);\n\nStream<Employee> mstr=list.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t//return new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\t});\nStream<Employee> mstr1=list.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t//return new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\t});\n\n\n\n\n\nSystem.out.println(\n \"\\nJoining in Employees \\n\\n\"+\nmstr\n.map( Employee::toString)\n.collect(Collectors.joining()));\n\nSystem.out.println(\n \"\\nJoining in Employees with separator\\n\\n\"+\nmstr1\n.map( Employee::toString)\n.collect(Collectors.joining(\"---\\n---\")));\n\n\n\n\nSystem.out.printf(\n \"\\nEmploying with Last Name starting with I, sorted and without duplicate upper case \\n\\n\");\n\nlist.stream()\n.filter(s -> s.getLastName().startsWith(\"I\")||s.getLastName().startsWith(\"i\"))\n.map(e->e.getLastName())\n.sorted()\n.distinct()\n.forEach(System.out::println);\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.map(e->e.getSalary()/list.size())\n.reduce(0.0, (x,y)->x+y)\n.doubleValue());\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.mapToDouble(Employee::getSalary)\n.average().getAsDouble());\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.collect(Collectors.averagingDouble(Employee::getSalary)));\n\nSystem.out.printf(\n \"\\nTotal of Salary %.1f\\n\",\nlist.stream()\n.map(e->e.getSalary())\n.reduce(0.0, (x,y)->x+y)\n.doubleValue());\n\nSystem.out.printf(\n \"\\nFirstname of All Employees\\n\\n\");\n\nlist.stream()\n.map(e->e.getFirstName())\n.forEach(System.out::println);\n\nSystem.out.printf(\n \"\\nInfinite even numbers print the 20 first\\n\\n\");\nIntStream \n\n.iterate(0, i -> i + 2)\n.limit(20)\n.forEach(System.out::println); \n\n \t \n \n }", "private static int findMin(ListNode[] lists) {\n\t\tint length = lists.length;\n\t\tint min = -1;\n\t\tif (length > 0) {\n\t\t\tmin = 0;\n\t\t\tfor (int i = 1; i < length; i++) {\n\t\t\t\tif (lists[i] != null && (lists[min] == null || lists[min].val > lists[i].val))\n\t\t\t\t\tmin = i;\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"shiyong@cs.sunysb.edu\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "public static void minEl1(List<Integer> list){\n int min = list.stream().reduce(Integer.MAX_VALUE, (x,y)->x<y ? x : y);\n System.out.println(min);\n }", "public Staff findStaff(int staffNum, int start, int end) { //because recursive\n int mid = (start + end) / 2;\n if (end - start > 1) {\n if (findStaff(staffNum, start, mid) != null) {\n return findStaff(staffNum, start, mid);\n } else {\n return findStaff(staffNum, mid, end);\n }\n } else {\n if (staffList[start].getStaffNum() == staffNum) {\n return staffList[start];\n } else if (staffList[end].getStaffNum() == staffNum) {\n return staffList[end]; \n } else {\n return null; \n }\n }\n }", "public int giveRaise() throws EmployeeSalaryException {\n try {\n if (this.yearsWorked % 3 == 0) {\n this.salary = (this.salary + 3000);\n this.yearsWorked++;\n if (this.salary > maxEmployeeSalary) {\n this.salary = maxEmployeeSalary;\n throw new EmployeeSalaryException();\n }\n } else {\n this.yearsWorked++;\n }\n } catch (EmployeeSalaryException ex) {\n ex.printStackTrace();\n System.out.println(\"Sorry maximum salary can only be: \" + maxEmployeeSalary);\n }\n return this.salary;\n }", "public static void main(String[] args) {\t\r\n\t\tList<Employee> empList = new ArrayList<>();\r\n\t\tempList.add(new Employee(\"Amit\", \"DSFSDF8989\", 67));\r\n\t\tempList.add(new Employee(\"Ranjit\", \"SDFSDF23423\", 63));\r\n\t\tempList.add(new Employee(\"Syamala\", \"SDFSDF23423\", 343));\r\n\t\r\n//\t\tusing ifPresent to avoid returning empty data.\r\n\t\tempList.stream()\r\n\t\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t\t.findFirst()\r\n\t\t\t\t.ifPresent(System.out::println);\r\n\t\t\r\n//\t\t\r\n\t\tOptional<Employee> optionalEmployee = empList.stream()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.filter(emp -> emp.getName().matches(\"dummy\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t.findFirst();\r\n\t\tSystem.out.println(\"optionalEmployee: \" + optionalEmployee.toString());\r\n\t\t\r\n\t\t\r\n//\t\tuse of Stream.findAny() method\r\n//\t\tunlike findFirst() the findAny() method select any element of the stream in parallel stream,\r\n//\t\tto increase the performance of the application,\r\n//\t\tThe cost of invoking multiple invocation on same source of data may not return same result!\r\n//\t\thence try to use the findFirst() instread.\r\n\t\tempList.stream()\r\n\t\t\t.filter(emp -> emp.getName().matches(\"Syamala\"))\r\n\t\t\t.findAny()\r\n\t\t\t.ifPresent(System.out::println);\r\n\r\n\t\t\r\n\t\t\r\n\t}", "public int getMinWeekNumber(ObservableList<Task> taskList) {\n int weekNumber = 10000;\n for (Task task: taskList) {\n if (task.getWeekNumber().getWeekValueInt() < weekNumber) {\n weekNumber = task.getWeekNumber().getWeekValueInt();\n }\n }\n assert weekNumber != 10000;\n return weekNumber;\n }", "public Optional<DataModel> min(){\n return stream.min(Comparator.comparing(DataModel::getAge));\n }", "public int findLowestExam(int examNum)\n\t{\n\t\tint lowestIndex = 0;\n\t\tif (examNum != 1 && examNum != 2 && examNum != 3 && examNum != 4)\n\t\t\tlowestIndex = -1;\n\t\telse {\n\t\t\tfor (int i = 1; i < numStudents; i++) {\n\t\t\t\tdouble first = students[i].getExams()[examNum - 1];\n\t\t\t\tdouble second = students[lowestIndex].getExams()[examNum - 1];\n\t\t\t\tif (first < second)\n\t\t\t\t\tlowestIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn lowestIndex;\n\t}", "@Override\n public Note getLowest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentLow = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low\n .getIsHead(), this.low.getInstrument(), this.low.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentLow.compareTo(n) == 1) {\n currentLow = n;\n }\n }\n }\n return currentLow;\n }", "public static void main(String[] args) {\n\t\tArrayList<Employeearraylist> hs = new ArrayList<>();\n\t\ths.add(new Emp(\"Poornima\",1214,\"Guntur\",30000));\n\t\ths.add(new Emp(\"vaishnavi\",1215,\"banglore\",35000));\n\t\ths.add(new Emp(\"geetha\",1216,\"kolkata\",12000));\n\t\ths.add(new Emp(\"bhavi\",1217,\"hyd\",45000));\n\t\ths.add(new Emp(\"ravi\",1218,\"pune\",56000));\n\t\n\t\tCollections.sort(e, (e1, e2) -> {\n\n\t\t\treturn (e1.name).compareTo(e2.name);\n\t\t});\n\t\tfor (Employeearraylist employee : e) {\n\t\t\tSystem.out.println(employee);\n\t\t}\n\t\tList<Integer> l = new ArrayList<Integer>();\n\t\tList<Integer> i = e.stream().filter(p -> p.salary > 70000).map(p -> p.salary).collect(Collectors.toList());\n\t\tSystem.out.println(\"salary greater than 70000\" + i);\n\t\tOptional<Integer> sal = e.stream().map(p -> p.salary).reduce((sum, salary) -> (sum + salary));\n\t\tSystem.out.println(\"sum of total employee salaries are\" + sal);\n\t\tlong se = e.stream().count();\n\t\tSystem.out.println(se);\n\n\t\t;\n\t}", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public ArrayList<Double> averageSalaries(){\n\t\tArrayList<Double> averageSalaries = new ArrayList<Double>();\n for(int i=0;i<allSalaries.size();i++) {\n \ttry {\n \t\tdouble averageEmployee=average(allSalaries.get(i));\n \t\taverageSalaries.add(averageEmployee);\n \t}catch(IllegalArgumentException e) {\n \t\tSystem.out.println(\"There is something wrong with input\");\n \t} \t\n\t\t}\n return averageSalaries;\n\t}", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public double getBiweeklySalary(){\r\n return this.employeeSalary / 26;\r\n }", "public List<Enemy> lowestLine() {\r\n List<Enemy> low = new ArrayList<>();\r\n for (Double x : this.xOfEachCol()) {\r\n List<Enemy> colList = new ArrayList<>();\r\n for (Enemy e : enemies) {\r\n if (e.getCollisionRectangle().getUpperLeft().getX() == x) {\r\n colList.add(e);\r\n }\r\n }\r\n low.add(this.lowestEnemyInCol(colList));\r\n }\r\n return low;\r\n }", "private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }", "public static void main(String[] args){\n List<ArrayListEmployee5> ale = new ArrayList<>();\n// Creating employees\n ArrayListEmployee5 emp1 = new ArrayListEmployee5(1,\"Aaaa\",\"12 lane 3\",234567);\n ArrayListEmployee5 emp2 = new ArrayListEmployee5(2,\"Bbbbb\",\"12 lane 4\",1232343.354F);\n ArrayListEmployee5 emp3 = new ArrayListEmployee5(3,\"Cccc\",\"12 lane 9\",455677);\n// Adding employee to arraylist\n ale.add(emp1);\n ale.add(emp2);\n ale.add(emp3);\n// Input to search for a particular employee id\n System.out.println(\"Enter employee id to search in arraylist\");\n Scanner input = new Scanner(System.in);\n int empid = input.nextInt();\n// iterator to search arraylist\n Iterator<ArrayListEmployee5> iterator = ale.iterator();\n// condition to search for a employee with id\n while(iterator.hasNext()) {\n ArrayListEmployee5 employee = iterator.next();\n if(employee.id == empid) {\n System.out.println(employee);\n }\n\n }\n\n\n }", "private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }", "public LoyaltyMember getFirstLoyaltyMember() {\n if (loyaltyMembers == null || loyaltyMembers.size() == 0) {\n return null;\n }\n while (loyaltyMembers.iterator().hasNext()) {\n LoyaltyMember member = loyaltyMembers.iterator().next();\n if (member.getDateDeleted() == null) {\n return member;\n }\n }\n return null;\n }", "public int min(ArrayList<Integer> list) {\r\n int minValue = Integer.MAX_VALUE;\r\n\r\n for (int i : list) {\r\n if (i < minValue) {\r\n minValue = i;\r\n\r\n }\r\n\r\n }\r\n return minValue;\r\n }", "public static ArrayList<Employee> updateSalary(List<Employee> emp , int salaryRangeFrom, int salaryRangeTo, double changeMultiplier){\n final int lessThan = 3000;\n double salaryIncrease;\n\n ArrayList<Employee> filtered = new ArrayList<Employee>();\n for(Employee e : emp){\n\n if( (e.getSalary()>salaryRangeFrom && e.getSalary()<salaryRangeTo) && e.getTaxableSalary()<lessThan){\n\n salaryIncrease = e.getSalary() * changeMultiplier - e.getSalary();\n\n e.setSalary((int)checkTheMultiplier(salaryIncrease, Double.valueOf(e.getTax()), e.getSalary(), changeMultiplier));\n filtered.add(e);\n }\n }\n\n return filtered;\n }", "private int findEmp(String name) {\n int i;\n for (i = 0; i <= counter; i++) {\n \tif(employees[i].name.equals(name))\n \t\treturn i;\n }\n return -1;\n\t}", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(salariedEmployee.getFirstName()).append(\" \").append(salariedEmployee.getLastName());\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4));\r\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "private Point findMeanByArrayList(ArrayList<GenUsers> ulist) {\n\t\t\n int count = ulist.size();\n double ht_sum=0,wt_sum=0;\n\t\t\n\t\t//code: find the mean male point and mean female point\n\t\tfor(int i=0;i<count;i++) {\n\t\t\tht_sum= ht_sum + ulist.get(i).getHt();\n\t\t\twt_sum= wt_sum + ulist.get(i).getWt();\n\t\t\t\n\t\t}\n\t\t\n\t\tdouble ht_mean = ht_sum/count;\n\t\tdouble wt_mean = wt_sum/count;\n\t\treturn new Point(ht_mean,wt_mean);\n\t}", "Employee getOldestEmployee() {\n\t}", "public float calculate_salary() {\r\n\t\tfloat calculate = 1000 + this.calculate_benefits();\r\n\t\treturn calculate;\r\n\t}", "public Double getLowestMainScore() {\n return lowestMainScore;\n }", "@GetMapping(\"/employeewiseapprovals\")\n\t\tpublic List<Approval> getEmployeeWiseApprovals(@RequestParam(\"employeeId\") int employeeId)\n\t\t{\n\t\t\tList<Approval> approval= service.searchemployeewiseapproval(employeeId);\n\t\t\treturn approval;\n\t\t}", "public Integer getWishMinSalary() {\n return wishMinSalary;\n }", "public static void main(String[] args) {\n\t\tArrayList<Employee> list= new ArrayList<Employee>();\n\t\t\n\t\tlist.add(new Employee(3,6000,\"vinod\"));\n\t\tlist.add(new Employee(6,7500,\"Rangu\"));\n\t\tlist.add(new Employee(1,9000,\"kittu\"));\n\t\tlist.add(new Employee(5,5000,\"bunny\"));\n\t\t\n\t\tCollections.sort(list, new NameComparator());\n\t\t\n\t\tIterator it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()){\n\t\t\tEmployee emp = (Employee)it.next();\n\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t\t\n\t\t\t/*Collections.sort(list, new SalaryComparator());\n\t\t\t\n\t\t\tIterator it = list.iterator();\n\t\t\t\n\t\t\twhile(it.hasNext()){\n\t\t\t\tEmployee emp = (Employee)it.next();\n\t\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t}*/\n\t}\n\t}", "private double calculateLowAffiliation(int helicopterY) {\n double low;\n if (helicopterY + HELICOPTER_HEIGHT > 3*(double)SCREEN_HEIGHT/4) {\n low = 1.0;\n }\n else if (helicopterY + HELICOPTER_HEIGHT < (double)SCREEN_HEIGHT/4) {\n low = 0.0;\n }\n else {\n low = 2.0*(double)(helicopterY + HELICOPTER_HEIGHT)/((double)SCREEN_HEIGHT) - 0.5;\n }\n return low;\n }", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "double getMeanPrice() {\n List<Double> allPrices = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> pricesOfFirm = firm.getPrices();\n allPrices.addAll(pricesOfFirm.subList(pricesOfFirm.size() - SimulationManager.sizeOfExaminationInterval, pricesOfFirm.size()));\n }\n\n return Calculation.round(Calculation.getMean(allPrices), 2);\n }", "static int BinarySerach_lowerEqualValue(ArrayList<Integer> list , int value){\r\n\t\t\t\r\n\t\t\tint mid,l,r;\r\n\t\t\t\r\n\t\t\tl = 0;\r\n\t\t\tr = list.size()-1;\r\n\t\t\t\r\n\t\t\tif(value>=list.get(r))\r\n\t\t\t\treturn r;\r\n\t\t\tif(value<=list.get(l))\r\n\t\t\t\treturn l;\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\twhile(l<r){\r\n\t\t\t\t\r\n\t\t\t\tmid = (l+r)/2;\r\n\t\t\t\t\r\n\t\t\t\tif(list.get(mid)==value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t\tif(mid+1<list.size() && list.get(mid)<=value && list.get(mid+1)>value)\r\n\t\t\t\t\treturn mid;\r\n\t\t\t\tif(mid-1>0 && list.get(mid-1)<=value && list.get(mid)>value)\r\n\t\t\t\t\treturn mid-1;\r\n\t\t\t\tif(list.get(mid)<value)\r\n\t\t\t\t\tl = mid+1;\r\n\t\t\t\telse\r\n\t\t\t\t\tr = mid-1;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}", "private static void calculateEmployeeWeeklyPay(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException {\r\n\t\tSystem.out.println(\"Enter Employee First Name: \");\r\n\t\tString firstName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Last Name: \");\r\n\t\tString lastName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Type (Salaried or Hourly or Commissioned): \");\r\n\t\tString employeeType = reader.readLine();\r\n\r\n\t\tif (employeeType.equalsIgnoreCase(\"Salaried\")) {\r\n\t\t\tSystem.out.println(\"Please enter your monthly salary: \");\r\n\t\t\tdouble monthlySalary = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal SalariedEmployee salariedEmployee = new SalariedEmployee(firstName, lastName, employeeType, monthlySalary, false);\r\n\t\t\temployeeDetails.add(salariedEmployee);\r\n\r\n\t\t\tsalariedEmployeeEarningReport(salariedEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Hourly\")) {\r\n\r\n\t\t\tSystem.out.println(\"Please enter your hourly rate: \");\r\n\t\t\tdouble hourlyRate = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tSystem.out.println(\"Please enter your weekly worked hours: \");\r\n\t\t\tdouble weeklyWorkedHours = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal HourlyEmployee hourlyEmployee = new HourlyEmployee(firstName, lastName, employeeType, weeklyWorkedHours, hourlyRate, false);\r\n\t\t\temployeeDetails.add(hourlyEmployee);\r\n\r\n\t\t\thourlyEmployeeEarningReport(hourlyEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Commissioned\")) {\r\n\t\t\tSystem.out.println(\"Please enter your weekly sales amount: \");\r\n\t\t\tdouble weeklySalesAmount = Double.parseDouble(reader.readLine());\r\n\t\t\tfinal CommissionedEmployee commissionedEmployee = new CommissionedEmployee(firstName, lastName, employeeType, weeklySalesAmount, false);\r\n\t\t\temployeeDetails.add(commissionedEmployee);\r\n\r\n\t\t\tcommissionedEmployeeEarningReport(commissionedEmployee);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Invalid employee type\");\r\n\t\t}\r\n\t}", "private float standardDeviation()\n {\n // Calculate standard deviation based on math formula\n int numberEmployees = employees.size();\n float stdev = 0f, sumSquares = 0f, \n meanGrossPay = calculateMean();\n \n // Call method to return an array of float containing all gross pays\n float[] allGrossPay = calculateAllGrossPay();\n \n // Find sum of squares\n for (int i = 0; i < numberEmployees; i++)\n {\n sumSquares += Math.pow((allGrossPay[i] - meanGrossPay), 2); \n }\n // Calculate standard deviation\n if (numberEmployees > 1)\n {\n stdev = (float) Math.sqrt(sumSquares/(numberEmployees - 1));\n }\n return stdev;\n }", "public int minimum_rating() {\n\t\tint minimumRating = 0;\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tif (minimumRating>identifiedArray[i].rating) {\n\t\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn minimumRating;\n\t}", "public String getMinimumSemester(TransferNORInPSTBean minimumSemesterData) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString minSemester=\"\";\r\n\t\ttry{\r\n\t\tList<TransferNORInPSTBean> minimumSemesterList=(List<TransferNORInPSTBean>)sqlMapClient.queryForList(\"TransferNORInPSTBean.getMinimumSemester\", minimumSemesterData);\r\n\t\t\tfor(TransferNORInPSTBean minimumSemesterValue: minimumSemesterList){\r\n\t\t\t\tminSemester=minimumSemesterValue.getNextSemesterCode();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\t//System.out.println(\"Exception in minimum semester: \"+e.getMessage());\r\n\t\t\tlogger.info(\"Exception in minimum semester detail\"+e.getMessage());\r\n\t\t}\r\n\t\treturn minSemester;\r\n\t}", "public float getSalinityMin() {\n return salinityMin;\n }", "public double minWait()\r\n {\r\n //find the minimum value in an arraylist\r\n double minWait = this.servedCustomers.get(0).getwaitTime();\r\n for(int i = 1; i < this.servedCustomers.size(); i++){\r\n if(this.servedCustomers.get(i).getwaitTime()<minWait){\r\n minWait = this.servedCustomers.get(i).getwaitTime();\r\n }\r\n }\r\n return minWait;\r\n }" ]
[ "0.6171087", "0.60833395", "0.6045658", "0.5914137", "0.5548338", "0.55050117", "0.5403144", "0.53928596", "0.53501576", "0.5287272", "0.52828896", "0.52643967", "0.52302116", "0.52076644", "0.51905704", "0.51489234", "0.5077162", "0.5075665", "0.5039694", "0.5029253", "0.5022836", "0.49863458", "0.49646837", "0.4960561", "0.49531803", "0.49447212", "0.4938898", "0.49349335", "0.49306", "0.49296007", "0.49259624", "0.49061972", "0.48845145", "0.4878452", "0.4865822", "0.4860664", "0.4854364", "0.48422945", "0.4835803", "0.4835264", "0.4828061", "0.4825679", "0.48067755", "0.4802623", "0.48019403", "0.48018536", "0.4801751", "0.47962296", "0.47957286", "0.47774714", "0.47541648", "0.47493625", "0.4746364", "0.47453657", "0.4742636", "0.47293895", "0.47276723", "0.47275814", "0.4724459", "0.47173762", "0.47127083", "0.4712663", "0.47039032", "0.46965688", "0.4690431", "0.46901888", "0.46868375", "0.46796134", "0.46782106", "0.46599737", "0.46571845", "0.46385303", "0.46320957", "0.46286377", "0.462357", "0.46198604", "0.46181387", "0.46094158", "0.46093282", "0.4600655", "0.45978445", "0.45938092", "0.45936957", "0.45905355", "0.45831093", "0.45679578", "0.45669007", "0.45564523", "0.4554496", "0.45480213", "0.4544934", "0.45440528", "0.45431286", "0.4543096", "0.45412064", "0.45411983", "0.45409012", "0.45379248", "0.45367095", "0.45334548" ]
0.7926242
0
/findAvgWage: Adds up the total wage and divides it by the number of Labourers
public double findAvgWage() { int numLabourer = 0; double total = 0; for (int i = 0; i < staffList.length; i++) { if (staffList[i] instanceof Labourer) { total += ((Labourer) staffList[i]).getWage(); numLabourer ++; } } return total/numLabourer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getAverageAgeInWeeks() {\n double cumulativeAges = 0.0;\n int population = this.getPopulation();\n if (guppiesInPool.size() == 0) { /*check for divide by 0 issue*/\n return cumulativeAges;\n }\n Iterator<Guppy> it = guppiesInPool.iterator();\n\n while (it.hasNext()) {\n Guppy currentGuppy = it.next();\n cumulativeAges += currentGuppy.getAgeInWeeks();\n }\n return (population == 0) ? population : cumulativeAges / this.getPopulation();\n }", "public double calculateNetWage(){\r\n\t return (getGrossWage()-fines);\r\n }", "public double getTotalWinAverage() {\n return (double) getTotalWins() / getTotalDeckAmount();\n }", "public double givenWeeklyWageEstimateIncomeAll(int weeklyWage){\n\t return formatReturnValue((weeklyWage * givenWeeklyWageEstimateIncomeGetSlopeAll()) + givenWeeklyWageEstimateIncomeGetInterceptAll());\n\t}", "public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }", "private float calculateMean()\n { \n int numberEmployees = employees.size();\n float total = 0, meanGrossPay = 0;\n // Create an array of all gross pays\n float[] allGrossPay = new float[numberEmployees];\n \n // Call method to return an array of float containing all gross pays\n allGrossPay = calculateAllGrossPay();\n // Find total gross pay\n for (int i = 0; i < numberEmployees; i++)\n {\n total += allGrossPay[i];\n }\n // Find mean and return it\n if (numberEmployees > 0)\n {\n meanGrossPay = total/numberEmployees;\n \n }\n return meanGrossPay;\n }", "public void calculateWage(){\n\t\tfor(CompEmpWage detail: arrayList){\n\t\t\tdetail.setTotalWage(calculateWage(detail));\n detail.print();\n System.out.println(\" Daily Wage : \" + dailyWageArrayList);\n\t\t}\n}", "public double getWages() {\r\n int x = -1;\r\n for(int i = 0; i < 7; i++) {\r\n if (idInput == EMPLOYEEID[i]) {\r\n x = i;\r\n break;\r\n }\r\n }\r\n return wages[x];\r\n }", "public double average(){\n\t\t// computes the overall grade\n\t\tfinal double\n\t\t\tPROGRAM_WEIGHT = .40,\n\t\t\tEXAM_WEIGHT = 1 - PROGRAM_WEIGHT;\n\t\t\n\t\tdouble overallGrade;\n\t\t\n\t\toverallGrade = programGrade * PROGRAM_WEIGHT + examGrade * EXAM_WEIGHT;\n\t\t\n\t\treturn overallGrade;\n\t}", "private static int getAverageOfPersonAge(final Collection<Person> persons) {\n BigDecimal sum = BigDecimal.ZERO;\n for (Person p: persons) {\n sum = sum.add(new BigDecimal(p.getAge()));\n }\n return sum.divide(new BigDecimal(persons.size()), RoundingMode.DOWN).intValue();\n }", "public double givenWeeklyWageEstimateIncomeAll(double weeklyWage){\n\t return formatReturnValue((weeklyWage * givenWeeklyWageEstimateIncomeGetSlopeAll()) + givenWeeklyWageEstimateIncomeGetInterceptAll());\n\t}", "public double averageBewertungHotel(Hotel hotel) {\r\n \tArrayList<Integer> bewertung = hotel.getBewertung();\r\n \tdouble wert=0;\r\n \tfor (int i=0;i<bewertung.size();i++) {\r\n \t\twert+=bewertung.get(i);\r\n \t}\r\n \twert=wert/bewertung.size();\r\n \treturn wert;\r\n }", "double totalMoviesAverageScore() {\n // call totalMovieAverage with no movie name\n // so filter will filter nothing and we'll get all the movies\n return totalMovieAverage(\"\");\n }", "public int calculatingDailyWage() {\n\t\tsalary = workingHrs * wagePerHr;\n\t\treturn salary;\n\t}", "public double calculateAvgLeadTime() {\n Double totalLeadTime = 0.0;\n LinkedList<Card> completedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : completedCards) {\n totalLeadTime += (int) DAYS.between(card.getCreationDate(versions), card.getCompletionDate(versions));\n }\n if (totalLeadTime == 0.0){\n return 0.0;\n }\n return Math.round(totalLeadTime/completedCards.size() * 100D) / 100D;\n }", "public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}", "public void average(){\n\t\tfor(PlayerWealthDataAccumulator w : _wealthData.values()){\n\t\t\tw.average();\n\t\t}\n\t}", "public double rechne(Lebewesen lebewesen) {\n\t \t\n\t\tdouble bmi = lebewesen.getGewicht() / (lebewesen.getGroesse() * lebewesen.getGroesse());\n\t\tzaehler ++;\n\t\treturn bmi;\n\t}", "public double averageChirpsPerUser() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageChirpsPerUser();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\t}", "public static double getGenderAvgWage(String g) throws Exception\r\n\t{\r\n\t\tFile file=new File(\"Data/Peopledetails.txt\");\r\n\t\tfs=new Scanner(file);\r\n\t\tfs.useDelimiter(\",|\\\\r\\n\");\r\n\t\t\t\r\n\t\ttotalWage=0;\r\n\t\tcount=0;\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\twhile (fs.hasNext())\r\n\t\t{\r\n\t\t\tid=fs.nextInt();\r\n\t\t\tfname=fs.next();\r\n\t\t\tsname=fs.next();\r\n\t\t\tgen=fs.next();\r\n\t\t\thrate=fs.nextDouble();\r\n\t\t\thrs=fs.nextDouble();\r\n\t\t\t\r\n\t\t\tgross=hrs*hrate;\r\n\t\t\t\r\n\t\t\t//Calculates the overtime\r\n\t\t\tif(hrs>40)\r\n\t\t\t{\r\n\t\t\t\totime=hrs-40;\r\n\t\t\t\tstandard=40;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\totime=0;\r\n\t\t\t\tstandard=hrs;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgross=(standard*hrate+otime*hrate*1.5);\r\n\t\t\t\r\n\t\t\t/*if the gender is male, it takes the gross pay of that person, adds it to the total for male wages\r\n\t\t\tand also adds 1 to the male counter.*/\r\n\t\t\t//otherwise, adds it to the total for female wages and 1 to female counter.\r\n\t\t\tif(gen.equals(g))\r\n\t\t\t{\r\n\t\t\t\ttotalWage=gross+totalWage;\r\n\t\t\t\tcount+=1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfs.close();\r\n\t\treturn totalWage/count;\r\n\t}", "public double getAverageDistanceDriven() {\n \tdouble totalDistance = 0;\n \tdouble n = 0;\n \tfor (int i = 0; i<4; i++) {\n \t\tif (module.get(i).getAbsoluteDistanceDriven() > 0.05) {\n \t\t\ttotalDistance += Math.abs(module.get(i).getAbsoluteDistanceDriven());\n \t\t\tn++;\n \t\t}\n \t}\n \tif (n == 0) {\n \t\t//System.out.println(\"no swerve modules have gone more than .3 feet\");\n \t\tn = 1;\n \t}\n \treturn totalDistance / n;\n }", "public static double calculateWage(final int ratePerHrs, final int totalHr)\n {\n return ratePerHrs * totalHr;\n }", "public static int dailyEmpWage()\n {\n\tif(IS_FULL_TIME()){\n\t\twage = WagePerHrs * FullDayHrs;\n\t}\n wage = WagePerHrs * FullDayHrs/2;\n return wage;\n }", "public double getGrossWage(){\r\n\t return (salary + addings);\r\n }", "public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}", "double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}", "public static void calculateDailyEmpWage()\n {\n\t\tint salary = 0;\n\t\tif(isPresent()){\n\t\t\tint empRatePerHr = 20;\n int PartTimeHrs = 4;\n salary = PartTimeHrs * empRatePerHr;\n\t\t\tSystem.out.println(\"Daily Part time Wage:\" +salary);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Daily Wage:\" +salary);\n\t\t}\n }", "public double avgRegionEarnings() {\n double total = 0;\n total = calcTotalEarnings();\n return total/numRegions;\n }", "public double getTotalGoldAverage() {\n return StatisticsHelper.getDivision(getTotalGold(), getTotalDeckAmount());\n }", "public int getAverage() { return (int)Math.ceil(getSumOfMarks()/ numberOfCourses); }", "public double getAverageHealthCoefficient() {\n double cumulativeHealth = 0.0;\n int population = this.getPopulation();\n Iterator<Guppy> it = guppiesInPool.iterator();\n\n while (it.hasNext()) {\n Guppy currentGuppy = it.next();\n if (currentGuppy.getIsAlive()) {\n cumulativeHealth += currentGuppy.getHealthCoefficient();\n }\n }\n return (population == 0) ? population : cumulativeHealth / population;\n }", "public double getWage() {\r\n return wage;\r\n }", "double getMeanProfit() {\n ArrayList<Double> allProfits = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> profitsOfFirm = firm.getProfits();\n allProfits.addAll(profitsOfFirm.subList(profitsOfFirm.size() - SimulationManager.sizeOfExaminationInterval, profitsOfFirm.size()));\n }\n\n return Calculation.round(Calculation.getMean(allProfits), 2);\n }", "public double getAvgDraws() {\n\t\tdouble result = -1.0, sum = 0.0;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT SUM(drawCnt) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tsum = this.rs.getDouble(1) ;\n\t\t\t}\n\t\t\tthis.rs = smt.executeQuery(\"SELECT COUNT(id) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tcount = this.rs.getInt(1);\n\t\t\t\tresult = sum / count;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "public double ratioUsersMorePosted75ChirpsOfAveragePerUser() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository\n\t\t\t\t\t.ratioUsersMorePosted75ChirpsOfAveragePerUser();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\t}", "public abstract double averageBreedWeightKG();", "public double averageArticlesPerUser() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageArticlesPerUser();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}", "public double getTotalGoldenCardAverage() {\n return StatisticsHelper.getDivision(getTotalGoldenCards(), getTotalDeckAmount());\n }", "@Override\r\n\tpublic double getAvgNrWheels() {\r\n\t\tdouble avgNrWheels = 0;\r\n\t\tdouble nrWheels = 0;\r\n\t\tList<INonAutomatedVehicle> allVehicles = new ArrayList<>();\r\n\t\tallVehicles.addAll(this.vehicleDatabase.get(BICYCLE));\r\n\t\tallVehicles.addAll(this.vehicleDatabase.get(TRICYCLE));\r\n\t\tallVehicles.addAll(this.vehicleDatabase.get(CAR));\r\n\t\tallVehicles.addAll(this.vehicleDatabase.get(MOTORCYCLE));\r\n\t\tfor (INonAutomatedVehicle vehicle : allVehicles) {\r\n\t\t\tnrWheels = nrWheels + vehicle.getNrWheels();\r\n\t\t}\r\n\t\tavgNrWheels = nrWheels / allVehicles.size();\r\n\r\n\t\treturn avgNrWheels;\r\n\t}", "public double calcAnnualIncome()\r\n {\r\n return ((hourlyWage * hoursPerWeek * weeksPerYear) * (1 - deductionsRate));\r\n }", "public double averageFollowupsPerArticle() {\n\t\tcheckAuthority();\n\t\ttry {\n\t\t\treturn this.administratorRepository.averageFollowupsPerArticle();\n\t\t} catch (Exception e) {\n\t\t\treturn 0.;\n\t\t}\n\n\t}", "public double findWeight(){\n int totalCoins = gold + silver + copper + electrum + platinum;\n if((totalCoins % 3) == 0){\n return totalCoins/3;\n }\n return totalCoins * weight;\n }", "public static double avgCalculator (String gender, int age, double bmi) {\n double avg = 0;\n\n // AGES: 5 , 6 , 7, 8 , 9 , 10 , 11, 12, 13, 14, 15, 16, 17, 18, 19\n double [] boyBMIavg = {15.3, 15.3, 15.5, 15.8, 16.1, 16.5, 17.0, 17.6, 18.3, 19.1, 19.8, 20.6, 21.2, 21.8, 22.2};\n double [] girlBMIavg = {15.2, 15.3, 15.4, 15.7, 16.1, 16.7, 17.3, 18.1, 18.9, 19.6, 20.3, 20.6, 21.1, 21.3, 21.4};\n \n // C H I L D R E N \n if (age < 19) { \n if (gender.equals(\"male\")) { \n avg = boyBMIavg [age -5]; // the bmi of an average boy based on age is retrieved from the array\n }\n else if (gender.equals(\"female\")) { \n avg = girlBMIavg [age -5]; // the bmi of an average girl based on age is retrieved from the array\n }\n else {\n System.out.println(\"error in gender value\"); // in case the gender value is not 'male' or 'female', sorry nonbinaries\n }\n }\n\n // A D U L T S \n else { \n if (gender.equals(\"male\")) {\n avg = 26.5; // the bmi of an average adult male is 26.5 \n }\n else if (gender.equals(\"female\")) {\n avg = 26.6; // the bmi of an average adult female is 26.6\n }\n else {\n System.out.println(\"error in gender value\"); // in case the gender value is not 'male' or 'female', sorry nonbinaries\n }\n }\n\n System.out.println(\"The average BMI for \" + gender + \"s at the age of \" + age + \" is about \" + avg ); // announces average\n \n //compares user to average\n double diff = 0; // the difference of user vs average is preset to zero\n\n // HIGHER BMI THAN AVERAGE\n if (bmi > avg) {\n diff = bmi - avg; // difference is calculated\n if (diff <= 0.5) { // if they are within .5 of the average, it is considered close enough\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is only a little higher than the average, \" + avg );\n System.out.println(\"You're doing pretty well :)\");\n }\n else { // if the gap is large, it is announced\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is much larger than the average, \" + avg + \", with a difference of \" + String.valueOf(diff).substring(0, 3));\n System.out.println(\"In comparison to the average, you're a little overweight.\");\n }\n }\n\n // LOWER BMI THAN AVERAGE\n else if (bmi < avg) {\n diff = avg - bmi; // difference is calculated\n if (diff <= 0.5) { // if they are within .5 of the average, it is considered close enough\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is only a little lower than the average, \" + avg );\n System.out.println(\"You're doing pretty well :)\");\n }\n else { // if the gap is large, it is announced\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is much smaller than the average, \" + avg + \", with a difference of \" + String.valueOf(diff).substring(0, 3));\n System.out.println(\"In comparison to the average, you're a little underweight.\");\n } \n }\n\n // SAME BMI AS AVERAGE\n else { // if the difference is zero\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is the exact same as the average, \" + avg );\n System.out.println(\"You're doing great :)\");\n }\n return avg;\n }", "@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}", "double average();", "public double getAverageGoldCardsByWins(int wins) {\n return statistics.getAvgGoldCardsByWins().get(wins);\n }", "public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }", "public int calAvg(int sum, int count) {\r\n\t\tif(count == 0)\r\n\t\t\treturn 0;\r\n\t\treturn ((int)(sum/count));\r\n\t}", "private void calculateAvg() {\n\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\tstats.addValue(oneQ.getGapCount() * oneQ.getFrequency());\n\t\t}\n\t\tthis.avgGain = stats.getMean();\n\t\tthis.medianGain = stats.getPercentile(50);\n\t\tthis.quartiles = stats.getPercentile(75);\n\t}", "public double getAverageGoldByWins(int wins) {\n return statistics.getAvgGoldByWins().get(wins);\n }", "private int calculate() {\n double grade = 0;\n double average = 0;\n\n if (weight1.getText().length() != 0) {\n for (int n : grades1)\n average += n;\n average /= grades1.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight1.getText())) * average);\n average = 0;\n }\n if (weight2.getText().length() != 0) {\n for (int n : grades2)\n average += n;\n average /= grades2.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight2.getText())) * average);\n average = 0;\n }\n if (weight3.getText().length() != 0) {\n for (int n : grades3)\n average += n;\n average /= grades3.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight3.getText())) * average);\n average = 0;\n }\n if (weight4.getText().length() != 0) {\n for (int n : grades4)\n average += n;\n average /= grades4.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight4.getText())) * average);\n average = 0;\n }\n if (weight5.getText().length() != 0) {\n for (int n : grades5)\n average += n;\n average /= grades5.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight5.getText())) * average);\n }\n int intGrade = (int) Math.round(grade);\n return intGrade;\n }", "public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }", "public int howMuch(String[] arrival, String[] departure, int wage) {\n\t\tlong effectiveSecondsWorked = 0;\n\n\t\t// Markers for the start and end of the day shifts.\n\t\tlong dayStart = convertTimeToSeconds(DAY_START);\n\t\tlong dayEnd = convertTimeToSeconds(DAY_END);\n\n\n\t\tfor (int i = 0; i < arrival.length; i++) {\n\n\t\t\tlong shiftStart = convertTimeToSeconds(arrival[i]);\n\t\t\tlong shiftEnd = convertTimeToSeconds(departure[i]);\n\n\t\t\t// Loop through each secod of the shift.\n\t\t\tfor (long j = shiftStart; j < shiftEnd; j++) {\n\n /*\n * If the current second is part of the day shift, increment the\n * count by 2.\n */\n\t\t\t\tif ((j >= dayStart) && (j <= dayEnd)) {\n\t\t\t\t\teffectiveSecondsWorked += 2;\n\n /*\n * If it's part of an evening or night shift, increment the count\n * by 3.\n */\n\t\t\t\t} else {\n\t\t\t\t\teffectiveSecondsWorked += 3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n /*\n * Multiply the wage by the number of hours worked. Note that there are\n * 60 * 60 = 3600 seconds in an hour, but since we doubled that when\n * counting the seconds, we need to divide by 2 * 3600 = 7200\n */\n\t\treturn (int) ((effectiveSecondsWorked * wage) / 7200);\n\t}", "public double mean() {\n\t\tdouble totalPercolationThershold = 0d;\n\t\tfor(double openedSite : openedSites){\n\t\t\ttotalPercolationThershold+= (double)(openedSite);\n\t\t}\n\t\treturn (totalPercolationThershold/trails);\n\t}", "public static double countAllAverage(Runner[] runners, int numberOfRunners)//cчитаем среднее значение\n {\n int result = 0;\n for (int i = 0; i < numberOfRunners; i++) {\n result += runners[i].getAverageRun();\n }\n\n return result / numberOfRunners;\n }", "@Override\r\n\tpublic int average(GradeBean param) {\n\t\treturn 0;\r\n\t}", "public double calculateOverallRating() {\n Rating[] ratingArray = this.ratings;\n double sum = 0.0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) { // Making sure it has a rating\n sum = sum + ratingArray[i].getScore();\n } else {\n sum = sum + 0.0;\n }\n }\n return sum;\n }", "public Double getTotalScore() {\n return getExperienceTime() * 1.5 + meanGPA();\n }", "public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }", "private void calculateAvgUnitPrice() {\n\n // If we don't have any active units, the average unit price is 0.\n if( getNumActiveCashUnits() <= 0 ) {\n this.avgCashUnitPrice = 0 ;\n return ;\n }\n else {\n double totalCostPrice = 0 ;\n for( final Trade trade : this.posHldCashTrades ) {\n totalCostPrice += trade.getNumActiveUnits() * trade.getAvgPrice() ;\n }\n this.avgCashUnitPrice = totalCostPrice / getNumActiveCashUnits() ;\n }\n }", "public double getTotalDustAverage() {\n return StatisticsHelper.getDivision(getTotalDust(), getTotalDeckAmount());\n }", "public double getAverageReturnPerTrade(){\n\t\treturn Math.round(averageReturnPerTrade*10000.0)/100.0;\n\t}", "private static int getAverageOfPersonNameLength(final Collection<Person> persons) {\n BigDecimal sum = BigDecimal.ZERO;\n for (Person p: persons) {\n sum = sum.add(new BigDecimal(p.getName().length()));\n }\n return sum.divide(new BigDecimal(persons.size()), RoundingMode.DOWN).intValue();\n }", "public double average() {\n double average = 0;\n for (int i = 0; i < studentList.size(); i++) {\n Student student = studentList.get(i);\n average += student.average();\n }\n average /= studentList.size();\n return average;\n }", "public double givenWeeklyWageEstimateIncomeMiddleTwoThirds(int weeklyWage){\n\t return formatReturnValue((weeklyWage * givenWeeklyWageEstimateIncomeGetSlopeMiddleTwoThirds()) + givenWeeklyWageEstimateIncomeGetInterceptMiddleTwoThirds());\n\t}", "@Override\n public Double average() {\n return (sum() / (double) count());\n }", "public double getAverageRegularCardsByWins(int wins) {\n return statistics.getAvgCardsByWins().get(wins);\n }", "public double calculateWeeklyPay(){\r\n double weeklyPay = salary / 52.0;\r\n return weeklyPay;\r\n }", "@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}", "private double getRockMean() {\n\n\t\tdouble mag, distanceJB;\n\t\tString fltTypeValue, willsSite;\n\t\tdouble rockVs30_SM = 620; // these values are from their code\n\t\tdouble rockVs30_BJF = 724;\n\n\t\ttry {\n\t\t\tmag = ( (Double) magParam.getValue()).doubleValue();\n\t\t\tdistanceJB = ( (Double) distanceJBParam.getValue()).doubleValue();\n\t\t\tfltTypeValue = fltTypeParam.getValue().toString();\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\tthrow new IMRException(C + \": getMean(): \" + ERR);\n\t\t}\n\n\t\t// check if distance is beyond the user specified max\n\t\tif (distanceJB > USER_MAX_DISTANCE) {\n\t\t\treturn VERY_SMALL_MEAN;\n\t\t}\n\n\t\t// Get b1 based on fault type\n\t\tdouble b1_BJF, b1_SM;\n\t\tif (fltTypeValue.equals(FLT_TYPE_STRIKE_SLIP)) {\n\t\t\tb1_BJF = coeffBJF.b1ss;\n\t\t\tb1_SM = coeffSM.b1ss;\n\t\t}\n\t\telse if (fltTypeValue.equals(FLT_TYPE_REVERSE)) {\n\t\t\tb1_BJF = coeffBJF.b1rv;\n\t\t\tb1_SM = coeffSM.b1rv;\n\t\t}\n\t\telse if (fltTypeValue.equals(FLT_TYPE_UNKNOWN)) {\n\t\t\tb1_BJF = coeffBJF.b1all;\n\t\t\tb1_SM = coeffSM.b1all;\n\t\t}\n\t\telse {\n\t\t\tthrow new ParameterException(C +\n\t\t\t\": getMean(): Invalid EqkRupture Parameter value for : FaultType\");\n\t\t}\n\n\t\t// Calculate the log rock-site mean for BJF\n\t\tdouble meanBJF = b1_BJF +\n\t\tcoeffBJF.b2 * (mag - 6) +\n\t\tcoeffBJF.b3 * (Math.pow( (mag - 6), 2)) +\n\t\tcoeffBJF.b5 *\n\t\t(Math.log(Math.pow( (distanceJB * distanceJB + coeffBJF.h * coeffBJF.h),\n\t\t\t\t0.5))) +\n\t\t\t\tcoeffBJF.bv * (Math.log(rockVs30_BJF / coeffBJF.va));\n\n\t\t// Calculate the log rock-site mean for SM\n\t\tdouble meanSM = b1_SM +\n\t\tcoeffSM.b2 * (mag - 6) +\n\t\tcoeffSM.b3 * (Math.pow( (mag - 6), 2)) +\n\t\tcoeffSM.b5 *\n\t\t(Math.log(Math.pow( (distanceJB * distanceJB + coeffSM.h * coeffSM.h),\n\t\t\t\t0.5))) +\n\t\t\t\tcoeffSM.bv * (Math.log(rockVs30_SM / coeffSM.va));\n\n\t\t//correct it max horizontal is desired\n\t\tComponent component = componentParam.getValue();\n\t\tif (component == Component.GREATER_OF_TWO_HORZ) {\n\t\t\tmeanSM += 0.139762; // add ln(1.15)\n\t\t\tmeanBJF += 0.139762;\n\t\t}\n\n\t\t// now return the appropriate mean\n\t\tif (mag <= 5) {\n\t\t\treturn meanSM;\n\t\t}\n\t\telse if (mag <= 5.5) {\n\t\t\treturn meanBJF + (mag - 5.5) * (meanBJF - meanSM) / 0.5;\n\t\t}\n\t\telse {\n\t\t\treturn meanBJF;\n\t\t}\n\t}", "public int average()\n {\n int average = 0;\n int sum = 0;\n\n for ( int index = 0; index < data.length; index++ )\n {\n sum = sum + data[index];\n }\n average = sum / data.length;\n\n return average;\n }", "double getAvgTreatment();", "public double calcDistWeight(double avgpoll) {\r\n\t\tdouble pollster_rate;\r\n\t\tif(pollster_rating > (avgpoll - (4-avgpoll))) {\r\n\t\t\tpollster_rate = (pollster_rating-avgpoll+(4-avgpoll))/(2*(4-avgpoll));\r\n\t\t} else {\r\n\t\t\tpollster_rate = 0;\r\n\t\t}\r\n\t\t\r\n\t\tdouble dayrate;\r\n\t\tif(days<90) {\r\n\t\t\tdayrate = (90-days)/90;\r\n\t\t} else {\r\n\t\t\tdayrate = 0;\r\n\t\t\tpollster_rate = 0;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tweight = Math.asin(pollster_rate)*Math.asin(dayrate);\r\n\t\t//System.out.println(pollster+\",\"+pollster_rate+\",\"+dayrate+\",\"+weight);\r\n\t\treturn weight;\r\n\t}", "@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }", "double getAvgControl();", "public int avgTrafficPerDay(){\r\n \r\n int trav=apstate.gettravellers();\r\n\t\tint days=apstate.getdays();\r\n\t\tint items=apstate.getitems();\r\n \r\n int avg_traffic_per_day=trav/days;\r\n \r\n return avg_traffic_per_day;\r\n }", "public double getAverageGrade(){\n double totalGrade = 0;\n double averageGrade = 0;\n // for loop to iterate over the array\n for(int i = 0; i<students.size(); i++){\n totalGrade += students.get(i).getGrades();\n } // end for\n \n averageGrade = totalGrade / students.size();\n return averageGrade;\n }", "public int calculateWage(CompEmpWage companyDetail){\n\tint workHrs=0 ,totalWage=0, zeroDayHr=0;\n\tdailyWageArrayList = new ArrayList<Integer>();\n\tcompNameArrayList.add(companyDetail.companyName);\n\tfor (int i=1;i<=companyDetail.day && workHrs<=companyDetail.workingHr;i++){\n\t\t\tswitch(getrandom()){\n\t\t\tcase 1:\n\t\t\ttotalWage = gettotalWage(companyDetail.wagePerHr, companyDetail.fullDayHr ,totalWage); \n\t\t\tworkHrs=getWorkingHrs(companyDetail.fullDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, companyDetail.halfDayHr ,totalWage);\n\t\t\tworkHrs=getWorkingHrs(companyDetail.halfDayHr,workHrs);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttotalWage=gettotalWage(companyDetail.wagePerHr, zeroDayHr ,totalWage);\n\t\t\t\tworkHrs=getWorkingHrs(zeroDayHr,workHrs);\n\t\t\t}\t\n\t}\n\ttotalWageArrayList.add(totalWage);\n\t\n\treturn totalWage;\n}", "public static double getStandardWage() {\r\n return standardWage;\r\n }", "public double averageOfArray() {\n double sum = 0;\n double average = 0;\n int i;\n for (i = 0; i < sirDeLa1La100.length; i++) {\n sum = sum + sirDeLa1La100[i];\n }\n average = sum / sirDeLa1La100.length;\n return average;\n }", "public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }", "private static double countAverageRun(Runner sportsman) {\n double result = 0;\n for (int i = 0; i < sportsman.getNumberOfRuns(); i++) {\n result += sportsman.getDefiniteRunStat(i);\n }\n\n return result / sportsman.getNumberOfRuns();\n }", "public double getAverageDustByWins(int wins) {\n return statistics.getAvgDustByWins().get(wins);\n }", "double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}", "private double getAverageRadius(LinkedList<V> pllCommunity) {\n double average = 0.0;\n for (V v : pllCommunity) {\n average += v.getWeight();\n }\n average /= pllCommunity.size();\n\n return average;\n // return average * VertexShapeTransformer.DEFAULT_VERTEX_RADIUS;\n }", "private double calcAvgX(List<Business> business) {\n\t\tdouble avg = 0.0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < business.size(); i++) {\n\t\t\tavg += business.get(i).getPrice();\n\t\t\tcount++;\n\t\t}\n\n\t\treturn avg / count;\n\t}", "public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}", "public double getCalories(int age, int weight) {\n\t\treturn (0.75 * weight * getDistance());\n\t}", "public double calcTotalEarnings() {\n double total = 0;\n for (int i = 0; i < numRegions; i++) {\n total += regionList[i].calcEarnings();\n }\n return total;\n }", "public double getOverallScore()\n\t{\n\t\t return ((((((this.quiz1/QUIZ_MAX) + (this.quiz2/QUIZ_MAX) + (this.quiz3/QUIZ_MAX)) / 3) * QUIZ_WEIGHT) + ((this.midtermExam / MIDTERM_MAX) * MIDTERM_WEIGHT) + ((this.finalExam / FINAL_MAX) * FINAL_WEIGHT)) * 100);\n\t}", "public double getAverageExtraPacksByWins(int wins) {\n return statistics.getAvgExtraPacksByWins().get(wins);\n }", "public double getAverage()\n {\n return getSum() / 2.0;\n }", "private void calculateOverall()\n {\n ArrayList<Integer> average = new ArrayList<Integer>(1);\n ArrayList<Integer> median = new ArrayList<Integer>(1);\n ArrayList<Integer> mode = new ArrayList<Integer>();\n ArrayList<Integer> stdDev = new ArrayList<Integer>(1);\n \n int avg = 0;\n int med = 90;\n int mod = 90;\n int dev = 0;\n \n int[] modeArray = new int[100];\n \n for (int i = 0; i < 100; i++) {\n \tmodeArray[i] = 0;\n }\n \n for (Integer score : allScores) {\n \tavg += score;\n \tmodeArray[score]++;\n }\n \n for (int i = 0; i < 100; i++) {\n \tif (modeArray[i] > mod) {\n \t\tmod = modeArray[i];\n \t}\n }\n \n avg = avg / allScores.size();\n \n Collections.sort(allScores);\n med = allScores.get(allScores.size() / 2);\n \n for (Integer score : allScores) {\n \tdev += Math.pow(score - avg, 2);\n }\n dev = (int)Math.floor(Math.sqrt(dev / allScores.size()));\n\n // TODO: Perform the actual calculations here\n average.add(avg);\n median.add(med);\n mode.add(mod);\n stdDev.add(dev);\n\n this.overallAnalytics.put(\"Average\", average);\n this.overallAnalytics.put(\"Median\", median);\n this.overallAnalytics.put(\"Mode\", mode);\n this.overallAnalytics.put(\"Standard Deviation\", stdDev);\n }", "public int totalWorth() {\n\t\tint val = 0;\n\t\tfor (Card c : cards) {\n\t\t\tval += c.value();\n\t\t}\n\t\treturn val;\n\t}", "private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n totalGoalsScored2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored2 = totalGoalsScored2/numberItems;\n //Total and average received goals of team 1\n for (int i=1; i<40; i=i+4){\n totalGoalsReceived1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived1 = totalGoalsReceived1/numberItems;\n //Total and average received goals of team 2\n for (int i=3; i<40; i=i+4){\n totalGoalsReceived2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived2 = totalGoalsReceived2/numberItems;\n }", "public static double doAvgTurnAroundTime() {\n if (count >= 1) {\n return turnaroundTimeTotal / count;\n } else {\n return -1;\n }\n }", "public float calculate_salary() {\r\n\t\tfloat calculate = 1000 + this.calculate_benefits();\r\n\t\treturn calculate;\r\n\t}", "public Integer geteWages() {\n return eWages;\n }", "public double getAvg(){\n double avg=0;\n for(int x=0; x<max; x++){\n avg=avg+times[x];\n }\n avg=avg/max;\n return avg;\n }" ]
[ "0.6758637", "0.6344898", "0.6331794", "0.6317357", "0.628458", "0.6258772", "0.6237449", "0.6231451", "0.61743325", "0.61654526", "0.61417127", "0.6122515", "0.61019605", "0.6084329", "0.60761964", "0.60663444", "0.60600877", "0.6028478", "0.6009861", "0.5972907", "0.59568965", "0.59474415", "0.59408915", "0.59249616", "0.5921822", "0.5911764", "0.59090436", "0.5905113", "0.5892985", "0.5890001", "0.5886919", "0.58815503", "0.5873516", "0.58638024", "0.58616376", "0.5861276", "0.58470863", "0.5835083", "0.57992214", "0.5794082", "0.5793683", "0.5792174", "0.578525", "0.57725424", "0.57698214", "0.5765144", "0.5762436", "0.57619685", "0.5761214", "0.5758382", "0.57392675", "0.5739132", "0.57311434", "0.572685", "0.56980544", "0.5694547", "0.56878275", "0.568464", "0.5684244", "0.5677212", "0.5672864", "0.5671", "0.5667323", "0.566591", "0.56627315", "0.56584156", "0.5654796", "0.56515145", "0.56483036", "0.5640139", "0.5637254", "0.56358045", "0.56327987", "0.56268036", "0.56257176", "0.562215", "0.5613204", "0.5611503", "0.56111103", "0.5609428", "0.560703", "0.56036246", "0.5599298", "0.55937743", "0.55917394", "0.55857277", "0.55807424", "0.5580671", "0.5576515", "0.5572403", "0.5565658", "0.55535173", "0.55454016", "0.55423164", "0.55375314", "0.5535866", "0.5530811", "0.55252665", "0.55251795", "0.5524845" ]
0.86191064
0
/ printRegionStatus: Prints out all Regions and their current status (Open/closed)
public void printRegionStatus() { for (int i = 0; i < numRegions; i++) { System.out.print(regionList[i].getRegionName() + " is "); if (regionList[i].checkOpen()) { System.out.println("open. :D"); } else { System.out.println("closed. D:"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printRegionsNames() {\n for (int i = 0; i < regionList.length; i++) {\n System.out.println(\"Region #\" + (i + 1) + \": \" + regionList[i].getRegionName());\n }\n }", "public void printStatus() {\n printBranches();\n printAllStages();\n printModified();\n printUntracked();\n }", "public void printStatus();", "public void printContents() {\n\t\t\n//\t\tCollections.sort(finalized);\n\t\t\n\t\tSystem.out.print(\"Register Status:\");\n\t\t\n\t\tint i = 0;\n\t\tfor (; i < finalized.length - 1; i++) {\n\t\t\tSystem.out.println(\"Reg \" + i + \": \" + finalized[i].toString());\n\t\t}\n\t\tSystem.out.print(\"Reg \" + i + \": \" + finalized[finalized.length - 1].toString() + \"\\n\");\n\t}", "public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }", "public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }", "public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }", "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "public void status() {\n\t\tString bName;\n\t\tSystem.out.println(\"=== Branches ===\");\n\t\tIterator iter = myBranch.entrySet().iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tbName = (String) entry.getKey();\n\n\t\t\tif (currentBranch.equals(bName)) {\n\t\t\t\tSystem.out.println(\"*\" + bName);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(bName);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Staged Files ===\");\n\t\tfor (int i = 0; i < stagedFiles.size(); i++) {\n\t\t\tSystem.out.println(stagedFiles.get(i));\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Files Marked for Untracking ===\");\n\t\tfor (int i = 0; i < untrackedFiles.size(); i++) {\n\t\t\tSystem.out.println(untrackedFiles.get(i));\n\t\t}\n\t}", "@Override\n\t@Transactional\n\t@Scheduled(cron = \"0 0 */4 * * *\")\n\tpublic void updateRegionsStatus() {\n\t\tregionRepository.updateRegionsStatus();\n\t}", "public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}", "public static void printTableStatusHeader() {\n\t\tSystem.out.println(\"Table availability status:\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "public String toString() {\n String output = \"\";\n for (int i = 0; i < numRegions; i++) {\n if (regionList[i] instanceof Arctic) \n output += (i+1) + \". \" + ((Arctic)regionList[i]).toString();\n else if (regionList[i] instanceof Aquarium) \n output += (i+1) + \". \" + ((Aquarium)regionList[i]).toString();\n else if (regionList[i] instanceof AmazonRainforest) \n output += (i+1) + \". \" + ((AmazonRainforest)regionList[i]).toString();\n }\n return output;\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public void printGS(){\r\n\t\tLogger.append(\" ITANet locations:\t\");\r\n\t\tfor (int i = 0; i < this.locVec.length; i++)\r\n\t\t\tLogger.append(this.locVec[i] + \" \");\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Interruption vector:\t\");\r\n\t\tfor(int i = 0; i < this.interVec.length; i++){\r\n\t\t\tif(this.interVec[i] == true)\r\n\t\t\t\tLogger.append(\"true \");\r\n\t\t\telse\r\n\t\t\t\tLogger.append(\"false \");\r\n\t\t}\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" CPUStack:\t\");\r\n\t\tthis.stack.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Control variable:\t\");\r\n\t\tthis.cvMap.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t\t\r\n\t\tLogger.append(\" IRQSwitch: \");\r\n\t\tthis.switches.print();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t}", "private static void mostrarRegiones (List<Regions> list)\n\t{\n\t\tIterator<Regions> it = list.iterator();\n\t\tRegions rg;\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\trg = it.next();\n\t\t\tSystem.out.println(rg.getRegionName() + \" \" +rg.getRegionId());\n\t\t\tSet<Countries> paises = rg.getCountrieses();\n\t\t\tSystem.out.println(\"PAISES\");\n\t\t\tIterator<Countries> it_paises = paises.iterator();\n\t\t\t\n\t\t\twhile (it_paises.hasNext())\n\t\t\t{\n\t\t\t\tCountries country = it_paises.next();\n\t\t\t\tSystem.out.println(country.getCountryName());\n\t\t\t}\n\t\t}\n\t}", "public String showStatus();", "public String getValidRegionDesc();", "public String getRegionFullName() {\n return regionFullName;\n }", "public Regions getRegions () {\n return this.regions;\n }", "void closeUserRegions() {\n ArrayList<HRegion> regionsToClose = new ArrayList<HRegion>();\n this.lock.writeLock().lock();\n try {\n synchronized (onlineRegions) {\n for (Iterator<Map.Entry<Integer, HRegion>> i =\n onlineRegions.entrySet().iterator(); i.hasNext();) {\n Map.Entry<Integer, HRegion> e = i.next();\n HRegion r = e.getValue();\n if (!r.getRegionInfo().isMetaRegion()) {\n regionsToClose.add(r);\n i.remove();\n }\n }\n }\n } finally {\n this.lock.writeLock().unlock();\n }\n for(HRegion region: regionsToClose) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"closing region \" + Bytes.toString(region.getRegionName()));\n }\n try {\n region.close();\n } catch (IOException e) {\n LOG.error(\"error closing region \" + region.getRegionName(),\n RemoteExceptionHandler.checkIOException(e));\n }\n }\n this.quiesced.set(true);\n if (onlineRegions.size() == 0) {\n outboundMsgs.add(HMsg.REPORT_EXITING);\n } else {\n outboundMsgs.add(HMsg.REPORT_QUIESCED);\n }\n }", "public void displayFloorStatus(Map<Integer, Floor> floors) {\n\t\tfloors.forEach((k, v) -> {\n\t\t\tSystem.out.println(v.getStatus(k));\n\t\t});\n\t}", "public List<Region> listRegions() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Region.class);\n\t}", "public void printAll() {\n\t\tfor(int i = 0; i<r.length; i++)\n\t\t\tprintReg(i);\n\t\tprintReg(\"hi\");\n\t\tprintReg(\"lo\");\n\t\tprintReg(\"pc\");\n\t}", "public void displayRoomByStatus(RoomStatus status) {\n\t\tSystem.out.println(status.toString().toUpperCase() + \" ROOMS\\n\");\n\t\trooms.forEach((key,value) -> {\n\t\t\tif(value.status == status) {\n\t\t\t\tSystem.out.println(value.getDetails());\n\t\t\t}\n\t\t});\n\t}", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public void regDump() {\r\n\t\t// Print each available register (id) and its value\r\n\t\tfor (int i = 0; i < NUMGENREG; i++) {\r\n\t\t\tSystem.out.print(\"r\" + i + \"=\" + m_registers[i] + \" \");\r\n\t\t}// for\r\n\t\t\r\n\t\t// Removed unnecessary concatenation\r\n\t\tSystem.out.print(\"PC=\" + getPC());\r\n\t\tSystem.out.print(\" SP=\" + getSP());\r\n\t\tSystem.out.print(\" BASE=\" + getBASE());\r\n\t\tSystem.out.print(\" LIM=\" + getLIM());\r\n\t\tSystem.out.println(\"\");\r\n\t}", "private static void printGrid(Vector<State> states) {\n\t\tSystem.out.println(\"State\\tUP\\tDOWN\\tLEFT\\tRIGHT\");\n\t\tSystem.out\n\t\t\t\t.println(\"---------------------------------------------------\");\n\t\tfor (State s : states) {\n\t\t\tSystem.out.print(s.getName());\n\t\t\tSystem.out.print(\"\\t\" + String.format(\"%.1f\", s.getqUval()));\n\t\t\tSystem.out.print(\"\\t\" + String.format(\"%.1f\", s.getqDval()));\n\t\t\tSystem.out.print(\" \\t\" + String.format(\"%.1f\", s.getqLval()));\n\t\t\tSystem.out.print(\"\\t\" + String.format(\"%.1f\", s.getqRval()));\n\t\t\tSystem.out.println();\n\n\t\t}\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}", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public String getRegionName() {\r\n return regionName;\r\n }", "@DISPID(15)\n\t// = 0xf. The runtime will prefer the VTID if present\n\t@VTID(25)\n\tjava.lang.String status();", "public String getRegionName() {\n return regionName;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getAvailabilityZoneInformation() != null)\n sb.append(\"AvailabilityZoneInformation: \").append(getAvailabilityZoneInformation());\n sb.append(\"}\");\n return sb.toString();\n }", "static private void showMissions() {\n\n Iterator iteratorMissionStatus = allMissions.missionStatus.entrySet().iterator();\n\n while (iteratorMissionStatus.hasNext()) {\n HashMap.Entry entry = (HashMap.Entry) iteratorMissionStatus.next();\n System.out.println((String) entry.getKey() + \": \");\n\n if ((boolean) (entry.getValue()) == false) {\n System.out.print(\"mission in progress\");\n System.out.println(\"\");\n }\n if ((boolean) (entry.getValue()) == true) {\n System.out.print(\"mission is complete\");\n System.out.println(\"\");\n }\n System.out.println(\"\");\n\n }\n }", "public String getRegion() {\n return this.region;\n }", "public RegionManagementDetails getCompleteRegionDetails(String seasonId);", "public String toString()\n { String status,requests;\n requests=\"\";\n status= \"\\n+----------Floor \" + floorNum + \"----------\" +\n \"\\n| current occupants: \" + occupants +\n \"\\n+---------------------------\\n\\n\";\n return status;\n }", "public EnumRegion getRegion()\n {\n return region;\n }", "public void currentSiteInfo(ArrayList regions){\n\t\t// For loop to get each region\n\t\t\t\tfor (int f = 0; f < regions.size(); f++) {\n\t\t\t\t\tRegion current_region = (Region) regions.get(f);\n\t\t\t\t\t// For loop to get each site\n\t\t\t\t\tfor (int i = 0; i < current_region.get_size(); i++) {\n\t\t\t\t\t\tSite current_site = current_region.get_site(i);\n\t\t\t\t\t\tSystem.out.println(current_site);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t}", "public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }", "public void print() {\r\n for (final Map.Entry<State, StatePolicyProperties> mapping : mStateMap.entrySet()) {\r\n final StatePolicyProperties properties = mapping.getValue();\r\n\r\n // Print the state\r\n mapping.getKey().print();\r\n System.out.println(\" State value = \" + properties.getValue());\r\n\r\n // Print the actions with their probability\r\n for (Map.Entry<Action, Double> actionProbability : properties.getActionProbabilities().entrySet()) {\r\n System.out.println(\" Action probability \" + actionProbability.getKey() + \" = \"\r\n + actionProbability.getValue());\r\n }\r\n // Print the actions with their value\r\n for (Map.Entry<Action, Double> actionValue : properties.getActionValues().entrySet()) {\r\n System.out.println(\" Action value \" + actionValue.getKey() + \" = \" + actionValue.getValue());\r\n }\r\n }\r\n System.out.println();\r\n }", "protected void dumpr() {\n println(Arrays.toString(register));\n println(\"Compare register: \" + compareRegister);\n println(\"StackRegister: \" + stackRegister);\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public List<String> regions() {\n return this.regions;\n }", "public void printByResource() {\r\n TUseStatus useStatus;\r\n\t for (int b=0; b < m_current_users_count; b++)\r\n\t for (int a=0; a < m_current_resources_count; a++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<String> getRegion() {\n\t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getRegion\");\r\n\t}", "public void testGetRegion() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tRegion region = regionMgr.getRegion(RegionTestBuilder.REGION_ID_INDIA);\r\n\t\t\tassertTrue(\"Unable to get country list\", region.getName()\r\n\t\t\t\t\t.equalsIgnoreCase(\"India\"));\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public void printContents(){\n System.out.println(this);\n System.out.println(\"Occupied by: \" + pieceAtVertex + \"\\n Neighbors:\" + neighbors);\n }", "public List<Region> getAllRegions() {\n\t\treturn regionDao.findWithNamedQuery(Region.QUERY_FIND_ALL, null);\n\t}", "Region region();", "Region region();", "Region region();", "Region region();", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "void printstate()\n\t{\n\t\toperation.printstate();\n\t}", "public void printCoverageOn(PrintWriter pw) {\r\n \r\n \tfor (Map.Entry<Integer,String> e : idMap.entrySet()) {\r\n \t String stateName = e.getValue();\r\n \r\n \t Integer cov = coverage.get(e.getKey());\r\n \t int nVisited = (cov != null) ? cov.intValue() : 0;\r\n\r\n pw.print(\" \");\r\n \r\n if (nVisited == 0) {\r\n pw.print( stateName + \" : not covered\");\r\n if (contains(required, stateName)) {\r\n pw.print(\", REQUIRED\");\r\n }\r\n pw.println();\r\n \r\n } else {\r\n pw.print( stateName + \" : \" + nVisited);\r\n if (contains(forbidden, stateName)){\r\n pw.print(\", FORBIDDEN\"); \r\n }\r\n pw.println();\r\n }\r\n \t}\r\n\t }", "public void print () {\r\n System.out.println(\"Place \"+name+\": lat \"+lat+\" lon \"+lon+\r\n \" elevation \"+ele);\r\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public String getRegion() {\n return region;\n }", "public void printVisiblePermitcCards(int region, PermitCard[] permits);", "public List<PDGRegion> getPDGRegions();", "public void testGetRootRegions() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tList countryList = regionMgr.getRootRegions();\r\n\t\t\tassertTrue(\"Unable to get country list\", countryList.size() > 0);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "IRegion getRegion();", "public String getRegionno() {\n return regionno;\n }", "private void printMap() {\n\t\tfor(Integer key: location.keySet()){\n\t\t\tString val= location.get(key).toString();\n\t\t\tSystem.out.println(\"(\" + key.toString() + \", \" + val+ \")\");\n\t\t}\n\t}", "public void printBranches() {\n System.out.println(\"=== Branches ===\");\n List<String> allBranchF = Utils.plainFilenamesIn(Main.ALL_BRANCHES);\n String commitInHead = Utils.readObject(HEADNAME, String.class);\n for (String branch: allBranchF) {\n if (branch.equals(commitInHead)) {\n System.out.println(\"*\" + branch);\n } else {\n System.out.println(branch);\n }\n }\n }", "@ApiModelProperty(value = \"State/region of IP address\")\n public String getRegionName() {\n return regionName;\n }", "private static void statusCommand() {\n String lineFormat = \"%-8s | %-15s | %s\\n\";\n\n List<Job> neededJobs = fetchNeededJobs();\n\n // table header\n if (neededJobs.size() < 2) {\n System.out.printf(lineFormat, \"STATE\", \"START TIME\", \"JOB DIRECTORY\");\n for (int i = 0; i < 78; i++) {\n System.out.print(((9 == i || 27 == i) ? \"+\" : \"-\"));\n }\n System.out.println();\n }\n\n // table rows\n ObjectCounter<JobState> counter = new ObjectCounter<JobState>();\n for (Job job : neededJobs) {\n Date startDate = job.getStartDate();\n JobState state = job.getState();\n counter.add(state);\n String startDateStr = (null == startDate) ? \"N/A\" : new SimpleDateFormat(\"yyyyMMdd HHmmss\").format(startDate);\n System.out.printf(lineFormat, state.toString(), startDateStr, job.getDir());\n }\n\n // table footer\n System.out.println();\n String sumFormat = \"%6d %s\\n\";\n System.out.printf(sumFormat, heritrix.getJobs().size(), \"TOTAL JOBS\");\n for (JobState state : JobState.values()) {\n if (counter.getMap().keySet().contains(state)) {\n System.out.printf(sumFormat, counter.get(state), state.toString());\n }\n }\n }", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "public void printRegistrationPlates(){\n for(RegistrationPlate plates: this.registrationList.keySet()){\n System.out.println(plates);\n }\n }", "public void printMachine(){\n\t\tfor(State s:theStates){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public String toString()\n\t{\n\t\tString result = \"Highlighted region \"+getMinIndex()+\"-\"+getMaxIndex();\n\t\treturn result;\n\t}", "public void printInformation() {\n\t\tif (currentBalance == 0) {\n\t\t\tSystem.out.println(\"It is empty...\");\n\t\t} else if (currentBalance > 0 && currentBalance < 21) {\n\t\t\tSystem.out.println(\"There’s some, but not much.\");\n\t\t} else if (currentBalance > 20 && currentBalance < 101) {\n\t\t\tSystem.out.println(\"There’s some.\");\n\t\t} else if (currentBalance > 100) {\n\t\t\tSystem.out.println(\"There’s a lot.\");\n\t\t}\n\t}", "public TypeOfRegion getRegion();", "public void printFlagPositions()\n {\n for (Integer[] flagLocation: flagLocations)\n {\n System.out.printf(\"{%d, %d}\\n\", flagLocation[0], flagLocation[1]);\n }\n }", "public void printOpenPorts(boolean PrintOnlyOpen)\n {\n\n System.out.println('\\n');\n\n if(mPortsStatus.length > 0) {\n if (PrintOnlyOpen) {\n System.out.println(\"Open Ports for \" + mIP + \": \");\n // Cycle through array and print port number for any that are open.\n for (int i = 0; i < mPortsStatus.length; i++) {\n if (mPortsStatus[i][1] == 1) {\n System.out.format(\"%6d%2s%-6s\", mPortsStatus[i][0], \": \", \"Open\");\n }\n }\n } else {\n // Cycle through array and print port number and status.\n System.out.println(\"Port status for \" + mIP + \": \");\n for (int i = 0; i < mPortsStatus.length; i++) {\n if (i % 10 == 0) {\n System.out.println();\n }\n if (mPortsStatus[i][1] == 1) {\n System.out.format(\"%6d%2s%-8s\", mPortsStatus[i][0], \": \", \"Open\");\n } else {\n System.out.format(\"%6d%2s%-8s\", mPortsStatus[i][0], \": \", \"Closed\");\n }\n }\n }\n System.out.println();\n }\n }", "@Test\n\tpublic void testGetRegionMap() {\n\t\tthis.shippingRegionImpl.setRegionStr(REGION_STR);\n\t\tMap<String, Region> regionMap = this.shippingRegionImpl.getRegionMap();\n\t\tassertEquals(REGION_MAP_SIZE, regionMap.size());\n\t\tassertEquals(COUNTRY_CODE_CA, regionMap.get(COUNTRY_CODE_CA).getCountryCode());\n\t\tList<String> caRegionSubCountryList = regionMap.get(COUNTRY_CODE_CA).getSubCountryCodeList();\n\t\tassertTrue(caRegionSubCountryList.contains(SUB_COUNTRY_CODE_AB));\n\t\tassertTrue(caRegionSubCountryList.contains(SUB_COUNTRY_CODE_BC));\n\t\tassertEquals(COUNTRY_CODE_US, regionMap.get(COUNTRY_CODE_US).getCountryCode());\n\t\tassertEquals(0, regionMap.get(COUNTRY_CODE_US).getSubCountryCodeList().size());\n\t}", "private void reportOpen(HRegionInfo region) {\n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_OPEN, region));\n }", "int getRegionValue();", "public void display(){\n\t\tfor (Entry<String, Map<String, Integer>> entry : collocationMap.entrySet()){\n\t\t for (Entry<String, Integer> subEntry : entry.getValue().entrySet()){\n\t\t\t System.out.println(entry.getKey() + \" \" + subEntry.getKey() + \": \" + subEntry.getValue());\n\t\t }\n\t\t}\n\t}", "public String getRegionNo() {\n return regionNo;\n }", "public void regionToStringTest() throws AssertException\r\n {\r\n \t// TODO: implement.\r\n }", "public void printCurrentState() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tSystem.out.print(this.currentState[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public ShowRegionElements getShowRegionAccess() {\n\t\treturn pShowRegion;\n\t}", "public void printVirtualMachines() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tVirtualMachine currVm = (VirtualMachine)mes[i];\r\n\t\t\tSystem.out.printf(\"vm[%d]: Name = %s\\n\", i, currVm.getName());\r\n\t\t}\r\n\t}", "String status();", "String status();" ]
[ "0.7219579", "0.6623728", "0.6333984", "0.62352705", "0.622062", "0.60795516", "0.60763454", "0.5938138", "0.5923646", "0.5588023", "0.55485344", "0.5497988", "0.5482266", "0.54368454", "0.54368454", "0.54368454", "0.54368454", "0.54248786", "0.54134876", "0.54073244", "0.5396683", "0.53509915", "0.53323936", "0.5274606", "0.5268951", "0.52436525", "0.5234947", "0.5227901", "0.52243924", "0.52119166", "0.5201911", "0.5199175", "0.5177746", "0.51677245", "0.5167543", "0.5160967", "0.515726", "0.5143813", "0.5142976", "0.51429564", "0.5136319", "0.51315814", "0.5106168", "0.5101109", "0.5094789", "0.5094483", "0.5090059", "0.5090059", "0.5083155", "0.5082284", "0.5081135", "0.5081135", "0.5081135", "0.5077392", "0.5076092", "0.50723946", "0.5063807", "0.50554556", "0.505316", "0.505316", "0.505316", "0.505316", "0.50453234", "0.50453234", "0.50453234", "0.50453234", "0.50453234", "0.5043801", "0.50394785", "0.5037496", "0.5025635", "0.50093913", "0.5003898", "0.500003", "0.49910882", "0.49895748", "0.49847052", "0.49846733", "0.49810085", "0.49796042", "0.49752477", "0.49716285", "0.49655712", "0.49629065", "0.49596652", "0.49570867", "0.4954808", "0.49546432", "0.49523875", "0.49520642", "0.49511608", "0.49461967", "0.4946002", "0.49453145", "0.49418446", "0.49391675", "0.49383298", "0.4936285", "0.49295747", "0.49295747" ]
0.8952297
0
/ Creation methods: These methods create and initialize the values of any AmazonRainforest, Aquarium or Arctic class by reading in the information from the Region.txt file. These methods are called by the loadRegionList method above in the same class. All the createRegion methods create local variables of the fields for each type of Region, and calls the constructor of the respective region at the bottom of the method and fills the global regionList array containing all the Regions. Creation method for AmazonRainforest
private void createAmazonRainforest (BufferedReader in) { try { String tempRegionName = in.readLine(); int tempMaxStaff = Integer.parseInt(in.readLine()); int tempNumStaff = Integer.parseInt(in.readLine()); Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor for (int i = 0; i < tempNumStaff; i++) { int id = Integer.parseInt(in.readLine()); //readStaffList[i] = this.searchStaffTemp(id); readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class //creates an array of initialized staff objects by searching //using the staffNum read from the file } int tempMaxAnimals = Integer.parseInt(in.readLine()); int tempNumAnimals = Integer.parseInt(in.readLine()); Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals; for (int i = 0; i < tempNumAnimals; i++) { readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine())); } RegionSpec tempSpec = new RegionSpec (tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())); regionList[numRegions] = new AmazonRainforest(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()), Boolean.parseBoolean(in.readLine()), Double.parseDouble(in.readLine()), Integer.parseInt(in.readLine()), Integer.parseInt(in.readLine())); } catch (IOException iox) { System.out.println("Error reading file"); } this.numRegions++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadRegionList(String fileName) {\n try {\n BufferedReader in = new BufferedReader(new FileReader(fileName));\n maxRegions = Integer.parseInt(in.readLine()); \n regionList = new Region[maxRegions];\n int numRegionsInFile = Integer.parseInt(in.readLine());\n \n for (int i = 0; i < numRegionsInFile; i++) {\n String type = in.readLine();\n /* createAmazonRainforest, createArctic, and createAquarium are void static\n methods which takes in the BufferedReader and initializes all Region objects \n in the RegionList array using the Regions.txt file\n */\n if (type.equals(\"Amazon Rainforest\")) {\n createAmazonRainforest(in); \n } else if (type.equals(\"Arctic\")) {\n createArctic(in);\n } else if (type.equals(\"Aquarium\")) {\n createAquarium(in);\n }\n \n if (i == 2) {\n regionList[i].toString(); //temp \n }\n }\n \n \n \n } catch (IOException iox) {\n System.out.println(\"Error reading \" + fileName);\n } catch (NumberFormatException ex) {\n System.out.println(\"Problem with file formatting. Please check the file and try again.\");\n }\n }", "private void createArctic(BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int maxStaff = Integer.parseInt(in.readLine());\n int numStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[maxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n for (int i = 0; i < numStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int maxAnimals = Integer.parseInt(in.readLine());\n int numAnimals = Integer.parseInt(in.readLine());\n \n Animal[] animals = new Animal[numAnimals]; //creating a local array of Animals;\n for (int i = 0; i < numAnimals; i++) {\n animals[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n regionList[this.numRegions] = new Arctic(readStaffList, animals, tempRegionName, new RegionSpec(numStaff, maxStaff, numAnimals, maxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())), \n Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine()), Double.parseDouble(in.readLine()), Boolean.parseBoolean(in.readLine()));\n //constructor call \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++; //updates the global field numRegions\n }", "private void createAquarium (BufferedReader in) { \n try {\n String tempRegionName = in.readLine();\n int tempMaxStaff = Integer.parseInt(in.readLine());\n int tempNumStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor\n \n for (int i = 0; i < tempNumStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int tempMaxAnimals = Integer.parseInt(in.readLine());\n int tempNumAnimals = Integer.parseInt(in.readLine());\n \n Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals;\n \n for (int i = 0; i < tempNumAnimals; i++) {\n readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n RegionSpec tempSpec = new RegionSpec(tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()), \n Double.parseDouble(in.readLine()));\n \n regionList[numRegions] = new Aquarium(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()), \n Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()),\n Integer.parseInt(in.readLine()));\n //maybe we left out regionName in the constructor for saving and loading the files\n \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n numRegions++; //check over this /updates the global field numRegions\n \n \n }", "public Region() { }", "public Region() {\n }", "public RegionSample() {\n\t\tsuper();\n\t}", "protected Regions loadFromFile() throws IOException {\n try (InputStream in = StreamUtils.getInputStream(this.localRegions)) {\n JsonObject json = Json.createReader(in).readObject();\n Regions regions = new RegionsJSON().parseRegions(json);\n // regions loaded\n LOGGER.fine(\"Loaded ANSS Authoritative Regions from \"\n + this.localRegions\n + \", last modified=\" + XmlUtils.formatDate(\n new Date(this.localRegions.lastModified())));\n return regions;\n }\n }", "private void createRegions() {\n\t\t// create pitch regions\n\t\tfor (int column = 0; column < REGION_COLUMNS; column++) {\n\t\t\tfor (int row = 0; row < REGION_ROWS; row++) {\n\t\t\t\tthis.regions.add(new Rectangle(column * REGION_WIDTH_IN_PX, row * REGION_HEIGHT_IN_PX,\n\t\t\t\t\t\t REGION_WIDTH_IN_PX, REGION_HEIGHT_IN_PX));\n\t\t\t}\n\t\t}\n\t}", "public Region(String areaName, String zipCode, String regions) {\n this.areaName = areaName;\n this.zipCode = zipCode;\n this.regions = regions;\n }", "public SystemRegionExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private List<Region> stataRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36218276352746, -71.08994364738464);\n\t\tr.addVertex(42.36207970542849, -71.08879566192627);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\trs.add(r);\n\n\t\t// Region 2\n\t\tr = new Region(\"Stata-2\");\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\trs.add(r);\n\n\t\t// Region 3\n\t\tr = new Region(\"Stata-3\");\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36131865577206, -71.08895659446716);\n\t\tr.addVertex(42.361366221645646, -71.08989000320435);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36196871959442);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 1 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361659543737126);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 2 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36140585984613);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 3 is in region %s\", getRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public TrafficRegions() {\n }", "private Region creatRegion(String rName) {\n\t\tfor (Region region : listRegions) {\r\n\t\t\tif (region.getName().equals(rName)) {\r\n\t\t\t\treturn region;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private static City[] fileInterpreter(Scanner file,int numberOfLines){\n City[] cities = new City [numberOfLines];\n for(int i = 0 ; file.hasNextLine(); i++){\n String line = file.nextLine();\n Scanner string = new Scanner(line); //String Scanner to consume the line into city and country and rainfall...\n String cityName = string.next();\n String countryName = string.next();\n double[] data = extractRainfallInformation(line.split(\"[ \\t]+[ \\t]*\")); //to create the array of monthly rainfall\n cities[i] = new City(cityName , countryName , data);\n string.close();\n }\n file.close();\n return cities;\n }", "public void setRegion(String region);", "public Zoo(String f1Name, String f2Name) {\n numRegions = 0;\n numStaff = 0;\n loadStaffList(f1Name);\n loadRegionList(f2Name);\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public CloudinsRegionRecord() {\n super(CloudinsRegion.CLOUDINS_REGION);\n }", "void addRegion(Region region);", "private List<Region> experimentFullRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Vassar St\n\t\tr = new Region(\"Vassar-1\");\n\t\tr.addVertex(42.36255147026933, -71.09034599930573);\n\t\tr.addVertex(42.36240877523236, -71.08975591332245);\n\t\tr.addVertex(42.36013353836458, -71.09434785515595);\n\t\tr.addVertex(42.360442721730834, -71.0948091951065);\n\t\trs.add(r);\n\n\t\t// Windsor-1\n\t\tr = new Region(\"Windsor-1\");\n\t\tr.addVertex(42.36302711805193, -71.09707297951508);\n\t\tr.addVertex(42.36297955343571, -71.09641852051544);\n\t\tr.addVertex(42.3615288153431, -71.09657945305634);\n\t\tr.addVertex(42.36186970216797, -71.09723391205597);\n\t\trs.add(r);\n\n\t\t// Mass-1\n\t\tr = new Region(\"Mass-1\");\n\t\tr.addVertex(42.362678310030105, -71.0995620694809);\n\t\tr.addVertex(42.3629954083118, -71.09918656021881);\n\t\tr.addVertex(42.36179042632724, -71.09720172554779);\n\t\tr.addVertex(42.361322696830854, -71.09736265808868);\n\t\trs.add(r);\n\n\t\t// Mass-2\n\t\tr = new Region(\"Mass-2\");\n\t\tr.addVertex(42.36114036066024, -71.09588207871246);\n\t\tr.addVertex(42.360791542163774, -71.09660091072845);\n\t\tr.addVertex(42.36106901157985, -71.0969335046463);\n\t\tr.addVertex(42.36156052582344, -71.09657945305634);\n\t\trs.add(r);\n\n\t\t// Mass-3\n\t\tr = new Region(\"Mass-3\");\n\t\tr.addVertex(42.36035551632001, -71.09489502579498);\n\t\tr.addVertex(42.3601731773427, -71.09523834854889);\n\t\tr.addVertex(42.360577493491306, -71.095978638237);\n\t\tr.addVertex(42.36077568673155, -71.0955816713028);\n\t\trs.add(r);\n\n\t\t/*\n\t\t * Albany-1-full r = new Region(\"Albany-1\");\n\t\t * r.addVertex(42.36087874696942, -71.09530272156525);\n\t\t * r.addVertex(42.361227564981775, -71.0956353154831);\n\t\t * r.addVertex(42.362678310030105, -71.092556139534);\n\t\t * r.addVertex(42.362527687785665, -71.09185876519012); rs.add(r);\n\t\t */\n\n\t\t// Albany-1\n\t\tr = new Region(\"Albany-1\");\n\t\tr.addVertex(42.36172700558263, -71.09442295700836);\n\t\tr.addVertex(42.3614891772202, -71.09410109192658);\n\t\tr.addVertex(42.360823253016186, -71.09553875595856);\n\t\tr.addVertex(42.361084866938036, -71.09590353638458);\n\t\trs.add(r);\n\n\t\t// Albany-2\n\t\tr = new Region(\"Albany-2\");\n\t\tr.addVertex(42.362678310030105, -71.09243812233734);\n\t\tr.addVertex(42.36253561528121, -71.09191240937042);\n\t\tr.addVertex(42.36180628150339, -71.09342517525482);\n\t\tr.addVertex(42.36223436974708, -71.09344663292694);\n\t\trs.add(r);\n\n\t\t// Portland-1\n\t\tr = new Region(\"Portland-1\");\n\t\tr.addVertex(42.362757584750575, -71.09386505753326);\n\t\tr.addVertex(42.36273380234492, -71.09342517525482);\n\t\tr.addVertex(42.36217887699113, -71.09354319245148);\n\t\tr.addVertex(42.36198861574153, -71.09409036309052);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-1\");\n\t\tr.addVertex(42.36321737615673, -71.09918656021881);\n\t\tr.addVertex(42.36356618118581, -71.09917583138275);\n\t\tr.addVertex(42.36342348845344, -71.0969335046463);\n\t\tr.addVertex(42.363042972916034, -71.09699787766266);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-2\");\n\t\tr.addVertex(42.36318566651262, -71.09384359986115);\n\t\tr.addVertex(42.36278929461076, -71.09392943054962);\n\t\tr.addVertex(42.36297162599619, -71.09643997818756);\n\t\tr.addVertex(42.36336799674776, -71.09641852051544);\n\t\trs.add(r);\n\n\t\t// Main-3\n\t\tr = new Region(\"Main-3\");\n\t\tr.addVertex(42.36300333574834, -71.09216990143585);\n\t\tr.addVertex(42.36271794740286, -71.09249176651764);\n\t\tr.addVertex(42.36277343968266, -71.09333934456635);\n\t\tr.addVertex(42.363106392332284, -71.09324278504181);\n\t\trs.add(r);\n\n\t\t// Main-4\n\t\tr = new Region(\"Main-4\");\n\t\tr.addVertex(42.36289235154579, -71.09035672814178);\n\t\tr.addVertex(42.36259110772208, -71.09038891464996);\n\t\tr.addVertex(42.36264660011392, -71.09166564614105);\n\t\tr.addVertex(42.36303504548448, -71.09157981545258);\n\t\trs.add(r);\n\n\t\tLocation l;\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36035940296916);\n\t\tl.setLongitude(-71.0944926738739);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36081921192526);\n\t\tl.setLongitude(-71.09338760375977);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36160405047349);\n\t\tl.setLongitude(-71.0919177532196);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3619370093201);\n\t\tl.setLongitude(-71.09123110771179);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36234924163794);\n\t\tl.setLongitude(-71.09039425849915);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3631736981596);\n\t\tl.setLongitude(-71.09626293182373);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36303893196785);\n\t\tl.setLongitude(-71.09436392784119);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362935875273244);\n\t\tl.setLongitude(-71.09288334846497);\n\t\tlog(String.format(\"Test point on Main-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362785253646265);\n\t\tl.setLongitude(-71.09100580215454);\n\t\tlog(String.format(\"Test point on Main-3 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362476081807);\n\t\tl.setLongitude(-71.0936987400055);\n\t\tlog(String.format(\"Test point on Portland-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36099362133876);\n\t\tl.setLongitude(-71.09561920166016);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36154855716084);\n\t\tl.setLongitude(-71.0943853855133);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362008357414815);\n\t\tl.setLongitude(-71.093430519104);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362610849206014);\n\t\tl.setLongitude(-71.09221816062927);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3611521749309);\n\t\tl.setLongitude(-71.09653115272522);\n\t\tlog(String.format(\"Test point on Mass-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3604862471552);\n\t\tl.setLongitude(-71.09537243843079);\n\t\tlog(String.format(\"Test point on Mass-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36238887921827);\n\t\tl.setLongitude(-71.09683156013489);\n\t\tlog(String.format(\"Test point on Windsor-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "WithCreate withRegion(Region location);", "WithCreate withRegion(Region location);", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "WithCreate withRegion(String location);", "WithCreate withRegion(String location);", "public void setRegion(String region) {\n this.region = region;\n }", "public static void main(String[] args) throws IOException, ParseException {\n\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"C:\\\\Dev\\\\Demo\\\\Demo\\\\src\\\\main\\\\resources\\\\data\\\\USNationalParks.txt\"));\n\t\ttry {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t String line = \"\";\n\t\t String[] lineArray;\n\t\t \n\t\t Park park = new Park();\n\t\t \n\t\t \n\t\t \n\t\t ArrayList<Park> retArray = new ArrayList<Park>();\n\t\t while ((line = br.readLine()) != null) {\n\t\t \tpark = new Park();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\"); //2 Acadia\n\t\t\t park.setParkName(lineArray[2].substring(0, lineArray[2].indexOf('<')));\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); //2 Maine\n\t\t\t lineArray = line.split(\">\");\n\t\t\t park.setProvince(lineArray[2].substring(0, lineArray[2].indexOf('<')));\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine(); //19: \"44.35, -68.21\"\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setLatitude(lineArray[19].substring(0, 5));\n\t\t\t park.setLongitude(lineArray[19].substring(7, lineArray[19].indexOf('<')));\n\t\t\t \n\t\t\t \n\t\t\t line = br.readLine(); //4 February 26th, 1919\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setDateEstablished(stringToDate(lineArray[4].substring(0, lineArray[4].indexOf('<'))));\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); //3 347,389 acres '('\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setParkArea(NumberFormat.getNumberInstance(java.util.Locale.US).parse(lineArray[3].substring(0, lineArray[3].indexOf('a')-1)).intValue());\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line); // 1 3,303,393 <\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t park.setParkVisitors(NumberFormat.getNumberInstance(java.util.Locale.US).parse(lineArray[1].substring(0, lineArray[1].indexOf('<'))).intValue());\n\t\t\t \n\t\t\t line = br.readLine(); //skip for now\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t line = br.readLine();\n\t\t\t System.out.println(line);\n\t\t\t lineArray = line.split(\">\");\n\t\t\t printArryStrings(lineArray);\n\t\t\t \n\t\t\t \n\n\t\t \n\t\t\t retArray.add(park);\n\t\t }\n\t\t \n\t\t for(Park p: retArray){\n\t\t \tSystem.out.println(\"Insert into parks(name, country, province, latitude, longitude, dtEst, parkArea, annualVisitors)\" + \"VALUES('\"+ p.getParkName()+\"',\"+ \"'United States','\"+p.getProvince() +\"','\"+ p.getLatitude()+\"','\" + p.getLongitude() + \"','\" + dateToString(p.getDateEstablished()) + \"',\" + p.getParkArea() +\",\"+ \t\t\t\tp.getParkVisitors()+\");\");\n\t\t \t//System.out.println();\n\t\t }\n\t\t} finally {\n\t\t br.close();\n\t\t}\n\t}", "public static void init() {\n Handler.log(Level.INFO, \"Loading Blocks\");\n\n oreAluminum = new BaseOre(Config.oreAluminumID).setUnlocalizedName(Archive.oreAluminum)\n .setHardness(3.0F).setResistance(5.0F);\n\n blockGrinder = new BaseContainerBlock(Config.blockGrinderID, Archive.grinderGUID)\n .setUnlocalizedName(Archive.blockGrinder);\n\n blockOven = new BaseContainerBlock(Config.blockOvenID, Archive.ovenGUID)\n .setUnlocalizedName(Archive.blockOven);\n }", "public void readRegions( String filename ) {\r\n\t\ttry {\r\n\t\t\ts.readRegions(filename, ignoreY);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static de.fraunhofer.fokus.movepla.model.Region create(long regionId) {\n return getPersistence().create(regionId);\n }", "public void setRegion(Region region) {\n this.region = region;\n }", "@Test\n public void testSetAndGetRegion() {\n System.out.println(\"getRegion\");\n TextRegion instance = new TextRegion();\n assertNull(instance.getRegion());\n String expResult = \"region\";\n instance.setRegion(expResult);\n String result = instance.getRegion();\n assertEquals(expResult, result);\n assertEquals(0.0f, instance.getConfidence(), 0.001f);\n assertNull(instance.getImageUrl());\n assertNull(instance.getOrder());\n assertNull(instance.getPageUrl());\n assertNull(instance.getResourceId());\n assertNull(instance.getText());\n }", "public Region(String n,Set<Territoire> lT) {\n\t\tthis.nom=n;\n\t\tthis.listeTerritoire=lT;\n\t\tfor (Territoire territoire : lT) {\n\t\t\tterritoire.setRegion(this);\n\t\t}\n\t}", "public Region(String regionId, String name, boolean active, boolean available) {\n providerRegionId = regionId;\n this.name = name;\n this.active = active;\n this.available = available;\n }", "public static void init() {\r\n\t\twines = read();\r\n\t\tread_tasteNotes(wines);\r\n\t\tidSorted = duplicate(wines);\r\n\t}", "public IntercityBus(){\n super(\"CombustionEngine\");\n super.setRegion(\"Regional\");\n }", "public void fetchRegions () {\n try {\n // try loading from geoserve\n this.regions = loadFromGeoserve();\n } catch (Exception e) {\n LOGGER.log(Level.WARNING,\n \"Error fetching ANSS Regions from geoserve\",\n e);\n try {\n if (this.regions == null) {\n // fall back to local cache\n this.regions = loadFromFile();\n }\n } catch (Exception e2) {\n LOGGER.log(Level.WARNING,\n \"Error fetching ANSS Regions from local file\",\n e);\n }\n }\n }", "private List<Region> experimentSuperDenseRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36199654330529, -71.09211625725555);\n\t\tr.addVertex(42.362892351545966, -71.09046401650238);\n\t\tr.addVertex(42.362234369747256, -71.08898343712616);\n\t\tr.addVertex(42.36113243298882, -71.09136523873138);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361921154176926);\n\t\tl.setLongitude(-71.09134912490845);\n\t\tlog(String.format(\"Test point Stata-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public TypeOfRegion getRegion();", "public synchronized void createRegionStates(\n final List<HRegionInfo> hris) {\n for (HRegionInfo hri: hris) {\n createRegionState(hri);\n }\n }", "public void createLocations() {\n createAirports();\n createDocks();\n createEdges();\n createCrossroads();\n }", "private static void init() throws Exception \r\n\t{\r\n dynamoDB = new AmazonDynamoDBClient(new ClasspathPropertiesFileCredentialsProvider());\r\n Region usEast1 = Region.getRegion(Regions.US_EAST_1);\r\n dynamoDB.setRegion(usEast1);\r\n }", "public static void main(String[] args) throws IOException {\r\n\r\n File file = new File(\"Load_Shedding_All_Areas_Schedule_and_Map.clean.final.txt\");\r\n\r\n LSItemsArray = new LSItems[2976];\r\n Scanner scan;\r\n //Scanner scan = new Scanner(file);\r\n\r\n try {\r\n scan = new Scanner(file);\r\n int count = 0;\r\n while (scan.hasNextLine()){\r\n String line = scan.nextLine();\r\n String[] splitString = splitString(line);\r\n //System.out.println(Arrays.toString(splitString));\r\n LSItems lsItem = new LSItems(splitString[0], splitString[1]);\r\n LSItemsArray[count] = lsItem;\r\n count++;\r\n }\r\n scan.close();\r\n\r\n }\r\n catch(FileNotFoundException e) {\r\n throw new RuntimeException(e);\r\n }\r\n\r\n\r\n if (args.length != 0) {\r\n printAreas(args[0]);\r\n try {\r\n writeOperationsToTxt(args[0], opCount);\r\n writeOperationsToCSV(args[0], opCount);\r\n }\r\n catch(FileNotFoundException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n else\r\n printAllAreas();\r\n\r\n }", "public Map(ArrayList<City> cities, ArrayList<PointOfInterest> points, ArrayList<Region> regions, int type, int length, int breadth) {\n\t\ttry { \n\t \t this.image = ImageIO.read(new File(\"map.jpg\"));\n\t \t\t} catch (IOException ex) {\n\t \t System.out.println(\"I could not find the image file.\");\n\t \t\t}\n\t \t\tthis.cities = cities;\n\t \t\tthis.points = points;\n\t \t\tthis.type = type;\n\t \t\tthis.regions = regions;\n\t \t\tthis.breadth = breadth;\n\t \t\tthis.length = length;\n \t}", "public Territory(String name, String continent, int numberOfArmies) {\r\n\t\tsuper();\r\n\t\tthis.name = name;\r\n\t\tthis.continent = continent;\r\n\t\tthis.numberOfArmies = numberOfArmies;\r\n\t}", "public static void createArrays() {\n\t\tinitArrays();\n\t\tcreateNodeTable();\n\t\tcreateEdgeTables();\n\t\t// Helper.Time(\"Read File\");\n\t\tcreateOffsetTable();\n\t}", "private static void addRainfallForAllCities(Scanner file, Scanner kb,int numberOfLines) throws IOException,IllegalArgumentException {\n file = new Scanner(new FileInputStream(\"rainfall.txt\"));\n City [] cities = new City[numberOfLines];\n int numOfMonths = 0;\n file.next();file.next(); //to skip the city name and the country name\n while(file.hasNextDouble()) {\n file.nextDouble();\n numOfMonths++;\n }\n double [] monthlyRainfall = new double[numOfMonths+1]; //1 for the month that will be added..\n if(numOfMonths>=12)\n throw new IllegalArgumentException(\"All the months are filled with information\");\n file.close();\n file = new Scanner(new FileInputStream(\"rainfall.txt\"));\n //making the array .. I can not use fileInterpreter because the array it will give me lacks a space for the new month\n String cityName,countryName;\n for(int k=0;k<cities.length;k++){\n cityName = file.next();\n countryName = file.next();\n for(int j=0;j<monthlyRainfall.length-1;j++)\n monthlyRainfall[j] = file.nextDouble();\n cities[k] = new City(cityName,countryName,monthlyRainfall);\n }\n file.close();\n System.out.println(\"Enter the average rainfall values for month#\"+(numOfMonths+1));\n double newRainfall;\n for(int i=0;i<cities.length;i++){\n System.out.printf(\"Enter average rainfall value [mm] of Month#%d for the city %s of %s:\",numOfMonths+1,cities[i].getCityName(),cities[i].getCountryName());\n newRainfall = kb.nextDouble();\n System.out.println();\n if(newRainfall<0||newRainfall>1000) throw new IllegalArgumentException(\"Invalid rainfall average\");\n cities[i].modifyAverageMonthlyRainfall(monthlyRainfall.length,newRainfall);\n }\n updateFile(cities,false);\n }", "public List<Region> listRegions() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Region.class);\n\t}", "public Region() {\n initComponents();\n bindingTabel();\n }", "protected String makeRegionFile(Context context, ChromosomeRange r, PreprocessingTools tools, String region) throws URISyntaxException, IOException, InterruptedException {\n if (filterBedFile == null) {\n r.writeToPicardRegionFile(region);\n } else {\n String exomebed = tmpFileBase + \"exome.bed\";\n if (filterBedFile.endsWith(\".gz\")) {\n exomebed += \".gz\";\n }\n HalvadeFileUtils.downloadFileFromHDFS(context, FileSystem.get(new URI(filterBedFile), context.getConfiguration()),\n filterBedFile, exomebed);\n if (exomebed.endsWith(\".gz\")) {\n exomebed = HalvadeFileUtils.Unzip(exomebed);\n }\n region = tools.filterExomeBed(exomebed, r);\n if (region == null) {\n Logger.DEBUG(\"empty region file, no vcf results!!\");\n return null;\n }\n HalvadeFileUtils.removeLocalFile(keep, exomebed);\n }\n return region;\n }", "Region region();", "Region region();", "Region region();", "Region region();", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "public void initialize(InputStream is) {\n // Get data out of the restaurants file and store it in a readable way.\n ArrayList<String> restaurantData = getFileData(is);\n\n // Fill arrayList with restaurant objects by properly initializing restaurants.\n initializeRestaurantList(restaurantData);\n }", "public static Region RegionTestCarteNY() {\n\t\treturn new Region(\"Test\",Territoire.listeTerritoireTestRegion());\n\t}", "private static void readOhioRailRegions (ResourceBundle appRb, int[] countyFips) {\n\n logger.info(\"Reading Ohio Rail Regions\");\n TableDataSet railRegions = fafUtils.importTable(appRb.getString(\"rail.zone.definition\"));\n int highestFips = fafUtils.getHighestVal(countyFips);\n\n railRegionReference = new String[highestFips + 1];\n for (int row = 1; row <= railRegions.getRowCount(); row++) {\n int fips = (int) railRegions.getValueAt(row, \"fips\");\n String reg = railRegions.getStringValueAt(row, \"ohioRailRegion\");\n railRegionReference[fips] = reg;\n }\n listOfRailRegions = fafUtils.getUniqueListOfValues(railRegionReference);\n }", "private void populateRegions() {\n regionsSpinnerAdapter.clear();\n regionsSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n regionSpinner.setAdapter(regionsSpinnerAdapter);\n regionsSpinnerAdapter.add(\"Choose Region...\");\n for (RegionsResponse.Regions region : regionsList) {\n if (region.getParentId() == 0)\n regionsSpinnerAdapter.add(region.getRegionName());\n }\n regionsSpinnerAdapter.notifyDataSetChanged();\n }", "public void setRegion(final TypeOfRegion region);", "public Bank() throws Exception\r\n\t{\r\n\t\tScanner fileScan = new Scanner(new File(\"C:\\\\Users\\\\jason\\\\workspace\\\\proj1fa14\\\\bankdata.txt\"));\r\n\t\taccounts = new Account[10];\r\n\t\tnumAccounts = 0;\r\n\t\tCustomer customer;\r\n\t\tAccount account;\r\n\t\tfor(int i = 0; i<9; i++)\r\n\t\t{\r\n\t\t\tString first = fileScan.next();\r\n\t\t\t//System.out.println(first);\r\n\t\t\tString last = fileScan.next();\r\n\t\t\t//System.out.println(last);\r\n\t\t\tint age = fileScan.nextInt();\r\n\t\t\tString pN = fileScan.next();\r\n\t\t\tint ba = fileScan.nextInt();\r\n\t\t\tint ch = fileScan.nextInt();\r\n\t\t\tString accNum = fileScan.next();\r\n\t\t\tcustomer = new Customer(first,last,age,pN);\r\n\t\t\taccount = new Account(customer,ba,ch, accNum);\r\n\t\t\taccounts[i] = account;\r\n\t\t\tnumAccounts++;\r\n\t\t}\r\n\t\tfileScan.close();\r\n\t}", "private static void processRegatta(String name) {\n\t\tr = new Regatta(name);\n\n\t\t// Getting wind type.\n\t\tString windType = fileInput.nextLine().toLowerCase();\n\t\tif(!(windType.equals(\"low\") || windType.equals(\"high\"))) {\n\t\t\tthrow new IllegalStateException(\"Invalid wind condition\");\n\t\t}\n\n\t\t// Reading in boats from input file.\n\t\twhile(fileInput.hasNextLine()){\n\t\t\tString[] split = fileInput.nextLine().split(\":\");\n\t\t\tr.addBoat(split[0], split[1] + windType, split[2]);\n\t\t}\n\t\t\n\t\tfileInput.close();\n\t\tSystem.out.println(\"\\nFinished processing regatta. Use podium to see results\");\n\t}", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "int createMultiRegionsWithPBSerialization(final Configuration c,\n final byte[] tableName, int numRegions)\n throws IOException {\n if (numRegions < 3) throw new IOException(\"Must create at least 3 regions\");\n byte [] startKey = Bytes.toBytes(\"aaaaa\");\n byte [] endKey = Bytes.toBytes(\"zzzzz\");\n byte [][] splitKeys = Bytes.split(startKey, endKey, numRegions - 3);\n byte [][] regionStartKeys = new byte[splitKeys.length+1][];\n for (int i=0;i<splitKeys.length;i++) {\n regionStartKeys[i+1] = splitKeys[i];\n }\n regionStartKeys[0] = HConstants.EMPTY_BYTE_ARRAY;\n return createMultiRegionsWithPBSerialization(c, tableName, regionStartKeys);\n }", "@Test\n\tpublic void testSetRegionMap() {\n\t\tMap<String, Region> regionMap = new LinkedHashMap<String, Region>();\n\t\tRegion caRegion = new RegionImpl(COUNTRY_CODE_CA,\n\t\t\t\t\t\t\t\t\t\t Arrays.asList(SUB_COUNTRY_CODE_AB, SUB_COUNTRY_CODE_BC));\n\t\tregionMap.put(COUNTRY_CODE_CA, caRegion);\n\n\t\tregionMap.put(COUNTRY_CODE_US, new RegionImpl(\"US\"));\n\n\t\tthis.shippingRegionImpl.setRegionMap(regionMap);\n\t\tassertSame(regionMap, this.shippingRegionImpl.getRegionMap());\n\n\t\t//Check the regionStr\n\t\tString regionString = this.shippingRegionImpl.getRegionStr();\n\t\tassertTrue(regionString.contains(\"[CA(AB,BC)]\"));\n\t\tassertTrue(regionString.contains(\"[US()]\"));\n\t}", "public RegistryCreator() {\n this.vehicleRegistry = new VehicleRegistry();\n this.inspectionResultRegistry = new InspectionResultRegistry();\n }", "public void populateRegion(World world, String regionName, ProtectedRegion region) {\n long timeAtStart = System.currentTimeMillis();\n ProtectedPolygonalRegion polygonalRegion = (ProtectedPolygonalRegion) region;\n Location found;\n int attempt = 0;\n int minX = polygonalRegion.getMinimumPoint().getBlockX();\n int maxX = polygonalRegion.getMaximumPoint().getBlockX();\n int minY = polygonalRegion.getMinimumPoint().getBlockY();\n int maxY = polygonalRegion.getMaximumPoint().getBlockY();\n int minZ = polygonalRegion.getMinimumPoint().getBlockZ();\n int maxZ = polygonalRegion.getMaximumPoint().getBlockZ();\n List<Location> locationList = new ArrayList<>();\n // Increase the amount of attempts here.\n while (attempt < 100) {\n attempt++;\n int x = ThreadLocalRandom.current().nextInt(minX, maxX + 1);\n int z = ThreadLocalRandom.current().nextInt(minZ, maxZ + 1);\n int y = getHighestYAt(new Location(world, x, maxY, z), minY);\n if (y == -1) {\n continue;\n }\n found = new Location(world, x, y, z);\n Block block = found.getBlock();\n if (!main.validFloorMaterials.contains(block.getType()))\n continue;\n\n if (!polygonalRegion.contains(BukkitUtil.toVector(found)))\n continue;\n\n Block airSpaceAbove = found.add(0, 1, 0).getBlock();\n if (airSpaceAbove.getType() != Material.AIR)\n continue;\n\n Block airSpaceTwoAbove = found.add(0, 1, 0).getBlock();\n if (airSpaceTwoAbove.getType() != Material.AIR)\n continue;\n\n locationList.add(found.add(0, -1, 0));\n }\n main.preLoadedSpawnLocations.put(regionName, locationList);\n long duration = System.currentTimeMillis() - timeAtStart;\n System.out.print(\"Generated \" + locationList.size() + \" points for the region \" + regionName + \". (Took \" + duration + \" ms.)\");\n }", "public Trader(Region region) {\n this.region = region;\n this.market = region.getMarket();\n int itemIndex = (int) (Math.random() * (market.getItem().length));\n this.offered = market.getItem()[itemIndex]; // get a random item\n this.price = offered.getPrice();\n this.damage = 0;\n this.speak = \"Trader wants to sell \" + offered.getName() + \" for \" + price + \".\";\n this.sold = false;\n }", "public static Set<String> getRegionCodeSet() {\n // The capacity is set to 321 as there are 241 different entries,\n // and this offers a load factor of roughly 0.75.\n Set<String> regionCodeSet = new HashSet<String>(321);\n\n regionCodeSet.add(\"AC\");\n regionCodeSet.add(\"AD\");\n regionCodeSet.add(\"AE\");\n regionCodeSet.add(\"AF\");\n regionCodeSet.add(\"AG\");\n regionCodeSet.add(\"AI\");\n regionCodeSet.add(\"AL\");\n regionCodeSet.add(\"AM\");\n regionCodeSet.add(\"AO\");\n regionCodeSet.add(\"AR\");\n regionCodeSet.add(\"AS\");\n regionCodeSet.add(\"AT\");\n regionCodeSet.add(\"AU\");\n regionCodeSet.add(\"AW\");\n regionCodeSet.add(\"AX\");\n regionCodeSet.add(\"AZ\");\n regionCodeSet.add(\"BA\");\n regionCodeSet.add(\"BB\");\n regionCodeSet.add(\"BD\");\n regionCodeSet.add(\"BE\");\n regionCodeSet.add(\"BF\");\n regionCodeSet.add(\"BG\");\n regionCodeSet.add(\"BH\");\n regionCodeSet.add(\"BI\");\n regionCodeSet.add(\"BJ\");\n regionCodeSet.add(\"BL\");\n regionCodeSet.add(\"BM\");\n regionCodeSet.add(\"BN\");\n regionCodeSet.add(\"BO\");\n regionCodeSet.add(\"BQ\");\n regionCodeSet.add(\"BR\");\n regionCodeSet.add(\"BS\");\n regionCodeSet.add(\"BT\");\n regionCodeSet.add(\"BW\");\n regionCodeSet.add(\"BY\");\n regionCodeSet.add(\"BZ\");\n regionCodeSet.add(\"CA\");\n regionCodeSet.add(\"CC\");\n regionCodeSet.add(\"CD\");\n regionCodeSet.add(\"CF\");\n regionCodeSet.add(\"CG\");\n regionCodeSet.add(\"CH\");\n regionCodeSet.add(\"CI\");\n regionCodeSet.add(\"CK\");\n regionCodeSet.add(\"CL\");\n regionCodeSet.add(\"CM\");\n regionCodeSet.add(\"CN\");\n regionCodeSet.add(\"CO\");\n regionCodeSet.add(\"CR\");\n regionCodeSet.add(\"CU\");\n regionCodeSet.add(\"CV\");\n regionCodeSet.add(\"CW\");\n regionCodeSet.add(\"CX\");\n regionCodeSet.add(\"CY\");\n regionCodeSet.add(\"CZ\");\n regionCodeSet.add(\"DE\");\n regionCodeSet.add(\"DJ\");\n regionCodeSet.add(\"DK\");\n regionCodeSet.add(\"DM\");\n regionCodeSet.add(\"DO\");\n regionCodeSet.add(\"DZ\");\n regionCodeSet.add(\"EC\");\n regionCodeSet.add(\"EE\");\n regionCodeSet.add(\"EG\");\n regionCodeSet.add(\"EH\");\n regionCodeSet.add(\"ER\");\n regionCodeSet.add(\"ES\");\n regionCodeSet.add(\"ET\");\n regionCodeSet.add(\"FI\");\n regionCodeSet.add(\"FJ\");\n regionCodeSet.add(\"FK\");\n regionCodeSet.add(\"FM\");\n regionCodeSet.add(\"FO\");\n regionCodeSet.add(\"FR\");\n regionCodeSet.add(\"GA\");\n regionCodeSet.add(\"GB\");\n regionCodeSet.add(\"GD\");\n regionCodeSet.add(\"GE\");\n regionCodeSet.add(\"GF\");\n regionCodeSet.add(\"GG\");\n regionCodeSet.add(\"GH\");\n regionCodeSet.add(\"GI\");\n regionCodeSet.add(\"GL\");\n regionCodeSet.add(\"GM\");\n regionCodeSet.add(\"GN\");\n regionCodeSet.add(\"GP\");\n regionCodeSet.add(\"GR\");\n regionCodeSet.add(\"GT\");\n regionCodeSet.add(\"GU\");\n regionCodeSet.add(\"GW\");\n regionCodeSet.add(\"GY\");\n regionCodeSet.add(\"HK\");\n regionCodeSet.add(\"HN\");\n regionCodeSet.add(\"HR\");\n regionCodeSet.add(\"HT\");\n regionCodeSet.add(\"HU\");\n regionCodeSet.add(\"ID\");\n regionCodeSet.add(\"IE\");\n regionCodeSet.add(\"IL\");\n regionCodeSet.add(\"IM\");\n regionCodeSet.add(\"IN\");\n regionCodeSet.add(\"IQ\");\n regionCodeSet.add(\"IR\");\n regionCodeSet.add(\"IS\");\n regionCodeSet.add(\"IT\");\n regionCodeSet.add(\"JE\");\n regionCodeSet.add(\"JM\");\n regionCodeSet.add(\"JO\");\n regionCodeSet.add(\"JP\");\n regionCodeSet.add(\"KE\");\n regionCodeSet.add(\"KG\");\n regionCodeSet.add(\"KH\");\n regionCodeSet.add(\"KI\");\n regionCodeSet.add(\"KM\");\n regionCodeSet.add(\"KN\");\n regionCodeSet.add(\"KP\");\n regionCodeSet.add(\"KR\");\n regionCodeSet.add(\"KW\");\n regionCodeSet.add(\"KY\");\n regionCodeSet.add(\"KZ\");\n regionCodeSet.add(\"LA\");\n regionCodeSet.add(\"LB\");\n regionCodeSet.add(\"LC\");\n regionCodeSet.add(\"LI\");\n regionCodeSet.add(\"LK\");\n regionCodeSet.add(\"LR\");\n regionCodeSet.add(\"LS\");\n regionCodeSet.add(\"LT\");\n regionCodeSet.add(\"LU\");\n regionCodeSet.add(\"LV\");\n regionCodeSet.add(\"LY\");\n regionCodeSet.add(\"MA\");\n regionCodeSet.add(\"MC\");\n regionCodeSet.add(\"MD\");\n regionCodeSet.add(\"ME\");\n regionCodeSet.add(\"MF\");\n regionCodeSet.add(\"MG\");\n regionCodeSet.add(\"MH\");\n regionCodeSet.add(\"MK\");\n regionCodeSet.add(\"ML\");\n regionCodeSet.add(\"MM\");\n regionCodeSet.add(\"MN\");\n regionCodeSet.add(\"MO\");\n regionCodeSet.add(\"MP\");\n regionCodeSet.add(\"MQ\");\n regionCodeSet.add(\"MR\");\n regionCodeSet.add(\"MS\");\n regionCodeSet.add(\"MT\");\n regionCodeSet.add(\"MU\");\n regionCodeSet.add(\"MV\");\n regionCodeSet.add(\"MW\");\n regionCodeSet.add(\"MX\");\n regionCodeSet.add(\"MY\");\n regionCodeSet.add(\"MZ\");\n regionCodeSet.add(\"NA\");\n regionCodeSet.add(\"NC\");\n regionCodeSet.add(\"NE\");\n regionCodeSet.add(\"NF\");\n regionCodeSet.add(\"NG\");\n regionCodeSet.add(\"NI\");\n regionCodeSet.add(\"NL\");\n regionCodeSet.add(\"NO\");\n regionCodeSet.add(\"NP\");\n regionCodeSet.add(\"NR\");\n regionCodeSet.add(\"NU\");\n regionCodeSet.add(\"NZ\");\n regionCodeSet.add(\"OM\");\n regionCodeSet.add(\"PA\");\n regionCodeSet.add(\"PE\");\n regionCodeSet.add(\"PF\");\n regionCodeSet.add(\"PG\");\n regionCodeSet.add(\"PH\");\n regionCodeSet.add(\"PK\");\n regionCodeSet.add(\"PL\");\n regionCodeSet.add(\"PM\");\n regionCodeSet.add(\"PR\");\n regionCodeSet.add(\"PS\");\n regionCodeSet.add(\"PT\");\n regionCodeSet.add(\"PW\");\n regionCodeSet.add(\"PY\");\n regionCodeSet.add(\"QA\");\n regionCodeSet.add(\"RE\");\n regionCodeSet.add(\"RO\");\n regionCodeSet.add(\"RS\");\n regionCodeSet.add(\"RU\");\n regionCodeSet.add(\"RW\");\n regionCodeSet.add(\"SA\");\n regionCodeSet.add(\"SB\");\n regionCodeSet.add(\"SC\");\n regionCodeSet.add(\"SD\");\n regionCodeSet.add(\"SE\");\n regionCodeSet.add(\"SG\");\n regionCodeSet.add(\"SH\");\n regionCodeSet.add(\"SI\");\n regionCodeSet.add(\"SJ\");\n regionCodeSet.add(\"SK\");\n regionCodeSet.add(\"SL\");\n regionCodeSet.add(\"SM\");\n regionCodeSet.add(\"SN\");\n regionCodeSet.add(\"SO\");\n regionCodeSet.add(\"SR\");\n regionCodeSet.add(\"SS\");\n regionCodeSet.add(\"ST\");\n regionCodeSet.add(\"SV\");\n regionCodeSet.add(\"SX\");\n regionCodeSet.add(\"SY\");\n regionCodeSet.add(\"SZ\");\n regionCodeSet.add(\"TC\");\n regionCodeSet.add(\"TD\");\n regionCodeSet.add(\"TG\");\n regionCodeSet.add(\"TH\");\n regionCodeSet.add(\"TJ\");\n regionCodeSet.add(\"TL\");\n regionCodeSet.add(\"TM\");\n regionCodeSet.add(\"TN\");\n regionCodeSet.add(\"TO\");\n regionCodeSet.add(\"TR\");\n regionCodeSet.add(\"TT\");\n regionCodeSet.add(\"TV\");\n regionCodeSet.add(\"TW\");\n regionCodeSet.add(\"TZ\");\n regionCodeSet.add(\"UA\");\n regionCodeSet.add(\"UG\");\n regionCodeSet.add(\"US\");\n regionCodeSet.add(\"UY\");\n regionCodeSet.add(\"UZ\");\n regionCodeSet.add(\"VA\");\n regionCodeSet.add(\"VC\");\n regionCodeSet.add(\"VE\");\n regionCodeSet.add(\"VG\");\n regionCodeSet.add(\"VI\");\n regionCodeSet.add(\"VN\");\n regionCodeSet.add(\"VU\");\n regionCodeSet.add(\"WF\");\n regionCodeSet.add(\"WS\");\n regionCodeSet.add(\"XK\");\n regionCodeSet.add(\"YE\");\n regionCodeSet.add(\"YT\");\n regionCodeSet.add(\"ZA\");\n regionCodeSet.add(\"ZM\");\n regionCodeSet.add(\"ZW\");\n\n return regionCodeSet;\n }", "private HRegionInfo createRegion(final HTableDescriptor\n htd, byte[] startKey, byte[] endKey)\n throws IOException {\n Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = new HRegionInfo(htd.getTableName(), startKey, endKey);\n MetaTableAccessor.addRegionToMeta(meta, hri);\n meta.close();\n return hri;\n }", "private void loadEnvironment(String filename){\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n String line;\n while ((line = reader.readLine()) != null) {\n String[] info = line.split(\",\");\n String type = info[TYPE_INDEX];\n type = type.replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n Point coordinate = new\n Point(Double.parseDouble(info[POS_X_INDEX]), Double.parseDouble(info[POS_Y_INDEX]));\n\n switch (type) {\n case \"Player\" -> this.player = new Player(coordinate, Integer.parseInt(info[ENERGY_INDEX]));\n case \"Zombie\" -> {\n entityList.add(new Zombie(coordinate, type));\n zombieCounter++;\n }\n case \"Sandwich\" -> {\n entityList.add(new Sandwich(coordinate, type));\n sandwichCounter++;\n }\n case \"Treasure\" -> this.treasure = new Treasure(coordinate, type);\n default -> throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }", "public void initialize() {\n\n\t\tthis.subNetGenes = getSubNetGenes(species, xmlFile);\n\t\tthis.subNetwork = getSubNetwork(subNetGenes, oriGraphFile);\n\t\tHPNUlilities.dumpLocalGraph(subNetwork, subNetFile);\n\t\t/* Create level file for the original graph */\n\t\tHPNUlilities.createLevelFile(codePath, oriGraphFile, oriLevel,\n\t\t\t\tglobalLevelFile, penaltyType, partitionSize);\n\n\t}", "public void read_india_states() throws IOException {\r\n\t\tString line = \"\";\r\n\t\tString splitBy = \",\";\r\n\t\tString path = \".\\\\src\\\\main\\\\java\\\\com\\\\covidProject\\\\covid19\\\\Datasets\\\\Indian Cities Database.csv\";\r\n\t\tHashMap<String, List<String>> state_city = new HashMap<>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// parsing a CSV file into BufferedReader class constructor\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(path));\r\n\t\t\twhile ((line = br.readLine()) != null) // returns a Boolean value\r\n\t\t\t{\r\n\t\t\t\tString[] info = line.split(splitBy); // use comma as separator\r\n\t\t\t\tString City = info[0].toLowerCase();\r\n\t\t\t\tString State = info[5].toLowerCase();\r\n\r\n\t\t\t\tif (state_city.get(State) == null) {\r\n\t\t\t\t\tList<String> temp_list = new ArrayList<>();\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tList<String> temp_list = state_city.get(State);\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tList<Document> list = new ArrayList<Document>();\r\n\t\t\t\r\n\t\t\t//Initialize country\r\n\t\t\tCovidCountry countryDoc = new CovidCountry();\r\n\t\t\tcountryDoc.setName(\"India\");\r\n\t\t\t\r\n\t\t\t//Initialize state list\r\n\t\t\tList<CovidState> states_list = new ArrayList<>();\r\n\t\t\t\r\n\t\t\tfor (Map.Entry<String, List<String>> entry : state_city.entrySet()) {\r\n\t\t\t\t\r\n\t\t\t\t//get state and cities from the map we created \r\n\t\t\t\tString state = entry.getKey();\r\n\t\t\t\tList<String> cities = entry.getValue();\r\n\r\n\t\t\t\tList<CovidSubCity> city_list = new ArrayList<>();\r\n\r\n\t\t\t\t//Cities are created before states.\r\n\t\t\t\tfor (String city : cities) {\r\n\t\t\t\t\tCovidCity covidCity = new CovidCity(city,state,countryDoc.getName());\r\n\t\t\t\t\tthis.covidCityRepository.save(covidCity);\r\n\t\t\t\t\tCovidSubCity subCity = new CovidSubCity(city,covidCity.getId());\r\n\t\t\t\t\tcity_list.add(subCity);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//create state\r\n\t\t\t\tCovidState covidState = new CovidState(state,city_list);\r\n\t\t\t\t//this.covidStateRepository.save(covidState);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tstates_list.add(covidState);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcountryDoc.setStates(states_list);\r\n\t\t\tthis.covidCountryRepository.save(countryDoc);\r\n\t\t\t\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "protected void create() {\n\t\t_segments = _geneticCode.getNGenes() * _geneticCode.getSymmetry();\n\t\t_segColor = new Color[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segColor[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getColor();\n\t\t_segBranch = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segBranch[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getBranch();\n\t\t_segredReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segredReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).getredReaction();\n\t\t_seggreenReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_seggreenReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getgreenReaction();\n\t\t_segblueReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segblueReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getblueReaction();\n\t\t_segplagueReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segplagueReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getplagueReaction();\n\t\t_segwhiteReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_segwhiteReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getwhiteReaction();\n\t\t_seggrayReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_seggrayReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getgrayReaction();\n\t\t_segdefaultReaction = new int[_segments];\n\t\tfor (int g = 0; g < _segments; g++)\n\t\t\t_segdefaultReaction[g] = _geneticCode.getGene(g%_geneticCode.getNGenes()).getdefaultReaction();\n\t\t_segmagentaReaction = new int[_segments];\n\t\tfor (int h = 0; h < _segments; h++)\n\t\t\t_segmagentaReaction[h] = _geneticCode.getGene(h%_geneticCode.getNGenes()).getmagentaReaction();\n\t\t_segpinkReaction = new int[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segpinkReaction[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getpinkReaction();\n\t\t_segcoralReaction = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segcoralReaction[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getcoralReaction();\n\t\t_segorangeReaction = new int[_segments];\n\t\tfor (int k = 0; k < _segments; k++)\n\t\t\t_segorangeReaction[k] = _geneticCode.getGene(k%_geneticCode.getNGenes()).getorangeReaction();\n\t\t_segbarkReaction = new int[_segments];\n\t\tfor (int l = 0; l < _segments; l++)\n\t\t\t_segbarkReaction[l] = _geneticCode.getGene(l%_geneticCode.getNGenes()).getbarkReaction();\n\t\t_segvioletReaction = new int[_segments];\n\t\tfor (int m = 0; m < _segments; m++)\n\t\t\t_segvioletReaction[m] = _geneticCode.getGene(m%_geneticCode.getNGenes()).getvioletReaction();\n\t\t_segvirusReaction = new int[_segments];\n\t\tfor (int n = 0; n < _segments; n++)\n\t\t\t_segvirusReaction[n] = _geneticCode.getGene(n%_geneticCode.getNGenes()).getvirusReaction();\n\t\t_segmaroonReaction = new int[_segments];\n\t\tfor (int o = 0; o < _segments; o++)\n\t\t\t_segmaroonReaction[o] = _geneticCode.getGene(o%_geneticCode.getNGenes()).getmaroonReaction();\n\t\t_segoliveReaction = new int[_segments];\n\t\tfor (int p = 0; p < _segments; p++)\n\t\t\t_segoliveReaction[p] = _geneticCode.getGene(p%_geneticCode.getNGenes()).getoliveReaction();\n\t\t_segmintReaction = new int[_segments];\n\t\tfor (int q = 0; q < _segments; q++)\n\t\t\t_segmintReaction[q] = _geneticCode.getGene(q%_geneticCode.getNGenes()).getmintReaction();\n\t\t_segcreamReaction = new int[_segments];\n\t\tfor (int r = 0; r < _segments; r++)\n\t\t\t_segcreamReaction[r] = _geneticCode.getGene(r%_geneticCode.getNGenes()).getcreamReaction();\n\t\t_segspikeReaction = new int[_segments];\n\t\tfor (int s = 0; s < _segments; s++)\n\t\t\t_segspikeReaction[s] = _geneticCode.getGene(s%_geneticCode.getNGenes()).getspikeReaction();\n\t\t_seglightblueReaction = new int[_segments];\n\t\tfor (int t = 0; t < _segments; t++)\n\t\t\t_seglightblueReaction[t] = _geneticCode.getGene(t%_geneticCode.getNGenes()).getlightblueReaction();\n\t\t_segochreReaction = new int[_segments];\n\t\tfor (int u = 0; u < _segments; u++)\n\t\t\t_segochreReaction[u] = _geneticCode.getGene(u%_geneticCode.getNGenes()).getochreReaction();\n\t\t_seglightbrownReaction = new int[_segments];\n\t\tfor (int v = 0; v < _segments; v++)\n\t\t\t_seglightbrownReaction[v] = _geneticCode.getGene(v%_geneticCode.getNGenes()).getlightbrownReaction();\n\t\t_segbrownReaction = new int[_segments];\n\t\tfor (int w = 0; w < _segments; w++)\n\t\t\t_segbrownReaction[w] = _geneticCode.getGene(w%_geneticCode.getNGenes()).getbrownReaction();\n\t\t_segsickReaction = new int[_segments];\n\t\tfor (int x = 0; x < _segments; x++)\n\t\t\t_segsickReaction[x] = _geneticCode.getGene(x%_geneticCode.getNGenes()).getsickReaction();\n\t\t_segskyReaction = new int[_segments];\n\t\tfor (int y = 0; y < _segments; y++)\n\t\t\t_segskyReaction[y] = _geneticCode.getGene(y%_geneticCode.getNGenes()).getskyReaction();\n\t\t_seglilacReaction = new int[_segments];\n\t\tfor (int z = 0; z < _segments; z++)\n\t\t\t_seglilacReaction[z] = _geneticCode.getGene(z%_geneticCode.getNGenes()).getlilacReaction();\n\t\t_segiceReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segiceReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).geticeReaction();\n\t\t_segsilverReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_segsilverReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getsilverReaction();\n\t\t_segfireReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segfireReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getfireReaction();\n\t\t_segfriendReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segfriendReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getfriendReaction();\n\t\t_seggreenbrownReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_seggreenbrownReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getgreenbrownReaction();\n\t\t_segspikepointReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_segspikepointReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getspikepointReaction();\n\t\t_startPointX = new int[_segments];\n\t\t_startPointY = new int[_segments];\n\t\t_endPointX = new int[_segments];\n\t\t_endPointY = new int[_segments];\n\t\t_m1 = new double[_segments];\n\t\t_m2 = new double[_segments];\n\t\t_m = new double[_segments];\n\t\t_mphoto = new double[_segments];\n\t\tx1 = new int[_segments];\n\t\ty1 = new int[_segments];\n\t\tx2 = new int[_segments];\n\t\ty2 = new int[_segments];\n\t}", "private void setBlocks() {\n // load the class\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n // create an InputStream object\n InputStream inputStream = cl.getResourceAsStream(this.map.get(\"block_definitions\"));\n // initialize this factory with a factory\n this.factory = BlocksDefinitionReader.fromReader(new InputStreamReader(inputStream));\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void init(String inputFile) \n\t{\t\t\n\t\tif (instance != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\ts = new Scanner(new FileReader(inputFile));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\\nnot a valid inputFile\");\n\t\t\t}\n\t\t\t//load mapping of reserved words and special symbols\n\t\t\tLoadCoreValues();\n\t\t\tinstance = new Tokenizer();\n\t\t}\n\t}", "public TileRegion() {\n\t\tthis.bounds = new Rectangle();\n\t\tthis.type\t= CollisionType.land;\n\t}", "public RegionsAdapter(Activity a, ArrayList<Region> regions, String baseUrl) {\n\t\tactivity = a;\n\t\tdata = regions;\n\t\tinflater = (LayoutInflater) activity\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t//imageLoader = new ImageLoader(activity.getApplicationContext());\n\t\t//mBaseUrl = baseUrl;\n\t}", "public void setRegion(EnumRegion region)\n {\n this.region = region;\n }", "public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n this.createEnvironment();\n // BACKGROUND CREATION //\n this.createBackground();\n // create the counters for the game.\n this.createCounters();\n // LISTENERS CREATION //\n //create a message printing listener.\n HitListener phl = new PrintingHitListener();\n //create a new block remover listener.\n HitListener blockrmv = new BlockRemover(this, blockCounter);\n //create a new ball remover listener.\n HitListener ballrmv = new BallRemover(this, ballCounter);\n //create a new score counter listener.\n HitListener scorelstn = new ScoreTrackingListener(this.scoreCounter);\n // BLOCKS CREATION //\n this.createBlocks(phl, blockrmv, scorelstn);\n // SIDE BLOCKS CREATION //\n this.createSideBlocks();\n // DEATH BLOCK CREATION //\n this.createDeathBlock(ballrmv);\n // LEVEL'S NAME //\n LevelsName name = new LevelsName(this.levelInfo.levelName());\n // add the whole-game indicators to the sprites list.\n this.sprites.addSprite(scoreIndi);\n this.sprites.addSprite(lifeIndi);\n this.sprites.addSprite(name);\n }", "public static void initAndRegister() {\n\t\tAcaciaPlate.setHarvestLevel(\"axe\", 0);\n\t\tBirchPlate.setHarvestLevel(\"axe\", 0);\n\t\tCactusPlate.setHarvestLevel(\"axe\", 0);\n\t\tDarkOakPlate.setHarvestLevel(\"axe\", 0);\n\t\tDiamondPlate.setHarvestLevel(\"pickaxe\", 2);\n\t\tEmeraldPlate.setHarvestLevel(\"pickaxe\", 2);\n\t\tGlowingObsidianPlate.setHarvestLevel(\"pickaxe\", 3);\n\t\tJunglePlate.setHarvestLevel(\"axe\", 0);\n\t\tSilverPlate.setHarvestLevel(\"pickaxe\", 2);\n\t\tRubyPlate.setHarvestLevel(\"pickaxe\", 2);\n\t\tSprucePlate.setHarvestLevel(\"axe\", 0);\n\n\t\t//grass and dirt\n\t\tUtils.regBlock(DirtPlate.setUnlocalizedName(\"DirtPlate\").setRegistryName(\"dirt_pressure_plate\"));\n\t\tUtils.regBlock(GrassPlate.setUnlocalizedName(\"GrassPlate\").setRegistryName(\"grass_pressure_plate\"));\n\t\t\n\t\t//special\n\t\tUtils.regBlock(DiamondPlate.setUnlocalizedName(\"DiamondPlate\").setRegistryName(\"diamond_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(EmeraldPlate.setUnlocalizedName(\"EmeraldPlate\").setRegistryName(\"emerald_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(glassPlate.setUnlocalizedName(\"GlassPlate\").setRegistryName(\"glass_pressure_plate\").setHardness(0.1F));\n\t\tUtils.regBlock(SilverPlate.setUnlocalizedName(\"SilverPlate\").setRegistryName(\"silver_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(RubyPlate.setUnlocalizedName(\"RubyPlate\").setRegistryName(\"ruby_pressure_plate\").setHardness(0.5F));\n\n\t\t//stone variants\n\t\tUtils.regBlock(MossyPlate.setUnlocalizedName(\"MossyPlate\").setRegistryName(\"mossy_cobblestone_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(CobblestonePlate.setUnlocalizedName(\"CobblestonePlate\").setRegistryName(\"cobblestone_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(AndesitePlate.setUnlocalizedName(\"AndesitePlate\").setRegistryName(\"andesite_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(DioritePlate.setUnlocalizedName(\"DioritePlate\").setRegistryName(\"diorite_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(GranitePlate.setUnlocalizedName(\"GranitePlate\").setRegistryName(\"granite_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(EndPlate.setUnlocalizedName(\"EndPlate\").setRegistryName(\"end_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(sandstonePlate.setUnlocalizedName(\"SandstonePlate\").setRegistryName(\"sandstone_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(redSandstonePlate.setUnlocalizedName(\"RedSandstonePlate\").setRegistryName(\"red_sandstone_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(VoidPlate.setUnlocalizedName(\"VoidPlate\").setRegistryName(\"void_pressure_plate\").setHardness(0.5F));\n\n\t\t//unbreakable\n\t\tUtils.regBlock(BedrockPlate.setUnlocalizedName(\"BedrockPlate\").setRegistryName(\"bedrock_pressure_plate\").setHardness(-1F).setResistance(6000000F).setBlockUnbreakable());\n\t\tUtils.regBlock(GlowingObsidianPlate.setUnlocalizedName(\"GlowingObsidianPlate\").setRegistryName(\"glowing_obsidian_pressure_plate\").setHardness(51F).setResistance(2000F).setLightLevel(.46666667F));\n\n\t\t//wooden\n\t\tUtils.regBlock(AcaciaPlate.setUnlocalizedName(\"AcaciaPlate\").setRegistryName(\"acacia_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(BirchPlate.setUnlocalizedName(\"BirchPlate\").setRegistryName(\"birch_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(CactusPlate.setUnlocalizedName(\"CactusPlate\").setRegistryName(\"cactus_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(DarkOakPlate.setUnlocalizedName(\"DarkOakPlate\").setRegistryName(\"dark_oak_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(JunglePlate.setUnlocalizedName(\"JunglePlate\").setRegistryName(\"jungle_pressure_plate\").setHardness(0.5F));\n\t\tUtils.regBlock(SprucePlate.setUnlocalizedName(\"SprucePlate\").setRegistryName(\"spruce_pressure_plate\").setHardness(0.5F));\n\t}", "protected void init(String fullName, String namespace, String systemID, int lineNr)\n/* */ {\n/* 209 */ this.fullName = fullName;\n/* 210 */ if (namespace == null) {\n/* 211 */ this.name = fullName;\n/* */ } else {\n/* 213 */ int index = fullName.indexOf(':');\n/* 214 */ if (index >= 0) {\n/* 215 */ this.name = fullName.substring(index + 1);\n/* */ } else {\n/* 217 */ this.name = fullName;\n/* */ }\n/* */ }\n/* 220 */ this.namespace = namespace;\n/* 221 */ this.line = lineNr;\n/* 222 */ this.systemID = systemID;\n/* */ }", "public Consensus(String filename, double perc) {\n\tBufferedReader input = null;\n\t// Read in the taxa information and input trees\n\ttry {\n\t input = new BufferedReader(new FileReader(filename));\n\t String line = input.readLine();\n\t StringTokenizer st;\n\t System.out.println(\"Reading taxa blocks.\");\n\t //Read in the taxa labels\n\t while (line.indexOf(\"dimensions ntax\") == -1)\n\t\tline = input.readLine();\n\t //No. of taxa\n\t noTax = Integer.parseInt(line.substring(\n\t\t\t line.indexOf(\"=\") + 1, line.indexOf(\";\")).trim());\n\t System.out.println(\"No. of taxa: \" + noTax);\n\t taxa = new String[noTax];\n\t //Random weight, used in hashcode calculation\n\t int[] weight = new int[noTax];\n\t while (line.indexOf(\"taxlabels\") == -1)\n\t\tline = input.readLine();\n\t st = new StringTokenizer(line.substring(0, line.indexOf(\";\")));\n\t st.nextToken();\n\t int count = 0;\n\t Random r = new Random();\n\t while (st.hasMoreTokens()){ \n\t\ttaxa[count] = st.nextToken();\n\t\tweight[count++] = Math.abs(r.nextInt());\n\t }\n\t //Determine hash1\n\t int low = 0;\n\t int high = primes.length;\n\t while (low + 1 < high) {\n\t\t//System.out.println(primes[(high + low) / 2] + \" High = \" +\n\t\t//\t\t high + \" Low = \" + low);\n\t\tif (primes[(high + low) / 2] < (10 * noTax)) {\n\t\t low = (high + low) / 2;\n\t\t} else {\n\t\t high = (high + low) / 2;\n\t\t}\n\t }\n\t //change from low+1 to low to avoie array index out of bound when low=length-1\n\t hash1 = primes[low];\n\t System.out.println(\"Hash1 = \" + hash1);\n\t hashTable = new Node[hash1];\n\t built = new Node[hash1];\n\n\t //Read in the input trees\n\t System.out.print(\"Start reading input trees\");\n\t trees = new Vector();\n\t while (line != null) {\n\t\tif (line.startsWith(\"tree B_\")) {\n\t\t trees.add(new BinTree(convertToID(line.substring(\n\t\t\t\t\t\t line.indexOf(\"(\"), \n\t\t\t\t\t\t line.indexOf(\";\"))),\n\t\t\t\t\t hash1, hash2, weight));\n\t\t System.out.print(\".\");\n\t\t}\n\t\tline = input.readLine();\n\t }\n\t trees.trimToSize();\n\t noTrees = trees.size();\n\t System.out.println(\"\\nNo. of trees read: \" + noTrees);\n\t thresh = noTrees * perc;\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Exception: \" + e);\n\t\te.printStackTrace();\n\t\tSystem.exit(1);\n\t} finally {\n\t try {\n\t\tinput.close();\n\t } catch (IOException ie) {\n\t\tSystem.out.println(\"Exception: \" + ie);\n\t\tie.printStackTrace();\n\t\tSystem.exit(1);\n\t }\n\t}\n }", "public Region(String chr, int start, int end, String gene) {\n this(chr, start, end, gene, 0, 0);\n }", "public CountryIO() {\r\n\t\tcountriesPath = Paths.get(\"countries.txt\");\r\n\t\tcountriesFile = countriesPath.toFile();\r\n\t\tgetCountries();\r\n\t}", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "AREA createAREA();", "private void init(String filename){\n // create product cateogries \n // hard coded key-value for this project \n productCategory.addProduct(\"book\", \"books\");\n productCategory.addProduct(\"books\", \"books\");\n productCategory.addProduct(\"chocolate\", \"food\");\n productCategory.addProduct(\"chocolates\", \"food\");\n productCategory.addProduct(\"pills\", \"medical\");\n \n // read input\n parser.readInput(filename);\n \n // addProducts\n try {\n this.addProducts(parser.getRawData());\n } catch (Exception e) {\n System.out.println(\"Check input integrity\");\n }\n \n this.generateReceipt();\n\n }", "@Override\n\tpublic List<Region> getAllRegionsByIdList(List<String> idList) {\n\t\treturn null;\n\t}", "private void loadEnvironment(String filename){\n // Code here to read from the file and set up the environment\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n String line;\n while((line = br.readLine()) != null) {\n String[] values = line.split(\",\");\n String type = values[0].replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n double x = Double.parseDouble(values[1]);\n double y = Double.parseDouble(values[2]);\n switch (type) {\n case \"Zombie\":\n Zombie zombie = new Zombie(x, y);\n this.zombies.put(zombie.getPosition(), zombie);\n break;\n case \"Sandwich\":\n Sandwich sandwich = new Sandwich(x, y);\n this.sandwiches.put(sandwich.getPosition(), sandwich);\n break;\n case \"Player\":\n this.player = new Player(x, y, Integer.parseInt(values[3]));\n break;\n case \"Treasure\":\n this.treasure = new Treasure(x, y);\n break;\n default:\n throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void addArchitectureMarkers() {\n try {\n // Get the text file\n InputStream file = getResources().openRawResource(R.raw.architecture);\n\n // Read the file to get contents\n BufferedReader reader = new BufferedReader(new InputStreamReader(file));\n String line;\n\n // Read every line of the file one line at a time\n while ((line = reader.readLine()) != null) {\n String[] architecture = line.split(\";\", 6);\n\n String architectureName = architecture[0];\n String placeID = architecture[1];\n String architectureDate = architecture[2];\n String architectureInfo = architecture[3];\n String architectureStyle = architecture[4];\n String architect = architecture[5];\n\n // Initialize Places.\n Places.initialize(getApplicationContext(), getString(R.string.google_directions_key));\n // Create a new Places client instance.\n PlacesClient placesClient = Places.createClient(this);\n // Specify the fields to return.\n List<Place.Field> placeFields = Arrays.asList(Place.Field.NAME, Place.Field.LAT_LNG,\n Place.Field.PHOTO_METADATAS);\n // Construct a request object, passing the place ID and fields array.\n FetchPlaceRequest request = FetchPlaceRequest.builder(placeID, placeFields).build();\n\n placesClient.fetchPlace(request).addOnSuccessListener((response) -> {\n Place place = response.getPlace();\n Log.i(\"TAG\", \"Place found: \" + place.getName());\n LatLng latlng = place.getLatLng();\n\n //Get the photo metadata.\n if (place.getPhotoMetadatas() == null) {\n Log.i(\"mylog\", \"no photo\");\n } else {\n //choose better default pictures for these buildings\n PhotoMetadata photoMetadata = place.getPhotoMetadatas().get(0);\n if (place.getName().equals(\"The Cube\")) {\n photoMetadata = place.getPhotoMetadatas().get(2);\n }\n if (place.getName().equals(\"Millennium Point Car Park\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"School of Art\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Saint Martin in the Bull Ring\")) {\n photoMetadata = place.getPhotoMetadatas().get(2);\n }\n if (place.getName().equals(\"Bullring & Grand Central\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Mailbox Birmingham\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"The International Convention Centre\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Birmingham Museum & Art Gallery\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n // Create a FetchPhotoRequest.\n FetchPhotoRequest photoRequest = FetchPhotoRequest.builder(photoMetadata)\n .setMaxWidth(200)\n .setMaxHeight(200)\n .build();\n\n placesClient.fetchPhoto(photoRequest).addOnSuccessListener((fetchPhotoResponse) -> {\n Bitmap bitmap = fetchPhotoResponse.getBitmap();\n // Add border to image\n Bitmap bitmapWithBorder = Bitmap.createBitmap(bitmap.getWidth() + 12, bitmap.getHeight()\n + 12, bitmap.getConfig());\n Canvas canvas = new Canvas(bitmapWithBorder);\n canvas.drawColor(Color.rgb(255, 128, 128));\n canvas.drawBitmap(bitmap, 6, 6, null);\n //Add marker onto map\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(latlng.latitude, latlng.longitude))\n .title(architectureName)\n .icon(BitmapDescriptorFactory.fromBitmap(bitmapWithBorder)));\n marker.setTag(placeID);\n String url = getUrl(currentPosition, marker.getPosition(), \"walking\");\n new FetchURL(MapsActivity.this).execute(url, \"walking\");\n //Store marker info\n markersList.add(marker);\n markerHashmap.put(marker.getTitle(), bitmap);\n architectureDateHashmap.put(marker.getTitle(), architectureDate);\n architectureInfoHashmap.put(marker.getTitle(), architectureInfo);\n architectureStyleHashmap.put(marker.getTitle(), architectureStyle);\n architectHashmap.put(marker.getTitle(), architect);\n if (markersList.size() == 34) {\n //Set camera position once all markers loaded in\n setCameraPosition(mMap, markersList);\n }\n }).addOnFailureListener((exception) -> {\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n int statusCode = apiException.getStatusCode();\n // Handle error with given status code.\n Log.e(TAG, \"Photo not found: \" + exception.getMessage());\n }\n });\n }\n }).addOnFailureListener((exception) -> {\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n int statusCode = apiException.getStatusCode();\n // Handle error with given status code.\n Log.e(\"TAG\", \"Place not found: \" + placeID + exception.getMessage());\n\n }\n });\n }\n reader.close();\n } catch (NullPointerException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void newProject() {\n\n //create the arena representation\n //populateBlocks();\n //populateSensors();\n }", "public void setRegion_id(String region_id) {\n this.region_id = region_id;\n }", "public int createMultiRegionsWithWritableSerialization(final Configuration c,\n final byte[] tableName, int numRegions) throws IOException {\n if (numRegions < 3) throw new IOException(\"Must create at least 3 regions\");\n byte [] startKey = Bytes.toBytes(\"aaaaa\");\n byte [] endKey = Bytes.toBytes(\"zzzzz\");\n byte [][] splitKeys = Bytes.split(startKey, endKey, numRegions - 3);\n byte [][] regionStartKeys = new byte[splitKeys.length+1][];\n for (int i=0;i<splitKeys.length;i++) {\n regionStartKeys[i+1] = splitKeys[i];\n }\n regionStartKeys[0] = HConstants.EMPTY_BYTE_ARRAY;\n return createMultiRegionsWithWritableSerialization(c, tableName, regionStartKeys);\n }" ]
[ "0.7252631", "0.6807382", "0.6361682", "0.6358607", "0.62506944", "0.5983189", "0.59512705", "0.5940343", "0.5898223", "0.57563734", "0.57542187", "0.5690305", "0.56781286", "0.54863507", "0.5481126", "0.5461429", "0.5417974", "0.53961533", "0.5391045", "0.53526205", "0.5347185", "0.53184724", "0.53184724", "0.53184724", "0.5282837", "0.5282837", "0.5280256", "0.5280256", "0.5280256", "0.52655685", "0.52655685", "0.52500296", "0.5247472", "0.5134304", "0.5125071", "0.5124063", "0.51206607", "0.5078409", "0.49707246", "0.4962929", "0.4959968", "0.4955585", "0.49553862", "0.49248275", "0.49120808", "0.49062926", "0.48920578", "0.48845848", "0.48788303", "0.4875757", "0.48734784", "0.48707965", "0.48678935", "0.48674858", "0.48639157", "0.48613837", "0.4860212", "0.4860212", "0.4860212", "0.4860212", "0.48541713", "0.48484492", "0.48374867", "0.48356926", "0.4832683", "0.48293048", "0.48276174", "0.4826412", "0.4820038", "0.48085952", "0.48051277", "0.47999537", "0.47899872", "0.47887102", "0.478152", "0.4781026", "0.4778827", "0.4776824", "0.47740003", "0.47615647", "0.47605556", "0.4755965", "0.47553647", "0.47419748", "0.47398883", "0.47320902", "0.47308055", "0.47229937", "0.47142577", "0.47094285", "0.4708871", "0.47064474", "0.47027344", "0.47006053", "0.47002506", "0.4693821", "0.4692352", "0.46734998", "0.46715167", "0.4671042" ]
0.76602376
0
Creation method for Arctic
private void createArctic(BufferedReader in) { try { String tempRegionName = in.readLine(); int maxStaff = Integer.parseInt(in.readLine()); int numStaff = Integer.parseInt(in.readLine()); Staff[] readStaffList = new Staff[maxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor for (int i = 0; i < numStaff; i++) { int id = Integer.parseInt(in.readLine()); //readStaffList[i] = this.searchStaffTemp(id); readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class //creates an array of initialized staff objects by searching //using the staffNum read from the file } int maxAnimals = Integer.parseInt(in.readLine()); int numAnimals = Integer.parseInt(in.readLine()); Animal[] animals = new Animal[numAnimals]; //creating a local array of Animals; for (int i = 0; i < numAnimals; i++) { animals[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine())); } regionList[this.numRegions] = new Arctic(readStaffList, animals, tempRegionName, new RegionSpec(numStaff, maxStaff, numAnimals, maxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())), Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine()), Double.parseDouble(in.readLine()), Boolean.parseBoolean(in.readLine())); //constructor call } catch (IOException iox) { System.out.println("Error reading file"); } this.numRegions++; //updates the global field numRegions }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Anuncio creaAnuncioTematico();", "@Override\n public void buildArma() {\n this.personaje.setArma(new Arma(\"Lanza\", 'A', 9));\n }", "public Artemis(){\r\n super(\"Artemis\",\r\n new StandardWinCondition(),\r\n new DoubleNoBackMove(new StandardMove()), new StandardBuild(),\r\n false,\r\n false\r\n );\r\n }", "Oracion createOracion();", "@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "public ArmorTemplate() {\n\t}", "public abstract Anuncio creaAnuncioGeneral();", "public Almacen(){}", "@Override\r\n\tpublic void creerTVA(TVA t) {\n\t\t\r\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "protected abstract void construct();", "public Airplane (){\n \n }", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public Articulo(){\r\n\t\t\r\n\t}", "public AirAndPollen() {\n\n\t}", "public Armor(String _name){\n super();\n // sets owner = _owner\n // sets posX = _posX\n // sets posY = _posY\n // sets itemIntValue = _itemIntValue\n name = _name; \n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public Aso() {\n\t\tName = \"Aso\";\n\t\ttartossag = 3;\n\t}", "protected abstract void createAttributes();", "Attribute createAttribute();", "Attribute createAttribute();", "Active_Digital_Artifact createActive_Digital_Artifact();", "private MakeACaptain() {\n }", "Traditional createTraditional();", "@Override\n\tpublic AbstractOriental createOrientale() {\n\t\treturn new OrientalSN();\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public abstract void create();", "protected Asignatura()\r\n\t{}", "public Aritmetica(){ }", "Yard createYard();", "AliciaLab createAliciaLab();", "public abstract String construct();", "private Asset() {\r\n super(IAsset.TYPE_ID);\r\n }", "public PlayerCharacter createAscio() {\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public ArbolSplay() {\n super();\n }", "public ArchiveInfo() {\n\t}", "For createFor();", "public void create() {\n\t\t\n\t}", "public TarefaResource() {\r\n }", "public Armor (String name, String description,int point)\r\n {\r\n super(name, description);\r\n setArmorPoint(point);\r\n }", "@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 interface NewLine extends ClouBausteinElement {\n\n static NewLine create(CodePosition codePosition){\n return new NewLineImpl(codePosition);\n }\n\n}", "public Cargo(){\n super(\"Cargo\");\n intake = new WPI_TalonSRX(RobotMap.cargoIntake);\n shoot = new WPI_TalonSRX(RobotMap.cargoShoot);\n }", "public Armor() {\n super();\n}", "public void create(){}", "public IRAttribute ( ) {\n\t\tsuper();\n\t}", "public Achterbahn() {\n }", "public static void createArmy() {\n Unit unitOne = new Unit(\"Unit One\");\n Unit unitTwo = new Unit(\"Unit Two\");\n Unit unitThree = new Unit(\"Unit Three\");\n Unit unitFour = new Unit(\"Unit Four\");\n Unit unitFive = new Unit(\"Unit Five\");\n\n Knight knightOne = new Knight(\"Knight One\");\n Knight knightTwo = new Knight(\"Knight Two\");\n Knight knightThree = new Knight(\"Knight Three\");\n\n General general = new General(\"General\");\n Doctor doctor = new Doctor(\"Doctor\");\n }", "void create(Artist artist);", "public AirlineCompany() {\n\t}", "Information createInformation();", "@Override\n public void construct() throws IOException {\n \n }", "public AirField() {\n\n\t}", "public abstract Anuncio creaAnuncioIndividualizado();", "public ACTable() {\r\n super();\r\n }", "private Catalog() {\r\n }", "public AvaliacaoRisco() {\n }", "public Corrida(){\n\n }", "public AncFile() {\n }", "public AVIFORS()\n {\n super();\n\n spellType = O2SpellType.AVIFORS;\n branch = O2MagicBranch.TRANSFIGURATION;\n\n flavorText = new ArrayList<String>()\n {{\n add(\"However, mastering a Transfiguration spell such as \\\"Avifors\\\" can be both rewarding and useful.\");\n }};\n\n text = \"Turns target entity in to a bird.\";\n }", "@Override\n\tpublic Army getArmy() {\n\t\treturn new IndianArmy();\n\t}", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public Imagen(){\n \n }", "protected abstract T createResource(Coordinate coord) throws VizException;", "public AI(String n) {//constructor for super class\n super(n);\n }", "Digital_Artifact createDigital_Artifact();", "public void constructor() {\n setEdibleAnimals();\n }", "QuoteAttribute createQuoteAttribute();", "public Aliases( ) {\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "abstract public Content createContent();", "Cancion createCancion();", "protected void createContents() {\n\n\t}", "private void constructACLMessage()\n {\n PlayIntroAction playIntroObject = new PlayIntroAction();\n playIntroObject.setLenght(numberOfMeasures);\n playIntroObject.setNow(true);\n playIntroObject.setDuration(-1);\n msg = new ACLMessage(ACLMessage.CFP);\n msg.setLanguage(codec.getName());\n msg.setOntology(ontology.getName());\n for(int i = 0; i < receivers.size(); i++)\n {\n try\n {\n //fill the content using the Ontology concept\n myAgent.getContentManager().fillContent(msg,new Action((AID)receivers.elementAt(i),playIntroObject));\n }catch (Exception ex) { ex.printStackTrace(); }\n //Set the receiver of the message\n msg.addReceiver((AID)receivers.elementAt(i));\n\n }\n\n //Set the protocol that we gonna use\n msg.setProtocol(FIPANames.InteractionProtocol.FIPA_CONTRACT_NET);\n //We indicate the deadline of the reply\n msg.setReplyByDate(new Date(System.currentTimeMillis() + 30000));\n\n\n }", "public Odi11SceneCatImpl() {\n }", "public void create(Alien a1) {\n\t\t\r\n\t\taliens.add(a1);\r\n\t}", "public abstract String getCreator();", "public TutorIndustrial() {}", "public Aanbieder() {\r\n\t\t}", "@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 }", "TAttribute createTAttribute();", "public CargoAirplane createRandomCargoAirplane() {\n\tthrow new RuntimeException(\"Cargo airplanes is not supported\");\n }", "@Override\n public ArbolSplay<T> clonar(){\n ArbolSplay<T> t=new ArbolSplay<T>();\n t.setRaiz(clonarAS(this.getRaiz()));\n return(t);\n }", "public Arbol(){\n\t this.esVacio=true;\n\t this.hIzq = null;\n\t this.hDer = null;\n\t}", "Compleja createCompleja();", "private void __sep__Constructors__() {}", "public Alojamiento() {\r\n\t}", "private TMCourse() {\n\t}", "Authorizor createAuthorizor();", "public ServerResponseCreateArchive() {\n }", "public AI(){\n super();\n }", "private AttributeTypeHome( )\n {\n }", "Compuesta createCompuesta();", "abstract Object build();", "public CarroResource() {\r\n }", "private KnowledgeComposition() {\r\n super(IKnowledgeComposition.TYPE_ID);\r\n }", "private ArrowRelationSerializerTeX() {\n }", "public Akari() {\n\t\tsuper(8, 8, PosValues);\n\t\tpuzzleName = \"Akari\";\n\t\treorderPuzzleList(puzzleName);\n\t\thasStaticValues(true);\n\t\tsetSpots();\n\t\tsetStaticValues(StaticValues);\n\t\tinitConstraints();\n\t\t\n\t}", "public Airline(String title) {\r\n\t\tthis.title = title;\r\n\t\tflights = new Flight[size];\r\n\t\tthis.size = 2;\r\n\t}" ]
[ "0.6519866", "0.62767786", "0.6225339", "0.6159106", "0.6140348", "0.6133988", "0.61232597", "0.6091876", "0.6010723", "0.60096616", "0.6003315", "0.59950185", "0.595844", "0.59575254", "0.5937838", "0.59209913", "0.5917209", "0.59106904", "0.5898631", "0.58900255", "0.5850477", "0.5850477", "0.58281904", "0.58212256", "0.5819602", "0.58195174", "0.57841384", "0.5761124", "0.575104", "0.5722222", "0.5705871", "0.569561", "0.56845456", "0.5678299", "0.56777465", "0.566655", "0.56595135", "0.5655884", "0.5654702", "0.56301475", "0.5607445", "0.5603039", "0.5601679", "0.5597407", "0.55958796", "0.55903834", "0.55789155", "0.5578226", "0.55759543", "0.5564704", "0.5564627", "0.5541007", "0.5532091", "0.552145", "0.5512598", "0.55119663", "0.55027324", "0.5501644", "0.54925114", "0.5488922", "0.5487327", "0.54793686", "0.54755265", "0.5473457", "0.5473137", "0.54593855", "0.54487234", "0.54392695", "0.54337424", "0.5430883", "0.5423939", "0.5412027", "0.540996", "0.5401861", "0.53942174", "0.5394011", "0.5387618", "0.5382173", "0.53814673", "0.53783137", "0.5378276", "0.537825", "0.53779006", "0.5377253", "0.5374922", "0.5373704", "0.5370193", "0.53629154", "0.5359761", "0.53540736", "0.5348993", "0.53471607", "0.5346313", "0.53435564", "0.53423434", "0.5341555", "0.53410333", "0.5329912", "0.5324143", "0.5320746" ]
0.5474664
63
Creation method for Aquarium
private void createAquarium (BufferedReader in) { try { String tempRegionName = in.readLine(); int tempMaxStaff = Integer.parseInt(in.readLine()); int tempNumStaff = Integer.parseInt(in.readLine()); Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor for (int i = 0; i < tempNumStaff; i++) { int id = Integer.parseInt(in.readLine()); //readStaffList[i] = this.searchStaffTemp(id); readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class //creates an array of initialized staff objects by searching //using the staffNum read from the file } int tempMaxAnimals = Integer.parseInt(in.readLine()); int tempNumAnimals = Integer.parseInt(in.readLine()); Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals; for (int i = 0; i < tempNumAnimals; i++) { readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine())); } RegionSpec tempSpec = new RegionSpec(tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())); regionList[numRegions] = new Aquarium(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Integer.parseInt(in.readLine())); //maybe we left out regionName in the constructor for saving and loading the files } catch (IOException iox) { System.out.println("Error reading file"); } numRegions++; //check over this /updates the global field numRegions }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Almacen(){}", "public Artemis(){\r\n super(\"Artemis\",\r\n new StandardWinCondition(),\r\n new DoubleNoBackMove(new StandardMove()), new StandardBuild(),\r\n false,\r\n false\r\n );\r\n }", "public Aanbieder() {\r\n\t\t}", "private MakeACaptain() {\n }", "public Appliance() {\n universe = SmartGridUniverse.getInstance();\n\n }", "@Override\r\n\t public void onCreate() {\n\t super.onCreate();\r\n\t ACRA.init(this);\r\n\t aaw.start();\r\n\r\n\t }", "@Override\r\n\tpublic void creerTVA(TVA t) {\n\t\t\r\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n ACRA.init(this);\n }", "@Override\n\tpublic void create () {\n\n\t}", "ASAFactory getASAFactory();", "@Override\n public void buildArma() {\n this.personaje.setArma(new Arma(\"Lanza\", 'A', 9));\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "private static final class <init> extends com.ebay.nautilus.kernel.content.\n{\n\n public EbayAppInfo create(EbayContext ebaycontext)\n {\n return new EbayAppInfoImpl(\"com.ebay.mobile\", \"4.1.5.22\", false);\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public abstract Anuncio creaAnuncioTematico();", "AliciaLab createAliciaLab();", "@Override\n\tpublic void create() {\n\n\t}", "public Aso() {\n\t\tName = \"Aso\";\n\t\ttartossag = 3;\n\t}", "public AcuityTest() {\r\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public BazaarApplicationImpl() {\r\n\t\tsuper();\r\n\r\n\t}", "public Aliases( ) {\n\t}", "public Mafia() {\n super(Side.MAFIA);\n }", "private void initApplicationAR() {\r\n // Create OpenGL ES view:\r\n int depthSize = 16;\r\n int stencilSize = 0;\r\n boolean translucent = Vuforia.requiresAlpha();\r\n\r\n mGlView = new ArGLView(this);\r\n mGlView.init(translucent, depthSize, stencilSize);\r\n\r\n mRenderer = new ArRenderer(this, vuforiaAppSession);\r\n mRenderer.setTextures(mTextures);\r\n mGlView.setRenderer(mRenderer);\r\n\r\n }", "public AddonInstaller() {\n \n }", "public void create() {\n\t\t\n\t}", "public AdAmazon(com.google.appinventor.components.runtime.ComponentContainer r9) {\n /*\n r8 = this;\n r0 = r8\n r1 = r9\n r2 = r0\n r3 = r1\n r2.<init>(r3)\n r2 = r0\n r3 = 1\n r2.f542hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r3\n r2 = r0\n java.lang.String r3 = \"AdAmazon\"\n r2.TAG = r3\n r2 = r0\n java.lang.String r3 = \"AmazonPublisherId\"\n r2.KbzcIEn6WDqjdY1QBot1TMrBwhEYy4xAUKG2cbzQ22VNohlOtuBGKUJsEeMNZyEH = r3\n r2 = r0\n android.os.Handler r3 = new android.os.Handler\n r7 = r3\n r3 = r7\n r4 = r7\n r4.<init>()\n r2.androidUIHandler = r3\n r2 = r0\n r3 = 0\n r2.havePermission = r3\n r2 = r0\n r3 = 1\n r2.B8WBXPBCF2jGfUDZZU2zV5EYdqbUBu0lAZ0THCEqYyuE8VACR9dY7rDnwBIqh64T = r3\n r2 = r0\n r3 = r1\n com.google.appinventor.components.runtime.Form r3 = r3.$form()\n r2.form = r3\n r2 = r0\n com.amazon.device.ads.AdLayout r3 = new com.amazon.device.ads.AdLayout\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = r1\n android.app.Activity r5 = r5.$context()\n com.amazon.device.ads.AdSize r6 = com.amazon.device.ads.AdSize.SIZE_320x50\n r4.<init>(r5, r6)\n r2.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r3\n r2 = r0\n com.amazon.device.ads.AdLayout r2 = r2.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME\n android.widget.LinearLayout$LayoutParams r3 = new android.widget.LinearLayout$LayoutParams\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = -1\n r6 = -2\n r4.<init>(r5, r6)\n r2.setLayoutParams(r3)\n r2 = r1\n r3 = r0\n r2.$add(r3)\n r2 = r0\n com.amazon.device.ads.AdLayout r2 = r2.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME\n r3 = r0\n r2.setListener(r3)\n r2 = r0\n r3 = 1\n r2.TestMode(r3)\n r2 = r0\n r3 = 1\n r2.RefreshAd(r3)\n r2 = r0\n com.google.appinventor.components.runtime.util.KodularContentProtection r3 = new com.google.appinventor.components.runtime.util.KodularContentProtection\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = r1\n android.app.Activity r5 = r5.$context()\n r4.<init>(r5)\n r2.kodularContentProtection = r3\n r2 = r0\n com.google.appinventor.components.runtime.util.KodularContentProtection r2 = r2.kodularContentProtection\n com.google.appinventor.components.runtime.AdAmazon$1 r3 = new com.google.appinventor.components.runtime.AdAmazon$1\n r7 = r3\n r3 = r7\n r4 = r7\n r5 = r0\n r4.<init>(r5)\n r2.setOnValidationResultListener(r3)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.AdAmazon.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }", "public Airplane (){\n \n }", "private AttendantDatabase() {}", "Reproducible newInstance();", "public QaStep() {\n\t}", "public void create(Alien a1) {\n\t\t\r\n\t\taliens.add(a1);\r\n\t}", "public abstract void create();", "public Alojamiento() {\r\n\t}", "public ApplicationCreator() {\n }", "public ArrivalQuayStub() {\n\t}", "protected Asignatura()\r\n\t{}", "@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "Active_Digital_Artifact createActive_Digital_Artifact();", "public CTematicaBienestar() {\r\n\t}", "public VITACareer()\r\n {\r\n }", "public _cls_script_13( AutomatonInstance ta,UserAccount _ua,UserInfo _ui) {\nparent = _cls_script_12._get_cls_script_12_inst( _ua,_ui);\nthis.ta = ta;\n}", "public static ArrayQueueADT create() {\n return new ArrayQueueADT();\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "Addon createAddon();", "public Magazzino() {\r\n }", "public AvaliacaoRisco() {\n }", "private MApi() {}", "ar(aq aqVar, Looper looper) {\n super(looper);\n this.a = aqVar;\n }", "public Equipas() {\r\n\t\t\r\n\t}", "public Achterbahn() {\n }", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Aa addNewAa();", "SpaceInvaderTest_initialisation createSpaceInvaderTest_initialisation();", "Oracion createOracion();", "private Aliyun() {\n\t\tsuper();\n\t}", "public QRFragment() {\n }", "CdapArtifact createCdapArtifact();", "private void _generateATa(TaInfo ta) {\n\t String id = _getId(CS_C_GRADSTUD, ta.indexInGradStud);\n writer_.startAboutSection(CS_C_TA, id);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#TeachingAssistant\", true);\t \t \t \t \n }\n writer_.addProperty(CS_P_TAOF, _getId(CS_C_COURSE, ta.indexInCourse), true);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#teachingAssistantOf\", _getId(CS_C_COURSE, ta.indexInCourse), true);\t \t \t \t \n }\n writer_.endSection(CS_C_TA);\n }", "private Arena() {}", "Petunia() {\r\n\t\t}", "public Ambulance() {\n\t}", "public Airplane() { \n\n\t\t//The Airplane constructor calls the Flyingobject constructor\n\t\tsuper();\n\n\t\t//Sets its attributes to default values\n\t\tthis.brand = \"\";\n\t\tthis.price = 0.0; \n\t\tthis.horsePower = 0; \n\t}", "private Builder() {\n super(baconhep.TTau.SCHEMA$);\n }", "public Apriori(String[] args) throws Exception {\n configure(args);\n }", "public envio() {\r\n }", "protected abstract void construct();", "public AirAndPollen() {\n\n\t}", "private Builder() {\n super(sparqles.avro.analytics.EPViewInteroperability.SCHEMA$);\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "Anywhere createAnywhere();", "public Avontool() {\n initComponents();\n }", "public PlayerCharacter createAscio() {\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public AR_v4()\n {\n super();\n loadConfig();\n setSockets();\n setName(\"GUI\");\n initGUI();\n }", "public ArangoDBVertex() {\n\t\tsuper();\n\t}", "private void createAthenaDataCatalog(Function function)\n {\n athenaDataCatalogBuilder(function.getFunctionArn()).build();\n }", "private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }", "@Override\r\n public void BuildArena() {\r\n competition.setArena(FactoryArena.buildDefaultArena());\r\n }", "public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, List<BlockPosition> paramList)\r\n/* 26: */ {\r\n/* 27: 44 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, false, true, paramList);\r\n/* 28: */ }", "public interface AprioriCorpusFactory {\n \n /**\n * Initializes and populates an a priori index with documents whos text is known to be correct.\n *\n * @param dictionary dictionary to extract data from.\n * @param suggester suggester used to navigate the dictionary.\n * @param aprioriIndex lucene index, will be created/reinitialized.\n * @param aprioriIndexField index field used to store the a priori text.\n * @param aprioriAnalyzer analyzer used to tokenize a priori text.\n * @throws IOException\n * @throws QueryException\n */\n public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;\n \n }", "@Override\n\tpublic AbstractOriental createOrientale() {\n\t\treturn new OrientalSN();\n\t}", "public FenetreAide(){\n\t\tbuild();\n\t}", "public Aritmetica(){ }", "public DetArqueoRunt () {\r\n\r\n }", "public CrearQuedadaVista() {\n }", "public SgaexpedbultoImpl()\n {\n }", "public Axe() {\n\t\t\tthis.name = \"Axe\";\n\t\t\tthis.damage = 20;\n\t\t}", "public static void createArmy() {\n Unit unitOne = new Unit(\"Unit One\");\n Unit unitTwo = new Unit(\"Unit Two\");\n Unit unitThree = new Unit(\"Unit Three\");\n Unit unitFour = new Unit(\"Unit Four\");\n Unit unitFive = new Unit(\"Unit Five\");\n\n Knight knightOne = new Knight(\"Knight One\");\n Knight knightTwo = new Knight(\"Knight Two\");\n Knight knightThree = new Knight(\"Knight Three\");\n\n General general = new General(\"General\");\n Doctor doctor = new Doctor(\"Doctor\");\n }", "private TAPosition()\n {\n\n }", "public void create(){}", "@Override\n\tpublic void createAgence(Agence a) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tAirplane a = new Airplane(\"\",1.12f,\"\",1,1,\"\",\"\");\r\n\t\t\r\n\t\t//no flexibility with our current design\r\n\t}", "private static void initSPARQLAnythingEngine() {\n\t\t// Register the JSON-LD parser factory for extension .json\n\t\tReaderRIOTFactory parserFactoryJsonLD = new RiotUtils.ReaderRIOTFactoryJSONLD();\n\t\tRDFParserRegistry.registerLangTriples(RiotUtils.JSON, parserFactoryJsonLD);\n\t\t// Setup FX executor\n\t\tJenaSystem.init();\n\t\tQC.setFactory(ARQ.getContext(), FacadeX.ExecutorFactory);\n\t}", "For createFor();", "public BrokerAlgo() {}", "public Airplane_1_View(Arena arena) {\n super(arena);\n }", "protected void setup() {\r\n \t//inizializza gli attributi dell'iniziatore in base ai valori dei parametri\r\n Object[] args = this.getArguments();\r\n \t\tif (args != null)\r\n \t\t{\r\n \t\t\tthis.goodName = (String) args[0];\r\n \t\t\tthis.price = (int) args[1];\r\n \t\t\tthis.reservePrice = (int) args[2];\r\n \t\t\tthis.dif = (int) args[3];\r\n \t\t\tthis.quantity = (int) args[4];\r\n \t\t\tthis.msWait = (int) args[5];\r\n \t\t} \t\t\r\n\r\n manager.registerLanguage(codec);\r\n manager.registerOntology(ontology);\r\n \r\n //inizializza il bene oggetto dell'asta\r\n good = new Good(goodName, price, reservePrice, quantity);\r\n \r\n //cerca ed inserisce nell'ArrayList gli eventuali partecipanti\r\n findBidders(); \r\n \r\n //viene aggiunto l'apposito behaviour\r\n addBehaviour(new BehaviourInitiator(this));\r\n\r\n System.out.println(\"Initiator \" + this.getLocalName() + \" avviato\");\r\n }", "Yard createYard();", "public void createChain(){\r\n Oscillator wt = new Oscillator(this, Oscillator.SAWTOOTH_WAVE, this.sampleRate, this.channels);\r\n Filter filt = new Filter(wt, this.filterCutoff, Filter.LOW_PASS);\r\n Envelope env = new Envelope(filt, \r\n new double[] {0.0, 0.0, 0.05, 1.0, 0.3, 0.4, 1.0, 0.0});\r\n\t\tVolume vol = new Volume(env);\r\n//\t\tSampleOut sout = new SampleOut(vol);\r\n\t}", "private Builder() {\n super(edu.pa.Rat.SCHEMA$);\n }" ]
[ "0.605015", "0.6004231", "0.59802735", "0.5785868", "0.5760508", "0.5671496", "0.5541226", "0.5506336", "0.5493391", "0.5490219", "0.5487638", "0.5484325", "0.5484099", "0.54793787", "0.54673344", "0.54479915", "0.5443142", "0.5400545", "0.53890437", "0.5382253", "0.5374663", "0.5372904", "0.5366126", "0.5351923", "0.53479576", "0.5346586", "0.53339034", "0.5329029", "0.53275365", "0.531685", "0.53076094", "0.5303461", "0.53008676", "0.52901834", "0.5257961", "0.52578795", "0.5253793", "0.5249878", "0.52402085", "0.522642", "0.52064604", "0.5167538", "0.516565", "0.51638395", "0.51438683", "0.51435333", "0.5143029", "0.5142789", "0.5137796", "0.5127082", "0.5120618", "0.5117264", "0.5116377", "0.51088953", "0.51083523", "0.51016414", "0.51012367", "0.51006556", "0.5097449", "0.509436", "0.5089688", "0.5086345", "0.508398", "0.507364", "0.5072139", "0.5071938", "0.50650114", "0.5064435", "0.5057081", "0.5056581", "0.50531715", "0.504618", "0.504235", "0.5041671", "0.5039168", "0.5035511", "0.5028795", "0.5027399", "0.50231725", "0.5012506", "0.5010783", "0.500791", "0.5007846", "0.5006168", "0.5004163", "0.50022584", "0.50005174", "0.49984866", "0.4998101", "0.4989461", "0.498536", "0.4970601", "0.49626476", "0.4961235", "0.49602383", "0.49594355", "0.49539873", "0.4946636", "0.49445298", "0.49440864" ]
0.57226074
5
createAquarium method Using a species name, it returns the Animal object with a matching name / findAnimalZoo finds the Animal given species
public Animal findAnimalZoo(String species) { for (int i = 0; i < numRegions; i++) { Animal[] temp = regionList[i].getRegionAnimals(); //regionList[i].getAnimalList(); @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ NO GETANIMALIST METHOD YET@@@@@@@@@@@@@@@@@@@@@@@@@ for (int j = 0; j < regionList[i].getRegionSpec().getNumAnimals(); j++) { if (temp[j].getSpecies().equals(species)) { return temp[i]; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createAnimals() {\n\t\tanimals = new Animal[noAnimals];\n\n\t\tfor (int i = 0; i < noAnimals; i++) {\n\t\t\tanimals[i] = new Animal(noAnimals);\n\t\t\tanimals[i].setDiffCo(diffCo[i]);\n\t\t\tanimals[i].setDiffusionRate(diffusionRate[i]);\n animals[i].initiateDensities(getIo().getNeighbours().length,getIo().getNeighbours()[0].length);\n\t\t}\n\t\n\t\t animals[0].setName(\"Hare\"); \n\t\t animals[1].setName(\"Puma\");\n\t}", "public Animal(String name) {\r\n this.animalName = name;\r\n }", "private void createAquarium (BufferedReader in) { \n try {\n String tempRegionName = in.readLine();\n int tempMaxStaff = Integer.parseInt(in.readLine());\n int tempNumStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[tempMaxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor\n \n for (int i = 0; i < tempNumStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int tempMaxAnimals = Integer.parseInt(in.readLine());\n int tempNumAnimals = Integer.parseInt(in.readLine());\n \n Animal[] readAnimalList = new Animal[tempMaxAnimals]; //creating a local array of Animals;\n \n for (int i = 0; i < tempNumAnimals; i++) {\n readAnimalList[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n RegionSpec tempSpec = new RegionSpec(tempNumStaff, tempMaxStaff, tempNumAnimals, tempMaxAnimals, Integer.parseInt(in.readLine()), \n Double.parseDouble(in.readLine()));\n \n regionList[numRegions] = new Aquarium(readStaffList, readAnimalList, tempRegionName, tempSpec, Integer.parseInt(in.readLine()), \n Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()), Boolean.parseBoolean(in.readLine()),\n Integer.parseInt(in.readLine()));\n //maybe we left out regionName in the constructor for saving and loading the files\n \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n numRegions++; //check over this /updates the global field numRegions\n \n \n }", "public static Animal getByName(String name) {\n for(var animal : animals){\n if(animal.getName().equalsIgnoreCase(name))\n return animal;\n }\n return null;\n\n //Diffrent way of finding the animal\n /*return animals.stream()\n .filter(a -> a.getName().equalsIgnoreCase(name))\n .findAny()\n .orElse(null);*/\n }", "public static void createArmy() {\n Unit unitOne = new Unit(\"Unit One\");\n Unit unitTwo = new Unit(\"Unit Two\");\n Unit unitThree = new Unit(\"Unit Three\");\n Unit unitFour = new Unit(\"Unit Four\");\n Unit unitFive = new Unit(\"Unit Five\");\n\n Knight knightOne = new Knight(\"Knight One\");\n Knight knightTwo = new Knight(\"Knight Two\");\n Knight knightThree = new Knight(\"Knight Three\");\n\n General general = new General(\"General\");\n Doctor doctor = new Doctor(\"Doctor\");\n }", "public Animal(String name){\n\n this.name = name;\n //array2.add(new String(name2));\n }", "public Army(String a){\n\t\tint[] stat = new int[6];\n\t\tString name=\"\";\n\t\tint cnt=0;\n\t\twhile(a.length()>0){\n\t\t\twhile(a.indexOf(\"**\")>a.indexOf(\"*\")){\n\t\t\t\tif(a.indexOf(\" \")<a.indexOf(\"*\")&&a.indexOf(\" \")!=-1){\n\t\t\t\t\tname=a.substring(0,a.indexOf(\"*\"));\n\t\t\t\t\ta=a.substring(a.indexOf(\"*\"));\n\t\t\t\t}\n\t\t\t\ta=a.substring(1);\n\t\t\t\tstat[cnt]=Integer.parseInt(a.substring(0,a.indexOf(\"*\")));\n\t\t\t\ta=a.substring(a.substring(0,a.indexOf(\"*\")).length());\n\t\t\t\tcnt++;\t\t\t\t\t\n\t\t\t}\n\t\t\tcnt=0;\n\t\t\ta=a.substring(2);\n\t\t\tarmy.add(new Soldier(name,stat));\n\t\t\tstat=new int[6];\n\t\t}\n\t}", "private static void searchAnimalByName() {\n\t\tshowMessage(\"type in the animal's name: \\n\");\n\t\t\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listAnimal(AnimalSearch.byName(name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n\t\t//if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchAnimalByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t\t\n\t}", "private void createArmy(int size)\n {\n for(int i = 0; i < size; i++)\n {\n int rando = Randomizer.nextInt(10) + 1;\n if(rando < 6 )\n {\n army1.add(new Human());\n } \n else if(rando < 8)\n {\n army1.add(new Dwarf());\n \n }\n else if (rando < 10)\n {\n army1.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army1.add(new Demon()); \n }\n else if(rando == 2)\n {\n army1.add(new CyberDemon());\n }\n else\n {\n army1.add(new Balrog());\n }\n }\n \n rando = Randomizer.nextInt(10) + 1;\n if(rando < 6)\n {\n army2.add(new Human());\n }\n else if (rando < 8)\n {\n army2.add(new Dwarf());\n }\n else if (rando < 10)\n {\n army2.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army2.add(new Demon()); \n }\n else if(rando == 2)\n {\n army2.add(new CyberDemon());\n }\n else\n {\n army2.add(new Balrog());\n }\n } \n }\n \n \n \n \n \n }", "public Artist getByName(String name);", "public Army(int i,String a){\n\t\tswitch(a){\n\t\t\tcase(\"Soldier\"):\t\t\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Soldier());\n\t\t\t\tbreak;\n\t\t\tcase(\"Goblin\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Goblin());\n\t\t\t\tbreak;\n\t\t\tcase(\"Orc\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Orc());\n\t\t\t\tbreak;\n\t\t\tcase(\"Ogre\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Ogre());\n\t\t\t\tbreak;\n\t\t\tcase(\"Greenskins\"):\n\t\t\t\tfor(int n=0;n<5;n++)\n\t\t\t\t\tarmy.add(new Ogre());\n\t\t\t\tfor(int n=0;n<20;n++)\n\t\t\t\t\tarmy.add(new Orc());\n\t\t\t\tfor(int n=0;n<75;n++)\n\t\t\t\t\tarmy.add(new Goblin());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Soldier());\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void initiateZoo(String name, int width, int height,\n Map<String, Specie> species)\n throws IncorrectDimensionsException, EmptyNameException, IOException {\n if (name.trim().equals(\"\")) {\n throw new EmptyNameException(\n this.option.getZooBundle().getString(\"EMPTY_NAME\"));\n } else {\n this.name = name;\n }\n if (width < 1 || height < 1) {\n throw new IncorrectDimensionsException(\n this.option.getZooBundle().getString(\"INCORRECT_DIMENSIONS\"));\n } else {\n this.width = width;\n this.height = height;\n }\n paddocks = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n keepers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n this.species = species;\n this.age = this.initAge;\n this.monthsPerEvaluation = initMonthsPerEvaluation;\n this.horizon = initHorizon;\n }", "@Test\n void shouldAddAnimalToZooPreservingPreExisting() {\n // given\n Zoo zoo = new Zoo();\n\n // when\n zoo.addAnimal(RAT_ROBERT);\n\n // then\n AnimalAssertions.assertThat(zoo.showAnimals().get(0))\n .hasName(\"Robert\")\n .isSpecies(\"rat\")\n .makes(\"Piii\")\n .weightsGrams(300);\n }", "public EnquirerAnimals() {\r\n database = new TreeMap<>();\r\n bc = new BaseConhecimento();\r\n bc.setScenario(\"animals\");\r\n String[] animais_aux = bc.listaNomes();\r\n \r\n perguntas = new ArrayList<>();\r\n animais = new ArrayList<>();\r\n \r\n animais.addAll(Arrays.asList(animais_aux));\r\n \r\n \r\n \r\n //Monta database com perguntas, animais e respectivas respostas\r\n for (String animal : animais) {\r\n obj = bc.recuperaObjeto(animal);\r\n database.put(animal, new TreeMap<String,Boolean>());\r\n \r\n for (IDeclaracao decl = obj.primeira(); decl != null; decl = obj.proxima()){\r\n \r\n String perguntaAtual = decl.getPropriedade(); // pega pergunta\r\n String resp = decl.getValor(); // Pega resposta da pergunta atual\r\n \r\n QuestionInfo atual = new QuestionInfo(perguntaAtual);\r\n if (!perguntas.contains(atual))\r\n perguntas.add(atual); //Cria QuestionInfo da pergutnta atual;\r\n \r\n if (resp.equalsIgnoreCase(\"sim\"))\r\n database.get(animal).put(perguntaAtual, true);\r\n else //Respondeu nao\r\n database.get(animal).put(perguntaAtual, false);\r\n }\r\n }\r\n \r\n \r\n for (QuestionInfo pergunta : perguntas)\r\n pergunta.novoEquilibrio();\r\n }", "public static Animal getAnimal(AnimalType type){\n switch(type){\n case TIGER:\n return new Tiger();\n case DOG:\n return new Dog();\n case CAT:\n return new Cat();\n }\n return null;\n }", "public void addAnimals() throws IOException {\n\t\tint b = 0;\n\t\tint c = 0;\n\t\tint a = 0;\n\t\tArrayList<GameObjects> animals = new ArrayList<GameObjects>();\n\t\tRandom rand = new Random();\n\t\twhile(b<bigFish) {\n\t\t\tanimals.add(new BigFish(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth/2))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tb+=1;\n\t\t}\n\t\twhile(c<crab) {\n\t\t\tanimals.add(new Crab(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tc+=1;\n\t\t}\n\t\twhile(a<algae) {\n\t\t\tanimals.add(new Algae(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\ta+=1;\n\t\t}\n\n\t\tanimals.add(new BigFish(frameWidth, frameHeight));\n\t\tanimals.add(new Crab(frameWidth, frameHeight));\n\t\tanimals.add(new Algae(frameWidth, frameHeight));\n\n\t\tthis.objects = animals;\n\t}", "public Animal getRandomAnimal() {\n //Randomize all characteristics of an animal\n int spc = (int) Math.round(rd.nextDouble() * (Animal.enumSpecies.values().length - 1));\n boolean isPet = rd.nextBoolean();\n\n //Construct an animal with random characteristic\n //Animal(int age, Gender g, BodyType b, enumSpecies espec, boolean ispet)\n A = new Animal(Animal.enumSpecies.values()[spc], isPet);\n return A;\n }", "public Archangel buscarName(String name){\n\tboolean val = false;\n Archangel angel = null;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\tif(arch[i].getName().equalsIgnoreCase(name)){\n\t\t\tangel = arch[i];\n\t\t\tval = true;\n\t\t}\n\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t\t}\n\t\nreturn angel;\n\n}", "public static void main(String[] args) {\n Animal zebra=new Animal(\"Pol\", \"Male\", 11, \"Zebra\");\n zebra.sleep();\n zebra.walk();\n zebra.eat();\n \n Animal giraffe=new Animal(\"Necky\",\"Female\",23,\"Giraffe\");\n giraffe.sleep();\n giraffe.walk();\n giraffe.eat();\n \n \n}", "public static void main(String[] args) {\n Animal a1 = new Animal();\n \n //objeto animal parametrizado\n Animal a2 = new Animal(LocalDate.of(2020, 6, 4), \"Saphi\", Animal.Tipo.GATO, 400, Animal.Estado.DURMIENDO);\n \n //imprimir a1 y a2\n System.out.println(\"Animal a1:\\n \" + a1.toString());\n System.out.println(\"Animal a2:\\n \" + a2.toString());\n \n \n //clonar a2 en a3\n Animal a3 = Animal.clonar(a2);\n System.out.println(\"Animal a3:\\n\" + a3.toString());\n \n //contador de instancias\n System.out.println(\"N de instancias: \" + Animal.getContadorInstancias());\n \n //creacion de dos personas\n Persona p1 = new Persona(\"Juan\", 33);\n Persona p2 = new Persona(\"Alba\", 21);\n \n //p1 despierta a los animales\n p1.llamar(a1);\n p1.llamar(a2);\n p1.llamar(a3);\n\n //p2 juega con a2 12m min\n p2.jugar(a2, 120);\n System.out.println(\"Peso de a2 despues de jugar con p2: \" + a2.getGramos());\n \n \n //p1 alimenta a a1 1000 gramos, nuevo peso\n p1.alimentar(a1, 1000);\n System.out.println(\"Peso de a1 despues de comer: \" + a1.getGramos());\n \n //FALTA CONTROLAR EXCEPCION\n \n //p1 juega con a1 200 min, nuevo peso\n// p1.jugar(a1, 200);\n// System.out.println(\"El animal a1 pesa \" + a1.getGramos() + \" después de jugar\");\n \n \n }", "public static void main(String[] args) {\n\t\tZoo zoo = new Zoo();\n\t\tAnimal a = new Zebra(\"Florin\");\n\t\tAnimal a2= new Zebra (\"Maricica\");\n\t\t\n\t\tAnimal a3 = new Giraffe(\"FruFru\");\n\t\tAnimal a4 = new Giraffe(\"FriFri\");\n\t\t\n\t\t\n\t\tzoo.adaugaAnimal(a);\n\t\tzoo.adaugaAnimal(a2);\n\t\t\n\t\tzoo.adaugaAnimal(a3);\n\t\tzoo.adaugaAnimal(a4);\n\t\t\n\t\tzoo.hranesteAnimale();\n\t\tzoo.mutareAnimale();\n\n\t}", "private Animal criarAnimal(JTextField textNomePet, JTextField textEspecie, JTextField textRaca, JComboBox cbDonos,\n\t\t\tJTextField textPeso, JFormattedTextField textDataN) {\n\t\treturn null;\n\t}", "public Animal(String hewan, int x, int y) {\n switch (hewan) {\n case \"Bekantan\": {\n name = \"Bekantan\";\n habitat = \"Land\";\n weight = 50;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Fruit\";\n legs = 2;\n content = 'A';\n suara = \"Uuuuuuuu\";\n break;\n }\n case \"BurungHantu\": {\n name = \"Burung Hantu\";\n habitat = \"Air\";\n weight = 2;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Meat\";\n legs = 2;\n content = 'B';\n suara = \"Kur kur kur\";\n break;\n }\n case \"Codot\": {\n name = \"Codot\";\n habitat = \"Air\";\n weight = (float) 0.5;\n type = \"Herbivore\";\n tamed = false;\n diet = \"Fruit\";\n legs = 2;\n content = 'C';\n suara = \"Cit cit cit\";\n break;\n }\n case \"Elang\": {\n name = \"Elang\";\n habitat = \"Air\";\n weight = 3;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 2;\n content = 'D';\n suara = \"Koak koakk koakk\";\n break;\n }\n case \"Gajah\": {\n name = \"Gajah\";\n habitat = \"Land\";\n weight = 3500;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Leaf\";\n legs = 4;\n content = 'E';\n suara = \"Ngoett\";\n break;\n }\n case \"Gorilla\": {\n name = \"Gorilla\";\n habitat = \"Land\";\n weight = 200;\n type = \"Herbivore\";\n tamed = false;\n diet = \"Fruit\";\n legs = 2;\n content = 'C';\n suara = \"Huhahuha\";\n break;\n }\n case \"Harimau\": {\n name = \"Harimau\";\n habitat = \"Land\";\n weight = 450;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 4;\n content = 'G';\n suara = \"Roarrrr\";\n break;\n }\n case \"Hiu\": {\n name = \"Hiu\";\n habitat = \"Water\";\n weight = 100;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Meat\";\n legs = 0;\n content = 'H';\n suara = \"Shush shush\";\n break;\n }\n case \"IkanTerbang\": {\n name = \"Ikan Terbang\";\n habitat = \"Water\";\n weight = 2;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Insect\";\n legs = 0;\n content = 'I';\n suara = \"Cepok cepok cepok\";\n break;\n }\n case \"Jerapah\": {\n name = \"Jerapah\";\n habitat = \"Land\";\n weight = 500;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Leaf\";\n legs = 4;\n content = 'J';\n suara = \"Ngoet ngoet\";\n break;\n }\n case \"Kancil\": {\n name = \"Kancil\";\n habitat = \"Land\";\n weight = 60;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Leaf\";\n legs = 4;\n content = 'K';\n suara = \"Ngik ngik ngik\";\n break;\n }\n case \"Kepik\": {\n name = \"Kepik\";\n habitat = \"Air\";\n weight = (float) 0.01;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Nectar\";\n legs = 6;\n content = 'L';\n suara = \"Krik krik krik\";\n break;\n }\n case \"Kepiting\": {\n name = \"Kepiting\";\n habitat = \"Water\";\n weight = 1;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 10;\n content = 'M';\n suara = \"Kuikk kuikk\";\n break;\n }\n case \"KumbangHutan\": {\n name = \"Kumbang Hutan\";\n habitat = \"Air\";\n weight = (float) 0.05;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Nectar\";\n legs = 6;\n content = 'N';\n suara = \"Kruk kruk kruk\";\n break;\n }\n case \"KupuKupu\": {\n name = \"KupuKupu\";\n habitat = \"Air\";\n weight = (float) 0.03;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Nectar\";\n legs = 6;\n content = 'O';\n suara = \"Wir wir\";\n break;\n }\n case \"Lobster\": {\n name = \"Lobster\";\n habitat = \"Water\";\n weight = (float) 0.5;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 10;\n content = 'P';\n suara = \"Crek crek crek\";\n break;\n }\n case \"LumbaLumba\": {\n name = \"Lumba lumba\";\n habitat = \"Water\";\n weight = 100;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 0;\n content = 'Q';\n suara = \"Cet cet cet\";\n break;\n }\n case \"MacanTutul\": {\n name = \"Macan Tutul\";\n habitat = \"Land\";\n weight = 350;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Meat\";\n legs = 4;\n content = 'R';\n suara = \"Aummmm\";\n break;\n }\n case \"OwaOwa\": {\n name = \"OwaOwa\";\n habitat = \"Land\";\n weight = 70;\n type = \"Herbivore\";\n tamed = true;\n diet = \"Fruit\";\n legs = 2;\n content = 'S';\n suara = \"Huhuhuhu\";\n break;\n }\n case \"PausSperma\": {\n name = \"Paus Sperma\";\n habitat = \"Water\";\n weight = 7000;\n type = \"Omnivore\";\n tamed = true;\n diet = \"Plankton\";\n legs = 0;\n content = 'T';\n suara = \"Srosh srosh\";\n break;\n }\n case \"Piranha\": {\n name = \"Piranha\";\n habitat = \"Water\";\n weight = (float) 0.7;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 0;\n content = 'U';\n suara = \"Kraus kraus\";\n break;\n }\n case \"Platypus\": {\n name = \"Platypus\";\n habitat = \"Land and Water\";\n weight = 5;\n type = \"Carnivore\";\n tamed = true;\n diet = \"Insect\";\n legs = 4;\n content = 'V';\n suara = \"Krr krr\";\n break;\n }\n case \"Singa\": {\n name = \"Singa\";\n habitat = \"Land\";\n weight = 400;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 4;\n content = 'W';\n suara = \"Groarrr\";\n break;\n }\n case \"SingaLaut\": {\n name = \"Singa Laut\";\n habitat = \"Water\";\n weight = 70;\n type = \"Carnivore\";\n tamed = false;\n diet = \"Meat\";\n legs = 0;\n content = 'X';\n suara = \"Ou ou ou\";\n break;\n }\n default: {\n name = \"NULL\";\n habitat = \"NULL\";\n weight = 0;\n type = \"NULL\";\n tamed = false;\n diet = \"NULL\";\n legs = 0;\n content = '-';\n suara = \"NULL\";\n break;\n }\n }\n fodder = (float) 0.025 * weight;\n locX = x;\n locY = y;\n nAnimal++;\n consumerate += fodder;\n }", "public void placeAnimal(AnimalSol animal, String where) {\n for (int i = 0; i < myAnimals.length; i++) {\n if (null == myAnimals[i]) {\n myAnimals[i] = animal;\n animal.square = where;\n animal.position = this;\n nrAnimals++;\n return;\n } else if (animal == myAnimals[i]) {\n throw new RuntimeException(\"Animal \" + animal + \" already placed :(\");\n }\n }\n }", "@Override\n public void initiateZoo(String name, int width, int height,\n Map<String, Specie> species, int age, int monthsPerEvaluation, int horizon)\n throws IncorrectDimensionsException, EmptyNameException, IOException {\n if (name.trim().equals(\"\")) {\n throw new EmptyNameException(\n this.option.getZooBundle().getString(\"EMPTY_NAME\"));\n } else {\n this.name = name;\n }\n if (width < 1 || height < 1) {\n throw new IncorrectDimensionsException(\n this.option.getZooBundle().getString(\"INCORRECT_DIMENSIONS\"));\n } else {\n this.width = width;\n this.height = height;\n }\n paddocks = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n keepers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n this.species = species;\n this.age = age;\n this.monthsPerEvaluation = monthsPerEvaluation;\n this.horizon = horizon;\n }", "Heaver findByName(String name);", "public Animal reproduce(final Cell location) {\n return new Herbivore(location);\n }", "public static void main(String a[]) {\n\t\tArtistRegistry registry = new ArtistRegistry();\n\t\tArtist artist = registry.getPrototype(\"maleAnchor\");\n\n\t\t// Set his name\n\t\tartist.setName(\"Batista\");\n\n\t\t// display the custom artist made , client just had to set the name!\n\t\tSystem.out.println(artist);\n\n\t\t// Another example\n\t\t// Let's create a new prototype from existing prototype and add it to registry\n\n\t\tArtist femaleArtist = registry.getPrototype(\"femaleModelNoExperience\");\n\t\tfemaleArtist.setField(\"cinema\");\n\n\t\t// we have created a new prototype model who is female, has no experience and\n\t\t// tagged to cinema field\n\t\t// Now lets add this prototype to registry\n\t\t\n\t\tregistry.addPrototype(femaleArtist, \"femaleCinemaFresh\");\n\t\t\n\t\t\n\t\t//Now lets get the prototype again and assign a name and age \n\t\t\n\t\tArtist femaleCineArtist = registry.getPrototype(\"femaleCinemaFresh\");\n\t\t\n\t\tfemaleCineArtist.setAge(22);\n\t\tfemaleCineArtist.setName(\"Rithika\");\n\t\t\n\t\tSystem.out.println(femaleCineArtist);\n\t\t\n\n\t}", "public static void main(String[] args) {\n Artefact umbrella = new Artefact(3,5,\"umbrella\",0); // princess umbrella\r\n System.out.println(\"--Umbrella-- \\n\"+umbrella);\r\n\r\n // create sample artefacts that hurts Mario (ex. barrel, fire barrel, cement tins)\r\n Artefact barrel = new Artefact(6,7,\"barrel\",2);\r\n System.out.println(\"\\n--Barrel-- \\n\"+barrel);\r\n barrel.setPositionY(5);\r\n System.out.println(\"\\n--Barrel after moving left 2 places-- \\n\"+barrel);\r\n\r\n Artefact fireBall = new Artefact(6,2,\"ball\",6);\r\n System.out.println(\"\\n--Fire Ball-- \\n\"+fireBall);\r\n System.out.println(\"\\nFire Ball boosted points = \" + fireBall.getPoints(true));\r\n fireBall.destroyed();\r\n //since destruction sets shape to null it would not appear\r\n System.out.println(\"\\n--Fire Ball after destruction-- \\n\"+fireBall);\r\n\r\n\r\n //STRUCTURES\r\n\r\n //create sample structure for mario to climb up\r\n Structures stair = new Structures(3,3,\"rectangular\", 2, true);\r\n System.out.println(\"\\n--Stairs-- \\n\"+stair);\r\n\r\n\r\n //PLAYERS\r\n //create a new player\r\n MarioPlayers mario1 = new MarioPlayers(\"mario1\");\r\n System.out.println(\"\\n--Player 1-- \\n\"+mario1);\r\n\r\n //saved player\r\n MarioPlayers mario2 = new MarioPlayers(\"mario2\", 8, 1450, 3);\r\n System.out.println(\"\\n--Player 2-- \\n\"+mario2);\r\n\r\n\r\n //OTHER TESTS\r\n\r\n //Checking that abstract method cannot be instantiated and causes error\r\n //Objects error = new Objects(5,5,\"x\");\r\n //System.out.println(\"\\n--Error-- \\n\"+error);\r\n }", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "@Override\n public Animal createAnimal() {\n return new Monkey();\n }", "AnimalSpecific(String category,String name,String type){\n\t\tsuper(category);\n\t\tanimalName = name;\n\t\tanimalType = type;\n\t}", "abstract public Hamburger creatHamburger(String type);", "public static void main(String[] args) {\n\t\tString animalType = args[0];\n\t\t\n\t\t//Creating object of Animal Factory\n\t\tAnimalFactory animalFactory = new AnimalFactory();\n\t\t\n\t\t//Creating animal of type passed in command line\n\t\tAnimal animal = animalFactory.createAnimal(animalType);\n\t\tanimal.eat();\n\t}", "public void exerciseAnimals() {\n System.out.println(\"Letting the animals get their exercise...\\n\");\n for (int i = 0; i < zoo.length; i++){\n zoo[i].roam();\n }\n System.out.println();\n }", "public AnimalBuilder setName(String name) {\n\t\tthis.name=name;\n\t\treturn this;\n\t}", "public static void main(String[] args) {\n Animal myAnimal = new Animal();\n myAnimal.animalSound();\n\n myAnimal = new Dog();\n myAnimal.animalSound();\n\n myAnimal = new Cat();\n myAnimal.animalSound();\n\n }", "@Test\n public void testGetAnimal1() {\n Color color = Color.RED;\n Species species = Species.GAZELLE;\n Pieces inv = new Pieces();\n Animal expResult = new Animal(species, color);\n Animal result = inv.getAnimal(color, species);\n assertEquals(expResult, result);\n }", "private Army inputArmy (WarPlayer player) {\n Army army = null;\n try {\n army = player.newArmy(((WarStrategy)player.getStrategy()).inputArmySize());\n } catch(NotEnoughWarriorsException e) {\n System.out.println(\" Not enough warriors to ceate this army\");\n } catch(EmptyArmyException e) {\n System.out.println(\" Unfortunately you have 0 warriors, you can not create an army.\");\n }\n return army;\n }", "public static void main(String[] args) {\n\t\tAnimals an = new Animals();\r\n\t\tan.eat();\r\n\t\tan.similar();\r\n\t\tan.sound();\r\n\t\t\r\n\t\t//creating object for Dog class based on Animals class\r\n\t\tAnimals d = new Dog();\r\n\t\td.sound();\r\n\t\td.eat();\r\n\t\t\r\n\t\t//creating object for CAT class based on Animals class.\r\n\t\tAnimals c = new Cat();\r\n\t\tc.sound();\r\n\t\tc.eat();\r\n\t\t\r\n\t\t\r\n\t}", "public void setAnimalName(java.lang.String param) {\n localAnimalNameTracker = true;\n\n this.localAnimalName = param;\n }", "public Animal(String tipo){\n\t\tthis.tipo = tipo;\n\t}", "public boolean removeAnimal(String name);", "public static void main(String... args) {\n Mammal mammal = new Mammal();\n mammal.getName();\n Bird bird = new Bird();\n bird.getName();\n\n System.out.println(\"showAnimal(AbstractAnimal abstractAnimal) \");\n showAnimal(mammal);\n showAnimal(bird);\n }", "public Artefact createArtefact(final String name) {\n\t\tfinal Artefact old = artefacts.get(name);\n\t\tif (old != null)\n\t\t\tthrow new IllegalArgumentException(\"Artefact '\" + name + \"' already exists: \" + old);\n\n\t\tfinal Artefact a = new Artefact(name);\n\t\tartefacts.put(a.getName(), a);\n\t\treturn a;\n\t}", "public static void main(String[] args) {\n\t\tAnimal humanoid = AnimalFactory.getAnimal(new HumanFactory(\"Model MK23\", \"Artificial Intelligence\"));\r\n\t\tAnimal cutedog = AnimalFactory.getAnimal(new DogFactory(\"Cute Model MC3\", \"Life long friend\"));\r\n\t\tSystem.out.println(\"AbstractFactory Human Properties => \" + humanoid);\r\n\t\tSystem.out.println(\"AbstractFactory Dog Properties => \" + cutedog);\r\n\t}", "public static void main(String[] args) {\n Animal unAnimalRavioso = new Animal();\n System.out.println(unAnimalRavioso.informaEnergia());\n\n //Al objeto le digo que corra\n unAnimalRavioso.correr();\n\n //Imprimo la energia\n System.out.println(unAnimalRavioso.informaEnergia());\n\n Comida unPaty = new Comida();\n unPaty.setEnergia(120);\n System.out.println(unPaty.getEnergia());\n\n System.out.println(\"Energia antes de comer paty \" + unAnimalRavioso.informaEnergia());\n unAnimalRavioso.comer(unPaty);\n\n System.out.println(\"Energia despues de comer paty \" + unAnimalRavioso.informaEnergia());\n\n Perro perroCobarde = new Perro();\n perroCobarde.hacerRuido();\n\n Gato gatoCobarde = new Gato();\n ArrayList<Animal>animales = new ArrayList<>();\n\n animales.add(perroCobarde);\n animales.add(gatoCobarde);\n\n System.out.println(\"hacer ruido animales\");\n for (Animal unAnimal:animales) {\n unAnimal.hacerRuido();\n }\n\n\n\n }", "private void seeAnimal() {\n\r\n\t}", "public void addAnimal(int index, Animal a) {\n\t\tanimals.add(a);\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tBear polarbear = new Bear();\r\n\t\tBear panda = new Bear();\r\n\t\tBear sunbear = new Bear();\r\n\t\tBear grizzlybear = new Bear();\r\n\t\tBear slothbear = new Bear();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Polar Bear\");\r\n\t\tpolarbear.printSpec();\r\n\t\t\r\n\t\tSystem.out.println(\"Giant Panda\");\r\n\t\tpanda.printSpec();\r\n\t\t\r\n\t\tSystem.out.println(\"Sun Bear\");\r\n\t\tsunbear.printSpec();\r\n\t\t\r\n\t\tSystem.out.println(\"Grizzly Bear\");\r\n\t\tgrizzlybear.printSpec();\r\n\t\t\r\n\t\tSystem.out.println(\"Sloth Bear\");\r\n\t\tslothbear.printSpec();\r\n\t\t\r\n\r\n}", "Species getSpeciesById(int index);", "public abstract void eat(String foodName);", "public com.outlook.octavio.armenta.ws.SOAPServiceStub.CreateAnimalResponse createAnimal(\n com.outlook.octavio.armenta.ws.SOAPServiceStub.CreateAnimal createAnimal10)\n throws java.rmi.RemoteException {\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n try {\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());\n _operationClient.getOptions()\n .setAction(\"http://tempuri.org/ISOAPService/CreateAnimal\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n addPropertyToOperationClient(_operationClient,\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\n \"&\");\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n\n env = toEnvelope(getFactory(_operationClient.getOptions()\n .getSoapVersionURI()),\n createAnimal10,\n optimizeContent(\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\n \"createAnimal\")),\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\n \"CreateAnimal\"));\n\n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n\n java.lang.Object object = fromOM(_returnEnv.getBody()\n .getFirstElement(),\n com.outlook.octavio.armenta.ws.SOAPServiceStub.CreateAnimalResponse.class);\n\n return (com.outlook.octavio.armenta.ws.SOAPServiceStub.CreateAnimalResponse) object;\n } catch (org.apache.axis2.AxisFault f) {\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n\n if (faultElt != null) {\n if (faultExceptionNameMap.containsKey(\n new org.apache.axis2.client.FaultMapKey(\n faultElt.getQName(), \"CreateAnimal\"))) {\n //make the fault by reflection\n try {\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\n faultElt.getQName(), \"CreateAnimal\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\n //message class\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\n faultElt.getQName(), \"CreateAnimal\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,\n messageClass);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[] { messageClass });\n m.invoke(ex, new java.lang.Object[] { messageObject });\n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n } catch (java.lang.ClassCastException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n } else {\n throw f;\n }\n } else {\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender()\n .cleanup(_messageContext);\n }\n }\n }", "public static void function(Animal a){\n a.eat();\n if (a instanceof Cat){//instanceof 判断指向类型\n Cat c =(Cat)a;\n c.catchMouse();\n }\n else if(a instanceof Dog){\n Dog d =(Dog) a;\n d.kanjia();\n }\n\n }", "public static com.nowcoder.Animal getAnimal(int type) {\n return new com.nowcoder.Human(\"Lei\", 22, \"CN\");\n }", "public Bazaar findBazaar(@NotNull final Identifier identifier) throws BazaarNotFoundException, BazaarException;", "public Album getAlbumByName(String name){\n\t\tAlbum album = null;\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM Album WHERE Name = ?;\";\n\t\t\tPreparedStatement statement = connection.prepareStatement(sql);\n\t\t\tstatement.setString(1, name);\n\t\t\tResultSet set = statement.executeQuery();\n\t\t\tif (set.next()){\n\t\t\t\talbum = readAlbum(set);\n\t\t\t}\n\t\t\tstatement.close();\n\t\t\t//connection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn album;\n\t}", "@Override\r\n\tpublic Animal createAnimal(Animal animal) {\n\t\treturn dao.save(animal);\r\n\t}", "public Artefact getArtefact(String name) {\n\t\treturn artefacts.get(name);\n\t}", "public interface Factory {\n Animal createAnimal();\n}", "public Animal build() {\n\t\t/*\n\t\t * this prevents nullPointerException, because if name is null, we\n\t\t * can't call any methods of the String class with this object and it\n\t\t * will crash our program\n\t\t */\n\t\tif(name==null)\n\t\t\tname=\"\";\n\t\tif(age<0)\n\t\t\tage=0;\n\t\t/*\n\t\t * if you are creating an object of the immutable class, the last thing\n\t\t * you do, is create that object\n\t\t */\n\t\treturn new Animal(name,age);\n\t}", "Expertise findByName(String name);", "@Test\n public void testGetAnimal2() {\n Color color = Color.GREEN;\n Species species = Species.LION;\n Pieces inv = new Pieces();\n Animal expResult = new Animal(species, color);\n Animal result = inv.getAnimal(color, species);\n assertEquals(expResult, result);\n }", "public Map<String, Kingdom> generateAllRulers() {\n Map<String, String> kingdomWithAnimal;\n kingdomWithAnimal = kingdomRepository.getRulersWithAnimal();\n Map<String, Kingdom> kingdoms = new HashMap<>();\n for (String emblem : kingdomWithAnimal.keySet()) {\n Kingdom kingdom = new Kingdom(emblem, kingdomWithAnimal.get(emblem));\n kingdom.makeCipherFromAnimalName();\n kingdoms.put(emblem, kingdom);\n }\n return kingdoms;\n }", "public static Animal getAnimal() {//object of type animal and calling this method in app.javsa\n return new Dog();\n}", "private void createApple() {\r\n Random rnd = new Random();\r\n do {\r\n apple = new Coordinates(rnd.nextInt(gridWidth), rnd.nextInt(gridHeight));\r\n } while (isSnakeAt(apple));\r\n }", "Dog(){\n\t\t\n\t\t//I want to create a chemicals object. Inorder to do this, I have to first create a Cardiac obj, then a Cells obj, then a Chemicals object.\n\t\t//I have to create a Chemicals object, to get a chemicals constructor \n\t\tnew Cardiac().new Cells().new Chemicals();\n\t\t\n\t}", "void place(Animal animal);", "public static void main(String[] args) throws IOException {\n AnimalFactory df = new DogFactory();\n AnimalFactory cf = new CatFactory();\n AnimalFactory bf = new BirdFactory();\n \n ArrayList<Dog> dogs = new ArrayList<>();\n ArrayList<Cat> cats = new ArrayList<>();\n ArrayList<Bird> birds = new ArrayList<>();\n \n Scanner reader = new Scanner(System.in);\n String input;\n do {\n System.out.println(\"===== Animal Kennel =====\"); \n System.out.println(\"1. Add animal.\");\n System.out.println(\"2. Talk to animals.\");\n System.out.println(\"0. Exit.\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n \n switch (Integer.parseInt(input)) {\n case 1:\n System.out.println(\"Types of animals to add: \");\n System.out.println(\"1 Dogs\");\n System.out.println(\"2 Cats\");\n System.out.println(\"3 Birds\");\n \n System.out.print(\"Selection: \");\n input = reader.nextLine();\n switch (Integer.parseInt(input)) {\n case 1:\n System.out.println(\"You can add: \");\n System.out.println(\"Labrador\\tPomeranian\\tShepherd\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Dog dog = df.createDog(input);\n if (dog != null) dogs.add(dog);\n break;\n case 2:\n System.out.println(\"You can add: \");\n System.out.println(\"Burmese\\tPersian\\tSiamese\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Cat cat = cf.createCat(input);\n if (cat != null) cats.add(cat);\n break;\n case 3:\n System.out.println(\"You can add: \");\n System.out.println(\"Owl\\tParrot\\tStork\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Bird bird = bf.createBird(input);\n if (bird != null) birds.add(bird);\n break;\n default:\n break;\n }\n break;\n case 2:\n System.out.println(\"And then each of the animals spoke: \");\n dogs.forEach((dog) -> {\n dog.speak();\n });\n cats.forEach((cat) -> {\n cat.speak();\n });\n birds.forEach((bird) -> {\n bird.speak();\n });\n break;\n case 0:\n System.out.println(\"Exiting...\");\n System.exit(0);\n break;\n default:\n System.out.println(\"Choose something from the menu.\");\n break; \n }\n } while (true);\n }", "public Angel createAngel(final String angelType) throws IOException {\n if (angelType.equals(\"DamageAngel\")) {\n return new DamageAngel();\n }\n if (angelType.equals(\"DarkAngel\")) {\n return new DarkAngel();\n }\n if (angelType.equals(\"Dracula\")) {\n return new Dracula();\n }\n if (angelType.equals(\"GoodBoy\")) {\n return new GoodBoy();\n }\n if (angelType.equals(\"LevelUpAngel\")) {\n return new LevelUpAngel();\n }\n if (angelType.equals(\"LifeGiver\")) {\n return new LifeGiver();\n }\n if (angelType.equals(\"SmallAngel\")) {\n return new SmallAngel();\n }\n if (angelType.equals(\"Spawner\")) {\n return new Spawner();\n }\n if (angelType.equals(\"TheDoomer\")) {\n return new TheDoomer();\n }\n if (angelType.equals(\"XPAngel\")) {\n return new XPAngel();\n }\n return null;\n }", "public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }", "private Alien getRandomAlien() {\n\t\twhile(roamingAliens >= 0){\n\t\t\tint i = random.nextInt(gameObject.size());\n\t\t\tif(gameObject.get(i)instanceof Alien)\n\t\t\t\treturn (Alien) gameObject.get(i);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tString getName(){\n\t\treturn animalName;\n\t}", "public Mage(String name){\n this.name = name; //Set the name of the new mage to the supplied String parameter \"name\"\n this.className = \"Mage\"; //All mages are of the class Mage\n this.sex = \"F\"; //New mages are created as female by default\n this.health = 100; //New mages are created with 100 health\n this.mana = 100; //New mages are created with 100 mana\n this.spells = new ArrayList<Spell>(); //For now, an empty list of spells.\n this.fireball = new Spell(); //All spells are fireballs for now.\n }", "public static void main(String[] args) {\n animals = new Animal[3];\n animals[0] = new PolarBear();\n animals[1] = new Elephant();\n animals[2] = new PolarBear();\n\n for (Animal animal: animals) {\n System.out.println(\"You see a \" + animal.toString()\n + \" that \" + animal.showOff());\n }\n }", "public Zookeeper(Animal[] my_zoo){\n zoo = my_zoo;\n }", "@Override\n\tpublic Army getArmy() {\n\t\treturn new IndianArmy();\n\t}", "private void populaAlimento()\n {\n Alimento a = new Alimento(\"Arroz\", 100d, 5d, 0.4d, 30d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Abacaxi\", 96.2d, 1.2d, 2.3d, 6d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Carne moida - Acem\", 212.4d, 26.7d, 9.8d, 0d, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pernil Assado\", 262.3d, 32.1d, 13.1d, 0, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pao de forma integral\", 253.2d, 9.4d, 2.9d, 49, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n }", "public static boolean addAnimal(Animal animal) throws Exception\n {\t\n /**\n * checking if same name animal already present in zoo\n */\n if(Zoo.animalsInZoo.containsKey(animal.uniqueName))\n {\n throw new Exception(\"Same name animal already present in zoo!!!\");\n }\n \n /**\n * searching for the suitable zone for the given animal\n */\n Zone supportedZone = Zoo.findSupportedZoneForAnimal(animal);\n boolean animalPlaced = supportedZone.addAnimalInZone(animal);\n if(animalPlaced)\n {\n animalsInZoo.put(animal.uniqueName, animal);\n return true; \n }\n return false;\n }", "private static Zone findSupportedZoneForAnimal(Animal animal) throws Exception\n {\n /**\n * checking every zone that is available in the zoo \n */\n for(Zone zone : Zoo.zonesInZoo.values()){\n if(zone.categoryOfAnimalSupported.equalsIgnoreCase(animal.category) && zone.subcategoryOfAnimalSupported.equalsIgnoreCase(animal.subCategory)){\n return zone;\n }\n }\n /**\n * if no suitable zone found\n */\n throw new Exception(\"Supported zone not found for given animal!!!\");\n }", "public Pizza makePizza(String newPizzaType){\n if(newPizzaType.equals(\"a\")){\r\n return new CheesePizza();\r\n }\r\n else if(newPizzaType.equals(\"b\")){\r\n return new VeggiePizza();\r\n }\r\n else if(newPizzaType.equals(\"c\")){\r\n return new ChickenPizza(); \r\n }\r\n else{ \r\n return null; \r\n }\r\n \r\n }", "boolean test(AbstractAnimals a);", "public Bird(String name) {\n this.name = this.name+name;\n }", "public void updateSpecies (String treeSpeciesName, int crownShape,\r\n\t\t\t\t\t\t\t\tdouble ellipsoidTruncationRatio, \r\n\t\t\t\t\t\t\t\tdouble heightDbhAllometricCoeffA, double heightDbhAllometricCoeffB,\r\n\t\t\t\t\t\t\t\tdouble crownDbhAllometricCoeffA, double crownDbhAllometricCoeffB,\r\n\t\t\t\t\t\t\t\tdouble stemDbhAllometricCoeffA, double stemDbhAllometricCoeffB, double stemDbhAllometricCoeffC, \r\n\t\t\t\t\t\t\t\tdouble dcbFromDbhAllometricCoeff,\r\n\t\t\t\t\t\t\t\tdouble stumpToStemBiomassRatio,\r\n\t\t\t\t\t\t\t\tdouble cRAreaToFRLengthRatio, \r\n\t\t\t\t\t\t\t\tdouble initialTargetLfrRatio,\r\n\t\t\t\t\t\t\t\tdouble leafAreaCrownVolCoefA, double leafAreaCrownVolCoefB,\r\n\t\t\t\t\t\t\t\tdouble woodAreaDensity, double leafParAbsorption, double leafNirAbsorption, double clumpingCoef,\r\n\t\t\t\t\t\t\t\tint phenologyType,\r\n\t\t\t\t\t\t\t\tint budBurstTempAccumulationDateStart,\r\n\t\t\t\t\t\t\t\tdouble budBurstTempThreshold,\r\n\t\t\t\t\t\t\t\tdouble budBurstAccumulatedTemp,\r\n\t\t\t\t\t\t\t\tint leafExpansionDuration,\r\n\t\t\t\t\t\t\t\tint budBurstToLeafFallDuration,\r\n\t\t\t\t\t\t\t\tint leafFallDuration,\r\n\t\t\t\t\t\t\t\tdouble leafFallFrostThreshold,\r\n\t\t\t\t\t\t\t\tint budBurstDelayMinAfterPollaring,\r\n\t\t\t\t\t\t\t\tint budBurstDelayMaxAfterPollaring,\r\n\t\t\t\t\t\t\t\tdouble stemFlowCoefficient,\r\n\t\t\t\t\t\t\t\tdouble stemFlowMax,\r\n\t\t\t\t\t\t\t\tdouble wettability,\r\n\t\t\t\t\t\t\t\tdouble transpirationCoefficient,\r\n\t\t\t\t\t\t\t\tdouble lueMax,\r\n\t\t\t\t\t\t\t\tint leafAgeForLueMax,\r\n\t\t\t\t\t\t\t\tdouble leafSenescenceTimeConstant,\r\n\t\t\t\t\t\t\t\tdouble leafCarbonContent,\r\n\t\t\t\t\t\t\t\tdouble leafMassArea,\r\n\t\t\t\t\t\t\t\tdouble luxuryNCoefficient,\r\n\t\t\t\t\t\t\t\tdouble targetNCoefficient,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble rootNRemobFraction,\r\n\t\t\t\t\t\t\t\tdouble leafNRemobFraction,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble targetNSCFraction,\r\n\t\t\t\t\t\t\t\tdouble maxNSCUseFraction,\r\n\t\t\t\t\t\t\t\tdouble maxNSCUseFoliageFraction,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tint rsStressMethod,\r\n\t\t\t\t\t\t\t\tint lueStressMethod,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble rsNoStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble rsWaterStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble rsNitrogenStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble lueWaterStressResponsiveness,\r\n\t\t\t\t\t\t\t\tdouble lueNitrogenStressResponsiveness,\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble maxTargetLfrRatioDailyVariation,\r\n\t\t\t\t\t\t\t\tdouble targetLfrRatioUpperDrift,\r\n\t\t\t\t\t\t\t\tdouble minTargetLfrRatio,\r\n\t\t\t\t\t\t\t\tdouble maxTargetLfrRatio,\r\n\t\t\t\t\t\t\t\tdouble optiNCBranch,\r\n\t\t\t\t\t\t\t\tdouble optiNCCoarseRoot,\r\n\t\t\t\t\t\t\t\tdouble optiNCFineRoot,\r\n\t\t\t\t\t\t\t\tdouble optiNCFoliage,\r\n\t\t\t\t\t\t\t\tdouble optiNCStem,\r\n\t\t\t\t\t\t\t\tdouble optiNCStump,\r\n\t\t\t\t\t\t\t\tdouble woodDensity,\r\n\t\t\t\t\t\t\t\tdouble branchVolumeRatio,\r\n\t\t\t\t\t\t\t\tdouble woodCarbonContent,\r\n\t\t\t\t\t\t\t\tdouble maxCrownRadiusInc,\r\n\t\t\t\t\t\t\t\tdouble maxHeightInc,\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdouble imbalanceThreshold,\r\n\t\t\t\t\t\t\t\tdouble leafSenescenceRate,\r\n\t\t\t\t\t\t\t\tdouble coarseRootAnoxiaResistance,\r\n\t\t\t\t\t\t\t\tdouble specificRootLength,\r\n\t\t\t\t\t\t\t\tdouble colonisationThreshold,\r\n\t\t\t\t\t\t\t\tdouble colonisationFraction,\r\n\t\t\t\t\t\t\t\tdouble fineRootLifespan,\r\n\t\t\t\t\t\t\t\tdouble fineRootAnoxiaLifespan,\r\n\t\t\t\t\t\t\t\tdouble horizontalPreference,\r\n\t\t\t\t\t\t\t\tdouble geotropismFactor,\r\n\t\t\t\t\t\t\t\tdouble localWaterUptakeFactor,\r\n\t\t\t\t\t\t\t\tdouble sinkDistanceEffect,\r\n\t\t\t\t\t\t\t\tdouble localNitrogenUptakeFactor,\r\n\t\t\t\t\t\t\t\tint coarseRootTopologyType,\r\n\t\t\t\t\t\t\t\tdouble rootDiameter, double rootConductivity,\r\n\t\t\t\t\t\t\t\tdouble alpha,\r\n\t\t\t\t\t\t\t\tdouble minTranspirationPotential,double maxTranspirationPotential,\r\n\t\t\t\t\t\t\t\tdouble bufferPotential, double longitudinalResistantFactor) {\r\n\r\n\t\tthis.name = treeSpeciesName;\r\n\t\tthis.crownShape = crownShape;\r\n\t\tthis.ellipsoidTruncationRatio = ellipsoidTruncationRatio;\r\n\t\tthis.heightDbhAllometricCoeffA = heightDbhAllometricCoeffA;\r\n\t\tthis.heightDbhAllometricCoeffB = heightDbhAllometricCoeffB;\r\n\t\tthis.crownDbhAllometricCoeffA = crownDbhAllometricCoeffA;\r\n\t\tthis.crownDbhAllometricCoeffB = crownDbhAllometricCoeffB;\r\n\t\tthis.stemDbhAllometricCoeffA = stemDbhAllometricCoeffA;\r\n\t\tthis.stemDbhAllometricCoeffB = stemDbhAllometricCoeffB;\r\n\t\tthis.stemDbhAllometricCoeffC = stemDbhAllometricCoeffC;\r\n\t\tthis.dcbFromDbhAllometricCoeff = dcbFromDbhAllometricCoeff;\r\n\t\tthis.stumpToStemBiomassRatio = stumpToStemBiomassRatio;\r\n\t\tthis.cRAreaToFRLengthRatio = cRAreaToFRLengthRatio;\r\n\t\tthis.initialTargetLfrRatio = initialTargetLfrRatio; \r\n\t\tthis.leafAreaCrownVolCoefA = leafAreaCrownVolCoefA;\r\n\t\tthis.leafAreaCrownVolCoefB = leafAreaCrownVolCoefB;\r\n\t\tthis.woodAreaDensity = woodAreaDensity;\r\n\t\tthis.leafParAbsorption = leafParAbsorption;\r\n\t\tthis.leafNirAbsorption = leafNirAbsorption;\r\n\t\tthis.clumpingCoef = clumpingCoef;\r\n\t\tthis.phenologyType = phenologyType;\r\n\t\tthis.budBurstTempAccumulationDateStart = budBurstTempAccumulationDateStart;\r\n\t\tthis.budBurstTempThreshold = budBurstTempThreshold;\r\n\t\tthis.budBurstAccumulatedTemp = budBurstAccumulatedTemp;\r\n\t\tthis.leafExpansionDuration = leafExpansionDuration;\r\n\t\tthis.budBurstToLeafFallDuration = budBurstToLeafFallDuration;\r\n\t\tthis.leafFallDuration = leafFallDuration;\r\n\t\tthis.leafFallFrostThreshold = leafFallFrostThreshold;\r\n\t\tthis.budBurstDelayMinAfterPollaring = budBurstDelayMinAfterPollaring;\r\n\t\tthis.budBurstDelayMaxAfterPollaring = budBurstDelayMaxAfterPollaring;\r\n\t\tthis.stemFlowCoefficient = stemFlowCoefficient;\r\n\t\tthis.stemFlowMax = stemFlowMax;\r\n\t\tthis.wettability = wettability;\r\n\t\tthis.transpirationCoefficient = transpirationCoefficient;\r\n\t\tthis.lueMax = lueMax;\r\n\t\tthis.leafAgeForLueMax = leafAgeForLueMax;\r\n\t\tthis.leafSenescenceTimeConstant = leafSenescenceTimeConstant;\r\n\t\tthis.leafCarbonContent = leafCarbonContent;\r\n\t\tthis.leafMassArea = leafMassArea;\r\n\t\tthis.luxuryNCoefficient = luxuryNCoefficient;\r\n\t\tthis.targetNCoefficient = targetNCoefficient;\r\n\t\tthis.rootNRemobFraction = rootNRemobFraction;\r\n\t\tthis.leafNRemobFraction = leafNRemobFraction;\r\n\t\tthis.targetNSCFraction = targetNSCFraction;\r\n\t\tthis.maxNSCUseFraction = maxNSCUseFraction;\r\n\t\tthis.maxNSCUseFoliageFraction = maxNSCUseFoliageFraction;\r\n\t\tthis.rsNoStressResponsiveness = rsNoStressResponsiveness;\r\n\t\tthis.rsWaterStressResponsiveness = rsWaterStressResponsiveness;\r\n\t\tthis.rsNitrogenStressResponsiveness = rsNitrogenStressResponsiveness;\r\n\t\tthis.lueWaterStressResponsiveness = lueWaterStressResponsiveness;\r\n\t\tthis.lueNitrogenStressResponsiveness = lueNitrogenStressResponsiveness;\r\n\t\tthis.maxTargetLfrRatioDailyVariation = maxTargetLfrRatioDailyVariation;\r\n\t\tthis.targetLfrRatioUpperDrift = targetLfrRatioUpperDrift;\r\n\t\tthis.minTargetLfrRatio = minTargetLfrRatio;\r\n\t\tthis.maxTargetLfrRatio = maxTargetLfrRatio;\r\n\t\tthis.optiNCBranch = optiNCBranch;\r\n\t\tthis.optiNCCoarseRoot = optiNCCoarseRoot;\r\n\t\tthis.optiNCFineRoot = optiNCFineRoot;\r\n\t\tthis.optiNCFoliage = optiNCFoliage;\r\n\t\tthis.optiNCStem = optiNCStem;\r\n\t\tthis.optiNCStump = optiNCStump;\r\n\t\tthis.woodDensity = woodDensity;\r\n\t\tthis.branchVolumeRatio = branchVolumeRatio;\r\n\t\tthis.woodCarbonContent = woodCarbonContent;\t\r\n\t\tthis.maxCrownRadiusInc = maxCrownRadiusInc;\r\n\t\tthis.maxHeightInc = maxHeightInc;\r\n\t\tthis.leafSenescenceRate = leafSenescenceRate;\r\n\t\tthis.imbalanceThreshold= imbalanceThreshold;\r\n\t\tthis.specificRootLength = specificRootLength;\r\n\t\tthis.coarseRootAnoxiaResistance=coarseRootAnoxiaResistance;\r\n\t\tthis.colonisationThreshold = colonisationThreshold;\r\n\t\tthis.colonisationFraction = colonisationFraction;\r\n\t\tthis.fineRootLifespan= fineRootLifespan;\r\n\t\tthis.fineRootAnoxiaLifespan = fineRootAnoxiaLifespan;\r\n\t\tthis.horizontalPreference= horizontalPreference;\r\n\t\tthis.geotropismFactor= geotropismFactor;\r\n\t\tthis.localWaterUptakeFactor = localWaterUptakeFactor;\r\n\t\tthis.sinkDistanceEffect = sinkDistanceEffect;\r\n\t\tthis.localNitrogenUptakeFactor = localNitrogenUptakeFactor;\r\n\t\tthis.coarseRootTopologyType = coarseRootTopologyType;\r\n\t\tthis.treeRootDiameter = rootDiameter;\r\n\t\tthis.treeRootConductivity = rootConductivity;\r\n\t\tthis.treeAlpha = alpha;\r\n\t\tthis.treeMinTranspirationPotential = minTranspirationPotential;\r\n\t\tthis.treeMaxTranspirationPotential = maxTranspirationPotential;\r\n\t\tthis.treeBufferPotential = bufferPotential;\r\n\t\tthis.treeLongitudinalResistantFactor = longitudinalResistantFactor;\r\n\t}", "public static void main(String[] args) {\n Artist adhi = new Artist(\"Adhi\");\n Artist jeeva = new Artist(\"Jeeva\");\n\n // Two artists joins and creates a Music Band\n Band hipHopTamizha = new Band();\n hipHopTamizha.artists = new ArrayList<>();\n hipHopTamizha.artists.add(adhi);\n hipHopTamizha.artists.add(jeeva);\n\n //after sometime due to conflicts Band gets destroyed\n hipHopTamizha = null;\n\n //Individual Artists does not gets destroyed. but, they still exists and joins movies, become actors and singers.\n Movie meesayaMurukku = new Movie();\n meesayaMurukku.singers = new ArrayList<>();\n meesayaMurukku.actors = new ArrayList<>();\n\n meesayaMurukku.singers.add(adhi); // movie singer\n meesayaMurukku.actors.add(adhi); // becomes a hero\n\n /*\n * This type of relation or association between objects Band and Artist is called Aggregation\n * */\n }", "@Override\n\tpublic IAnimal recherche(String nom) throws RemoteException {\n\t\tfor(IAnimal a : listeAnimaux){\n\t\t\tif(a.getNom().equals(nom)) return a;\n\t\t}\n\t\treturn null;\n\t}", "public Armor(String _name){\n super();\n // sets owner = _owner\n // sets posX = _posX\n // sets posY = _posY\n // sets itemIntValue = _itemIntValue\n name = _name; \n }", "public void addAName(Animal n)\r\n\t{\r\n\t\tint holderColot = n.hashCode()%9;\r\n\t\tanimalHashMap.put(n, colorArray[holderColot]);\r\n\t\tobNameList.add(n);\r\n\t}", "public static void main(String[] args) {\n Animal A1 = new Animal(5,\"Animal\",1,\"Carnivores\",1);\n Dog d1 = new Dog(2,\"Miller\",4,\"Herbivores\",1);\n\n d1.eat();\n A1.eat();\n\n }", "@Override\r\n public Food createFood(List<Coordinate> obstacles) {\r\n Random random = new Random();\r\n double num = random.nextDouble();\r\n\r\n if (num <= MushroomPowerUp.rarity) {\r\n return new MushroomPowerUp(randomCoordinates(obstacles));\r\n }\r\n if (num <= DoubleScorePowerUp.rarity + MushroomPowerUp.rarity) {\r\n return new DoubleScorePowerUp(randomCoordinates(obstacles));\r\n }\r\n return new AppleFactory().createFood();\r\n }", "public BasicSpecies() {\r\n\r\n\t}", "public tuna_Ep17(String name){ \t// Constructor added in Episode 17\r\n\t\tgirlName = name;\r\n\t}", "public String getAnimalOwnerID(String auuid){\r\n\t\t\r\n\t\tSet<String> farmers = plugin.getAnimalData().getConfigurationSection(\"Farmer\").getKeys(false);\r\n\t\tfor(String farmer : farmers){\r\n\t\t\tif(plugin.getAnimalData().contains(\"Farmer.\" + farmer +\".Animals.\" + auuid)){\r\n\t\t\t\treturn plugin.getAnimalData().getString(\"Farmer.\"+ farmer + \".Animals.\" + auuid + \".OwnerID\");\r\n\t\t\t}else{\r\n\t\t\t\treturn \"Unknown\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"Unknown\";\r\n\t}", "public static void main(String [] args){\n\t\tAbstractFactory carFactory = new CarFactory();\n\t\t\n\t\t// Create as many cars as you want\n\t\tCar sedan = carFactory.getCar(\"Sedan\");\n\t\tsedan.getCarInfo();\n\t\t\n\t\tCar coupe = carFactory.getCar(\"Coupe\");\n\t\tcoupe.getCarInfo();\n\t\t\n\t}", "public String getAllFarmAnimals(){\r\n\t\tPlayer[] p = Bukkit.getOnlinePlayers();\r\n\t\t\tfor(Player player : p){\r\n\t\t\tif(plugin.getAnimalData().contains(\"Farmer.\" + player.getUniqueId().toString())){\r\n\t\t\tString farmer = player.getUniqueId().toString();\t\r\n\t\t\tSet<String> animals = plugin.getAnimalData().getConfigurationSection(\"Farmer.\" + farmer + \".Animals\").getKeys(false);\r\n\t\t\tfor(String animal : animals){\r\n\t\treturn animal;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn null;\r\n\t}", "Habit createHabit(Habit habit);", "Album findAlbumByNameAndArtisteName(String albumName, String artisteName);", "@Override\n\tpublic Album findAlbumByName(String name) {\n\t\treturn _albumDao.findAlbumByName(name);\n\t}", "public PokemonSpecies findSeenSpeciesData(String name) throws PokedexException {\n PokemonSpecies rv = null;\n String nameLower = name.toLowerCase();\n Iterator<PokemonSpecies> it = pokedex.iterator();\n PokemonSpecies currentSpecies;\n while(it.hasNext()) {\n currentSpecies = it.next();\n if(currentSpecies.getSpeciesName().equals(nameLower)) {\n rv = currentSpecies;\n break;\n }\n }\n if(rv == null) {\n throw new PokedexException(String.format(Config.UNSEEN_POKEMON, name));\n }\n return rv;\n }", "public static void main(String[] args) {\n Inventory inventory = new Inventory(); \n \n List<Guitar> allGuitars=initializeInventory();//添加guitar列表\n \n \n GuitarSpec whatErinLikes = \n new GuitarSpec(Builder.JIANGSU, \"Stratocastor\", \n Type.ACOUSTIC, Wood.CAMPHOR, Wood.CAMPHOR);\n List matchingGuitars = inventory.search(whatErinLikes,allGuitars);\n if (!matchingGuitars.isEmpty()) {\n System.out.println(\"Erin, you might like these guitars:\");\n for (Iterator i = matchingGuitars.iterator(); i.hasNext(); ) {\n Guitar guitar = (Guitar)i.next();\n GuitarSpec spec = guitar.getSpec();\n System.out.println(\" We have a \" +\n spec.getBuilder() + \" \" + spec.getModel() + \" \" +\n spec.getType() + \" guitar:\\n \" +\n spec.getBackWood() + \" back and sides,\\n \" +\n spec.getTopWood() + \" top.\\n You can have it for only $\" +\n guitar.getPrice() + \"!\\n ----\");\n }\n } else {\n System.out.println(\"Sorry, Erin, we have nothing for you.\");\n }\n }" ]
[ "0.6041176", "0.57611316", "0.5674616", "0.5546453", "0.5492802", "0.54612887", "0.54611945", "0.54395723", "0.5359369", "0.5345725", "0.534435", "0.53417337", "0.53361595", "0.5315063", "0.5267845", "0.52197534", "0.5218958", "0.5216914", "0.5162668", "0.5095205", "0.5092719", "0.5091677", "0.5083161", "0.50764924", "0.506811", "0.50534075", "0.50495535", "0.5039144", "0.50250834", "0.50171506", "0.5016142", "0.50073355", "0.5004673", "0.49816126", "0.49797383", "0.49438167", "0.49420798", "0.49409997", "0.49387398", "0.4931383", "0.48966768", "0.4884821", "0.48807016", "0.48731324", "0.4834825", "0.48321432", "0.48318925", "0.4829072", "0.4824738", "0.47987646", "0.47912186", "0.47909248", "0.47782364", "0.47759175", "0.47694474", "0.47491038", "0.473966", "0.4739478", "0.47393578", "0.47385934", "0.47380057", "0.4737301", "0.47304583", "0.47293466", "0.47225147", "0.47124186", "0.47073385", "0.46975166", "0.46954322", "0.46873274", "0.46785745", "0.4677394", "0.4674877", "0.46720615", "0.4671439", "0.4668617", "0.46449995", "0.46445248", "0.46386367", "0.4637211", "0.46332225", "0.46262744", "0.46254385", "0.4601748", "0.45856476", "0.4577784", "0.45685244", "0.45611984", "0.4560541", "0.45598382", "0.45565504", "0.4555261", "0.45522085", "0.45413703", "0.45403114", "0.453783", "0.45308006", "0.45291305", "0.45266294", "0.4525605" ]
0.6617664
0
printAllAnimals method Returns the Region that a Staff object belongs to
public Region findRegion(Staff find) { for (int i = 0; i < numRegions; i++) { Staff[] temp = regionList[i].getRegionStaff(); for (int j = 0; j < regionList[i].getRegionSpec().getNumStaff(); j++) { if (temp[j].equals(find)) { return regionList[i]; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAllFarmAnimals(){\r\n\t\tPlayer[] p = Bukkit.getOnlinePlayers();\r\n\t\t\tfor(Player player : p){\r\n\t\t\tif(plugin.getAnimalData().contains(\"Farmer.\" + player.getUniqueId().toString())){\r\n\t\t\tString farmer = player.getUniqueId().toString();\t\r\n\t\t\tSet<String> animals = plugin.getAnimalData().getConfigurationSection(\"Farmer.\" + farmer + \".Animals\").getKeys(false);\r\n\t\t\tfor(String animal : animals){\r\n\t\treturn animal;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn null;\r\n\t}", "public void printRegionsNames() {\n for (int i = 0; i < regionList.length; i++) {\n System.out.println(\"Region #\" + (i + 1) + \": \" + regionList[i].getRegionName());\n }\n }", "private List<Region> stataRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36218276352746, -71.08994364738464);\n\t\tr.addVertex(42.36207970542849, -71.08879566192627);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\trs.add(r);\n\n\t\t// Region 2\n\t\tr = new Region(\"Stata-2\");\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\trs.add(r);\n\n\t\t// Region 3\n\t\tr = new Region(\"Stata-3\");\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36131865577206, -71.08895659446716);\n\t\tr.addVertex(42.361366221645646, -71.08989000320435);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36196871959442);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 1 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361659543737126);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 2 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36140585984613);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 3 is in region %s\", getRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "@Override\r\n\tpublic List<Animal> getAllAnimals() {\n\t\treturn dao.findAll();\r\n\t}", "public void printAll() {\n // Sort them by parent for ease of analysis\n // copy it so that we don't mess with the actual pop\n ArrayList<Bacteria> temp = (ArrayList<Bacteria>) inds.clone();\n Collections.sort(temp, new Comparator<Bacteria>() {\n @Override\n public int compare(Bacteria o1, Bacteria o2) {\n if (o1.getParentID() > o2.getParentID()) return 1;\n else if (o1.getParentID() == o2.getParentID()) return 0;\n else return -1;\n }\n });\n\t\tSystem.out.println(\"Bacteria population:\");\n for (int i=0; i < getPopSize(); i++) {\n temp.get(i).print();\n }\n System.out.println();\n\t}", "private List<Region> experimentFullRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Vassar St\n\t\tr = new Region(\"Vassar-1\");\n\t\tr.addVertex(42.36255147026933, -71.09034599930573);\n\t\tr.addVertex(42.36240877523236, -71.08975591332245);\n\t\tr.addVertex(42.36013353836458, -71.09434785515595);\n\t\tr.addVertex(42.360442721730834, -71.0948091951065);\n\t\trs.add(r);\n\n\t\t// Windsor-1\n\t\tr = new Region(\"Windsor-1\");\n\t\tr.addVertex(42.36302711805193, -71.09707297951508);\n\t\tr.addVertex(42.36297955343571, -71.09641852051544);\n\t\tr.addVertex(42.3615288153431, -71.09657945305634);\n\t\tr.addVertex(42.36186970216797, -71.09723391205597);\n\t\trs.add(r);\n\n\t\t// Mass-1\n\t\tr = new Region(\"Mass-1\");\n\t\tr.addVertex(42.362678310030105, -71.0995620694809);\n\t\tr.addVertex(42.3629954083118, -71.09918656021881);\n\t\tr.addVertex(42.36179042632724, -71.09720172554779);\n\t\tr.addVertex(42.361322696830854, -71.09736265808868);\n\t\trs.add(r);\n\n\t\t// Mass-2\n\t\tr = new Region(\"Mass-2\");\n\t\tr.addVertex(42.36114036066024, -71.09588207871246);\n\t\tr.addVertex(42.360791542163774, -71.09660091072845);\n\t\tr.addVertex(42.36106901157985, -71.0969335046463);\n\t\tr.addVertex(42.36156052582344, -71.09657945305634);\n\t\trs.add(r);\n\n\t\t// Mass-3\n\t\tr = new Region(\"Mass-3\");\n\t\tr.addVertex(42.36035551632001, -71.09489502579498);\n\t\tr.addVertex(42.3601731773427, -71.09523834854889);\n\t\tr.addVertex(42.360577493491306, -71.095978638237);\n\t\tr.addVertex(42.36077568673155, -71.0955816713028);\n\t\trs.add(r);\n\n\t\t/*\n\t\t * Albany-1-full r = new Region(\"Albany-1\");\n\t\t * r.addVertex(42.36087874696942, -71.09530272156525);\n\t\t * r.addVertex(42.361227564981775, -71.0956353154831);\n\t\t * r.addVertex(42.362678310030105, -71.092556139534);\n\t\t * r.addVertex(42.362527687785665, -71.09185876519012); rs.add(r);\n\t\t */\n\n\t\t// Albany-1\n\t\tr = new Region(\"Albany-1\");\n\t\tr.addVertex(42.36172700558263, -71.09442295700836);\n\t\tr.addVertex(42.3614891772202, -71.09410109192658);\n\t\tr.addVertex(42.360823253016186, -71.09553875595856);\n\t\tr.addVertex(42.361084866938036, -71.09590353638458);\n\t\trs.add(r);\n\n\t\t// Albany-2\n\t\tr = new Region(\"Albany-2\");\n\t\tr.addVertex(42.362678310030105, -71.09243812233734);\n\t\tr.addVertex(42.36253561528121, -71.09191240937042);\n\t\tr.addVertex(42.36180628150339, -71.09342517525482);\n\t\tr.addVertex(42.36223436974708, -71.09344663292694);\n\t\trs.add(r);\n\n\t\t// Portland-1\n\t\tr = new Region(\"Portland-1\");\n\t\tr.addVertex(42.362757584750575, -71.09386505753326);\n\t\tr.addVertex(42.36273380234492, -71.09342517525482);\n\t\tr.addVertex(42.36217887699113, -71.09354319245148);\n\t\tr.addVertex(42.36198861574153, -71.09409036309052);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-1\");\n\t\tr.addVertex(42.36321737615673, -71.09918656021881);\n\t\tr.addVertex(42.36356618118581, -71.09917583138275);\n\t\tr.addVertex(42.36342348845344, -71.0969335046463);\n\t\tr.addVertex(42.363042972916034, -71.09699787766266);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-2\");\n\t\tr.addVertex(42.36318566651262, -71.09384359986115);\n\t\tr.addVertex(42.36278929461076, -71.09392943054962);\n\t\tr.addVertex(42.36297162599619, -71.09643997818756);\n\t\tr.addVertex(42.36336799674776, -71.09641852051544);\n\t\trs.add(r);\n\n\t\t// Main-3\n\t\tr = new Region(\"Main-3\");\n\t\tr.addVertex(42.36300333574834, -71.09216990143585);\n\t\tr.addVertex(42.36271794740286, -71.09249176651764);\n\t\tr.addVertex(42.36277343968266, -71.09333934456635);\n\t\tr.addVertex(42.363106392332284, -71.09324278504181);\n\t\trs.add(r);\n\n\t\t// Main-4\n\t\tr = new Region(\"Main-4\");\n\t\tr.addVertex(42.36289235154579, -71.09035672814178);\n\t\tr.addVertex(42.36259110772208, -71.09038891464996);\n\t\tr.addVertex(42.36264660011392, -71.09166564614105);\n\t\tr.addVertex(42.36303504548448, -71.09157981545258);\n\t\trs.add(r);\n\n\t\tLocation l;\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36035940296916);\n\t\tl.setLongitude(-71.0944926738739);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36081921192526);\n\t\tl.setLongitude(-71.09338760375977);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36160405047349);\n\t\tl.setLongitude(-71.0919177532196);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3619370093201);\n\t\tl.setLongitude(-71.09123110771179);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36234924163794);\n\t\tl.setLongitude(-71.09039425849915);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3631736981596);\n\t\tl.setLongitude(-71.09626293182373);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36303893196785);\n\t\tl.setLongitude(-71.09436392784119);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362935875273244);\n\t\tl.setLongitude(-71.09288334846497);\n\t\tlog(String.format(\"Test point on Main-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362785253646265);\n\t\tl.setLongitude(-71.09100580215454);\n\t\tlog(String.format(\"Test point on Main-3 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362476081807);\n\t\tl.setLongitude(-71.0936987400055);\n\t\tlog(String.format(\"Test point on Portland-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36099362133876);\n\t\tl.setLongitude(-71.09561920166016);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36154855716084);\n\t\tl.setLongitude(-71.0943853855133);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362008357414815);\n\t\tl.setLongitude(-71.093430519104);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362610849206014);\n\t\tl.setLongitude(-71.09221816062927);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3611521749309);\n\t\tl.setLongitude(-71.09653115272522);\n\t\tlog(String.format(\"Test point on Mass-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3604862471552);\n\t\tl.setLongitude(-71.09537243843079);\n\t\tlog(String.format(\"Test point on Mass-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36238887921827);\n\t\tl.setLongitude(-71.09683156013489);\n\t\tlog(String.format(\"Test point on Windsor-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "public String toString() {\n String output = \"\";\n for (int i = 0; i < numRegions; i++) {\n if (regionList[i] instanceof Arctic) \n output += (i+1) + \". \" + ((Arctic)regionList[i]).toString();\n else if (regionList[i] instanceof Aquarium) \n output += (i+1) + \". \" + ((Aquarium)regionList[i]).toString();\n else if (regionList[i] instanceof AmazonRainforest) \n output += (i+1) + \". \" + ((AmazonRainforest)regionList[i]).toString();\n }\n return output;\n }", "public List<Region> getAllRegions() {\n\t\treturn regionDao.findWithNamedQuery(Region.QUERY_FIND_ALL, null);\n\t}", "private List<Region> experimentSuperDenseRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36199654330529, -71.09211625725555);\n\t\tr.addVertex(42.362892351545966, -71.09046401650238);\n\t\tr.addVertex(42.362234369747256, -71.08898343712616);\n\t\tr.addVertex(42.36113243298882, -71.09136523873138);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361921154176926);\n\t\tl.setLongitude(-71.09134912490845);\n\t\tlog(String.format(\"Test point Stata-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public ArrayOfAnimalModel getAnimals() {\n return localAnimals;\n }", "private static void mostrarRegiones (List<Regions> list)\n\t{\n\t\tIterator<Regions> it = list.iterator();\n\t\tRegions rg;\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\trg = it.next();\n\t\t\tSystem.out.println(rg.getRegionName() + \" \" +rg.getRegionId());\n\t\t\tSet<Countries> paises = rg.getCountrieses();\n\t\t\tSystem.out.println(\"PAISES\");\n\t\t\tIterator<Countries> it_paises = paises.iterator();\n\t\t\t\n\t\t\twhile (it_paises.hasNext())\n\t\t\t{\n\t\t\t\tCountries country = it_paises.next();\n\t\t\t\tSystem.out.println(country.getCountryName());\n\t\t\t}\n\t\t}\n\t}", "default List<SemanticRegion<T>> allChildren() {\n List<SemanticRegion<T>> result = new LinkedList<>();\n for (SemanticRegion<T> r : this) {\n result.add(r);\n }\n return result;\n }", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }", "public List<Region> gets() {\r\n return rdao.getAllRegion();\r\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public java.util.ArrayList<Species> getAllSpecies() {\n ArrayList<Species> answer = new ArrayList<Species>();\n getAllDescendantSpecies(overallRoot, answer);\n return answer;\n \n }", "@GetMapping\n\tpublic List<PlantingArea> findAll() {\n\t\treturn plantAreaServ.findAll();\n\t}", "List<RegionalClassifierEntity> getItsListOfRegions();", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "public void printAll(){\n for (Triangle triangle : triangles) {\n System.out.println(triangle.toString());\n }\n for (Circle circle : circles) {\n System.out.println(circle.toString());\n }\n for (Rectangle rectangle : rectangles) {\n System.out.println(rectangle.toString());\n }\n }", "public Regions getRegions () {\n return this.regions;\n }", "public Animal findAnimalZoo(String species) {\n for (int i = 0; i < numRegions; i++) {\n Animal[] temp = regionList[i].getRegionAnimals(); //regionList[i].getAnimalList(); @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ NO GETANIMALIST METHOD YET@@@@@@@@@@@@@@@@@@@@@@@@@\n for (int j = 0; j < regionList[i].getRegionSpec().getNumAnimals(); j++) {\n if (temp[j].getSpecies().equals(species)) {\n return temp[i]; \n }\n }\n }\n return null;\n }", "@Override\n protected void printAggregates() {\n printRetrieveStudyAggregates(queryInstancesAggregates, firstResponseAggregates,\n firstFrameAggregates, totalAggregates, transferRateAggregates, frameRateAggregates);\n }", "public void exerciseAnimals() {\n System.out.println(\"Letting the animals get their exercise...\\n\");\n for (int i = 0; i < zoo.length; i++){\n zoo[i].roam();\n }\n System.out.println();\n }", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "@Override\n\tpublic void tipoAnimal() {\n\t\tSystem.out.println(super.getNome() + \" é um gato.\");\n\t}", "public void printDogsOfGender(String gender){\n System.out.println(\"Here are the \" + gender + \" dogs in the shelter:\");\n ArrayList<Dog> specificDogs = dogsOfGender(gender);\n for(Dog d : specificDogs){d.printInfo();}\n }", "public void print()\n\t{\n\t\tminGenes = Integer.MAX_VALUE;\n\t\tmaxGenes = 0;\n\t\tcreatureGenesQty = 0;\n\t\tfor (Creature creature : creatures)\n\t\t{\n\t\t\tminGenes = (minGenes > creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : minGenes;\n\t\t\tmaxGenes = (maxGenes < creature.getGenotype().size()) ? creature\n\t\t\t\t\t.getGenotype().size() : maxGenes;\n\t\t\tcreatureGenesQty += creature.getGenotype().size();\n\t\t\t//creature.print();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t}\n\t\tavgGenes = creatureGenesQty / ((float) size());\n\n\t\t// add some statistics\n\t\tSystem.out.println(\"Population size: \" + size());\n\t\tSystem.out.println(\"Minimum number of genes: \" + minGenes);\n\t\tSystem.out.println(\"Average number of genes: \" + avgGenes);\n\t\tSystem.out.println(\"Maximum number of genes: \" + maxGenes);\n\t\tCreatureLog.info(String.valueOf(size()) + \"\\t\" + avgGenes + \"\\t\" + minGenes + \"\\t\" +maxGenes);\n\n\t}", "public TypeOfRegion getRegion();", "@Query(\"from Region\")\n\tpublic List<Region> findAllRegiones();", "@Override\r\n\tpublic String toString() {\r\n\r\n\t\treturn \"My rectangle's Areas is \"+area();\r\n\t}", "@Override\n\tpublic List<Staff> all() {\n\t\treturn staffMapper.all();\n\t}", "public String toString()\n\t{\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < 20; i++)\n\t\t{\n\t\t\tString animalType = \"Fish\";\n\t\t\tString genderType = \"F\";\n\t\t\t\n\t\t\tif (river[i] != null)\n\t\t\t{\n\t\t\t\tif (river[i].getGender()) { genderType = \"M\"; }\n\t\t\t\tif (river[i] instanceof Bear) { animalType = \"Bear\"; }\n\t\t\t output += String.format(\"Index %d: %s (Gender: %s | Strength: %.1f)\\n\", i, animalType, genderType, river[i].getStrength());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toutput += String.format(\"Index %d: \\n\", i);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}", "protected abstract void getAllUniformLocations();", "@Override\n public String toString() {\n return getClass().getName() + \"@balls: \" + balls.toString();\n }", "@Test\n\tpublic void findAll() {\n\t\tList<Farm> list = (List<Farm>) farmRepository.findAll();\n\n\t\tSystem.out.println(\"info:\"+ list);\n\t\tassert(true);\n\n\t}", "void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}", "public static void printPopulation() {\n printPopulation(false);\n }", "public void printSpeciesData(){\n\n System.out.println(\"A \" + this.name + \" has \" + this.legs + \" legs, \" + this.numberOfWings +\n \" wings, it is \" + this.wingColor + \", and likes a plant called \" + this.favFlower);\n\n }", "IRegion getRegion();", "public static java.util.List<de.fraunhofer.fokus.movepla.model.Region> findAll()\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().findAll();\n }", "public void printRegionStatus() {\n for (int i = 0; i < numRegions; i++) {\n System.out.print(regionList[i].getRegionName() + \" is \");\n if (regionList[i].checkOpen()) {\n System.out.println(\"open. :D\");\n } else {\n System.out.println(\"closed. D:\");\n }\n }\n }", "public String getRegionFullName() {\n return regionFullName;\n }", "void print() {\n float a = area();\n System.out.println(\"Donut with inner radius \"+r2+\" and outer radius \"+r1+\" has area of \"+a);\n }", "public java.lang.String getAnimalName() {\n return localAnimalName;\n }", "public void printCoordinates ()\n\t{\n\t\tfor (int a = 0; a < object.size(); a++)\n\t\t{\n\t\t\tSystem.out.println(\"Polygon \" + (a+1) + \":\");\n\t\t\tobject.get(a).detailedPrint();\n\t\t\tSystem.out.println(\"**********\");\n\t\t}\n\t}", "Region region();", "Region region();", "Region region();", "Region region();", "public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }", "@Override\r\n\tpublic List<Areas> queryAllHArea() {\n\t\treturn adi.queryAllHArea();\r\n\t}", "public void print() {\n\t\t\n\t\tfor(Solution sol : population) {\n\t\t\tSystem.out.println(sol.getPossibleSolution() + \" \" + sol.getPath());\n\t\t}\n\t}", "public static void displayRestaurants(Category category){\n ArrayList<Restaurant> restaurants = Restaurant.getCategorizedRestaurants(category.getCategory_id());\n for(int i = 0; i < restaurants.size(); i++){\n System.out.println(\"[\" + (i+1) + \"] \" + restaurants.get(i).getRestaurant_name());\n }\n\n }", "private void seeAnimal() {\n\r\n\t}", "public List<PDGRegion> getPDGRegions();", "public ShowRegionElements getShowRegionAccess() {\n\t\treturn pShowRegion;\n\t}", "public List<String> regions() {\n return this.regions;\n }", "private static void displayStat() {\n Collection<Zone> zones = Universe.getInstance().getCarte().getCarte().values();\r\n System.out.println(\"Nb de personnes créées : \" + Universe.getInstance().getCarte().getPopulation().size());\r\n\r\n\r\n System.out.println(\"Nb de personnes créées en mer : \" + getPopulationByTile(Zone.Tile.SEA));\r\n System.out.println(\"Nb de personnes créées en plaine : \" + getPopulationByTile(Zone.Tile.EARTH));\r\n System.out.println(\"Nb de personnes créées en foret : \" + getPopulationByTile(Zone.Tile.FOREST));\r\n System.out.println(\"Nb de personnes créées en ville : \" + getPopulationByTile(Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer : \" + getSurfaceByTile(zones, Zone.Tile.SEA));\r\n System.out.println(\"Surface plaine : \" + getSurfaceByTile(zones, Zone.Tile.EARTH));\r\n System.out.println(\"Surface foret : \" + getSurfaceByTile(zones, Zone.Tile.FOREST));\r\n System.out.println(\"Surface ville : \" + getSurfaceByTile(zones, Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Densité mer : \" + new Double(getPopulationByTile(Zone.Tile.SEA) / getSurfaceByTile(zones, Zone.Tile.SEA)));\r\n System.out.println(\"Densité plaine : \" + new Double(getPopulationByTile(Zone.Tile.EARTH)) / new Double(getSurfaceByTile(zones, Zone.Tile.EARTH)));\r\n System.out.println(\"Densité foret : \" + new Double(getPopulationByTile(Zone.Tile.FOREST)) / new Double(getSurfaceByTile(zones, Zone.Tile.FOREST)));\r\n System.out.println(\"Densité ville : \" + new Double(getPopulationByTile(Zone.Tile.TOWN)) / new Double(getSurfaceByTile(zones, Zone.Tile.TOWN)));\r\n\r\n System.out.println(\"---------------\");\r\n System.out.println(\"Surface mer deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n }", "public void printDogs(){\n System.out.println(\"Here are the dogs in the shelter:\");\n for(Dog d : dogs){\n d.printInfo();\n }\n }", "public void printAllRegionsEarnings() {\n for (int i = 0; i < numRegions; i++) {\n System.out.println(\"The earning of \" + regionList[i].getRegionName() + \" is $\" + regionList[i].calcEarnings());\n } //hey we need to change the double with the good proper formatting\n }", "@Override\n\tpublic List<Staff> FindAll() {\n\t\treturn sessionFactory.getCurrentSession()\n\t\t\t\t.createQuery(\"from Staff\")\n\t\t\t\t.list();\n\t}", "public void showAllLandmarks(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n for(int i = 0; i<landmarkList.size(); i++){\n if(landmarkList.get(i).data.type == \"Landmark\")\n drawLandmarks(landmarkList.get(i));\n }\n }", "public String toString() {\r\n\t\tString ret =zoneCode + \": \" + zoneName + \" Zone (\" + criticalSafetyRating + \" risk):\\n\";\r\n\t\tfor(int i = 0; i < this.aDinosaurs.size(); i++) {\t\t\t//for loop to get all the dinos\r\n\t\t\tret += this.aDinosaurs.get(i).toString() + \"\\n\";\t\t//in the array\r\n\t\t}\r\n\t\tret += \" \\n\";\r\n\t\treturn ret;\r\n\t}", "public List<GeoRegionInner> locations() {\n return this.locations;\n }", "public abstract java.util.Set getLocations();", "public String toString()\n {\n return getClass().getName() + \"[name=\" + name + \",area=\" + area + \"]\";\n }", "@Override\n\tpublic List<InstituteFormation> allFormations() {\n\t\treturn dao.allFormation();\n\t}", "public void print() {\n System.out.println(\"fish: \"+name+\", species= \"+species+\", color= \"+color+\", #fins= \"+fins);\n }", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "@Override\n\tpublic Iterable<Oglas> findAll() {\n\t\treturn repository.findAll();\n\t}", "@Override\n\t@Transactional\n\tpublic List<Area> findAll() {\n\t\treturn (List<Area>) dao.findAll();\n\t}", "public static void show() {\n Animal.Petdog.sleep();\n\n // The dog is going to bark.\n Animal.Petdog.bark();\n\n // Creating a new chicken and a new pig.\n Animal c= new Chicken();\n Animal g= new Pig();\n\n // The animals are going to sleep.\n c.sleep();\n g.sleep();\n\n // The animals are going to fight with dog.\n c.fightWithDog();\n g.fightWithDog();\n\n // The animals are going to exercise.\n c.exe();\n g.exe();\n\n // Chicken can also run with your set.\n c.exewithset(\"Run\");\n\n // The animals are going to breed.\n c.breed();\n g.breed();\n\n // The animals are going to do shower.\n c.shower();\n g.shower();\n\n // Let's see how many product do we have before animals produce products.\n System.out.println(\"Chicken meat: \" +Chickenmeat.amount+\"\\nEggs: \"+ Eggs.amount) ;\n System.out.println(\"Pork: \" +Pork.amount) ;\n\n // The animals are going to produce external product.\n c.producewithoutdeath();\n g.producewithoutdeath();\n\n // The animals are going to produce internal product.\n c.producewithdeath();\n g.producewithdeath();\n\n // Let's see how many product do we have after animals produce products.\n System.out.println(\"Chicken meat: \" +Chickenmeat.amount+\"\\nEggs: \"+ Eggs.amount) ;\n System.out.println(\"Pork: \" +Pork.amount) ;\n\n // Get currnet states of the animals.\n c.getstate();\n g.getstate();\n\n // The dead animals regain life.\n c.setstate();\n g.setstate();\n c.getstate();\n g.getstate();\n\n\n }", "public java.lang.String getAnimalId() {\n return localAnimalId;\n }", "@Secured({\"ROLE_ADMIN\",\"ROLE_USER\"})\n\t@GetMapping(\"/regiones\")\n\tpublic List<Region> index() {\n\t\treturn regionService.findAll();\n\t}", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "@GET\r\n\t@Produces(\"application/JSON\")\r\n\tpublic List<ZooStaff> getAllStaffs(){\r\n\t\treturn service.getAllStaffs();\r\n\t}", "abstract public void showAllStudents();", "void examineContainers(){\n\t\t\tif (this.receptacle != null)//checks and sees if there's any containers in the location.\n\t\t\t\tfor (int i = 0; i < this.receptacle.size(); i++)\n\t\t\t\t\tif (!(this.receptacle.get(i) instanceof SpecialtyContainer))//if it's a hidden container, you don't know it's there, but it is...\n\t\t\t\t\t\tSystem.out.print(this.receptacle.get(i).contName + \", \");\n\t\t}", "public String toString()\n {\n String contents = \"\";\n double totalArea = 0;\n \n contents = contents + \"\\nThere are \" + shapes.size() + \" shapes in the container.\\n\";\n \n for(int i = 0; i < shapes.size(); i++)\n {\n totalArea = totalArea + shapes.get(i).getArea();\n contents = contents + shapes.get(i).toString();\n }\n contents = contents + \"\\nand total area of shapes is \" + totalArea + \"\\n\";\n return contents;\n }", "public Region getRegion() {\n return region;\n }", "protected void showReservations() {\n storageDao.findAllRented()\n .forEach(System.out::println);\n }", "public boolean showAllOccupationTypes() {\n return occupationTypes.contains(OccupationType.TOIMINNANOHJAAJA);\n }", "void printSeasonalFruit() { System.out.println( name() + \" : Mango\" ); }", "private int viewAllAnimalHelper() {\n\t\tSystem.out.println(\n\t\t\t\t\"1. VIEW ALL ANIMALS 2. TIGER 3. LEOPARD \" + '\\n' + \"4. LYNX 5. MARMOSET 6. CAPUCHIN 7. QEUIRREL\");\n\t\tint choose = intKeyboardInput();\n\t\tint rst;\n\t\tswitch (choose) {\n\t\tcase 1:\n\t\t\trst = 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\trst = 2;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\trst = 3;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\trst = 4;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\trst = 5;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\trst = 6;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\trst = 7;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\trst = viewAllAnimalHelper();\n\t\t\tbreak;\n\t\t}\n\t\treturn rst;\n\t}", "@Override\r\n\tpublic List<Disease> findAll() {\r\n\t\t// setting logger info\r\n\t\tlogger.info(\"Find the details of the disease\");\r\n\t\treturn diseaseRepo.findAll();\r\n\t}", "public List getZonasRegion(String feriadoRegion);", "public void printAll(){\n\t\tSystem.out.println(\"Single hits: \" + sin);\n\t\tSystem.out.println(\"Double hits: \" + doub);\n\t\tSystem.out.println(\"Triple hits: \" + trip);\n\t\tSystem.out.println(\"Homerun: \" + home);\n\t\tSystem.out.println(\"Times at bat: \" + atbat);\n\t\tSystem.out.println(\"Total hits: \" + hits);\n\t\tSystem.out.println(\"Baseball average: \" + average);\n\t}", "int getIndividualStamina();", "@Override\r\n\tpublic List<Area> getAreaList() {\n\t\tList<Area> areaList = areaDao.selectArea();\r\n\t\tSystem.out.println(areaList);\r\n\t\t\r\n\t\treturn areaList;\r\n\t}", "@Override\n public String toString() {\n return \"==========SELLER==========\\n\" + \"\\nID = \" + id + \"\\nName = \" + name + \"\\nPhone number = \" + phoneNumber + \"\\nLocation = \"\n + getLocation().getProvince() + \", \" + getLocation().getCity();\n }", "public Set<GeneralRegion> getMemberRegions() {\n\t\tSet<GeneralRegion> result = new HashSet<>();\n\t\tfor(String name : getMembers()) {\n\t\t\tresult.add(plugin.getFileManager().getRegion(name));\n\t\t}\n\t\treturn result;\n\t}", "public void printDogsOfBreed(String breed){\n System.out.println(\"Here are the \" + breed + \" dogs in the shelter:\");\n ArrayList<Dog> specificDogs = dogsOfBreed(breed);\n for(Dog d : specificDogs){d.printInfo();}\n }", "public String toString(){\r\n //Add mammal toString to output\r\n output = super.toString();\r\n output += \"Location = \"+location+\"\\nClassification = \"+classification+\"\\nCoat = \"+coat+\"\\n\";\r\n \r\n //If male add additional output\r\n if(gender == \"Male\"){\r\n output+=\"Male lemur = Non-dominant role\\n\";\r\n }\r\n //If female add additional output\r\n else{\r\n output+=\"Female lemur = Dominant role\\n\";\r\n }\r\n return output;\r\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public Page<HeritageRegionName> findAll(Pageable pageable);", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "public List<BoundingRegion> getBoundingRegions() {\n return this.boundingRegions;\n }", "public final void print() {\n\t\tSystem.out.println(\"Le nom du groupe est : \" + this.nomGroupe);\n\n\t\tfor (InterfacePersonne per : personnel) {\n\t\t\tper.print(); // Delegation\n\t\t}\n\t}" ]
[ "0.5809343", "0.5763076", "0.56980616", "0.5647993", "0.56228155", "0.5612918", "0.5510828", "0.5447719", "0.5425732", "0.5404216", "0.5401044", "0.5375743", "0.5346203", "0.53209424", "0.5314111", "0.526563", "0.5261116", "0.5220402", "0.51929885", "0.5177964", "0.51479185", "0.5143092", "0.5129353", "0.51284176", "0.5124343", "0.5106365", "0.50972855", "0.50739694", "0.5054557", "0.504906", "0.5047269", "0.50407505", "0.5034571", "0.5029312", "0.5023264", "0.50160015", "0.4997227", "0.49953568", "0.49833336", "0.49812216", "0.49747923", "0.49539816", "0.4944002", "0.49383843", "0.49280483", "0.49209526", "0.49157903", "0.4915055", "0.4914133", "0.4914133", "0.4914133", "0.4914133", "0.49119502", "0.49075037", "0.4896251", "0.4886574", "0.48842815", "0.48826343", "0.4870071", "0.48696575", "0.48668674", "0.48637918", "0.48627102", "0.48529473", "0.48453763", "0.48348442", "0.4832612", "0.48291832", "0.48288268", "0.48263806", "0.48176184", "0.48168054", "0.48156688", "0.48147982", "0.48118696", "0.48118255", "0.48115918", "0.48063958", "0.48062238", "0.48049316", "0.48024085", "0.48016712", "0.48015243", "0.47899333", "0.47727367", "0.47697592", "0.47686887", "0.4767842", "0.47535008", "0.4751442", "0.47501233", "0.47428933", "0.47414097", "0.473988", "0.47388518", "0.47360316", "0.47350973", "0.47281185", "0.4723738", "0.47222158", "0.4721663" ]
0.0
-1
findRegion method Outputs all the Regions
public String toString() { String output = ""; for (int i = 0; i < numRegions; i++) { if (regionList[i] instanceof Arctic) output += (i+1) + ". " + ((Arctic)regionList[i]).toString(); else if (regionList[i] instanceof Aquarium) output += (i+1) + ". " + ((Aquarium)regionList[i]).toString(); else if (regionList[i] instanceof AmazonRainforest) output += (i+1) + ". " + ((AmazonRainforest)regionList[i]).toString(); } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static java.util.List<de.fraunhofer.fokus.movepla.model.Region> findAll()\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().findAll();\n }", "IRegion getRegion();", "public List<Region> getAllRegions() {\n\t\treturn regionDao.findWithNamedQuery(Region.QUERY_FIND_ALL, null);\n\t}", "public Regions getRegions () {\n return this.regions;\n }", "private List<Region> experimentFullRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Vassar St\n\t\tr = new Region(\"Vassar-1\");\n\t\tr.addVertex(42.36255147026933, -71.09034599930573);\n\t\tr.addVertex(42.36240877523236, -71.08975591332245);\n\t\tr.addVertex(42.36013353836458, -71.09434785515595);\n\t\tr.addVertex(42.360442721730834, -71.0948091951065);\n\t\trs.add(r);\n\n\t\t// Windsor-1\n\t\tr = new Region(\"Windsor-1\");\n\t\tr.addVertex(42.36302711805193, -71.09707297951508);\n\t\tr.addVertex(42.36297955343571, -71.09641852051544);\n\t\tr.addVertex(42.3615288153431, -71.09657945305634);\n\t\tr.addVertex(42.36186970216797, -71.09723391205597);\n\t\trs.add(r);\n\n\t\t// Mass-1\n\t\tr = new Region(\"Mass-1\");\n\t\tr.addVertex(42.362678310030105, -71.0995620694809);\n\t\tr.addVertex(42.3629954083118, -71.09918656021881);\n\t\tr.addVertex(42.36179042632724, -71.09720172554779);\n\t\tr.addVertex(42.361322696830854, -71.09736265808868);\n\t\trs.add(r);\n\n\t\t// Mass-2\n\t\tr = new Region(\"Mass-2\");\n\t\tr.addVertex(42.36114036066024, -71.09588207871246);\n\t\tr.addVertex(42.360791542163774, -71.09660091072845);\n\t\tr.addVertex(42.36106901157985, -71.0969335046463);\n\t\tr.addVertex(42.36156052582344, -71.09657945305634);\n\t\trs.add(r);\n\n\t\t// Mass-3\n\t\tr = new Region(\"Mass-3\");\n\t\tr.addVertex(42.36035551632001, -71.09489502579498);\n\t\tr.addVertex(42.3601731773427, -71.09523834854889);\n\t\tr.addVertex(42.360577493491306, -71.095978638237);\n\t\tr.addVertex(42.36077568673155, -71.0955816713028);\n\t\trs.add(r);\n\n\t\t/*\n\t\t * Albany-1-full r = new Region(\"Albany-1\");\n\t\t * r.addVertex(42.36087874696942, -71.09530272156525);\n\t\t * r.addVertex(42.361227564981775, -71.0956353154831);\n\t\t * r.addVertex(42.362678310030105, -71.092556139534);\n\t\t * r.addVertex(42.362527687785665, -71.09185876519012); rs.add(r);\n\t\t */\n\n\t\t// Albany-1\n\t\tr = new Region(\"Albany-1\");\n\t\tr.addVertex(42.36172700558263, -71.09442295700836);\n\t\tr.addVertex(42.3614891772202, -71.09410109192658);\n\t\tr.addVertex(42.360823253016186, -71.09553875595856);\n\t\tr.addVertex(42.361084866938036, -71.09590353638458);\n\t\trs.add(r);\n\n\t\t// Albany-2\n\t\tr = new Region(\"Albany-2\");\n\t\tr.addVertex(42.362678310030105, -71.09243812233734);\n\t\tr.addVertex(42.36253561528121, -71.09191240937042);\n\t\tr.addVertex(42.36180628150339, -71.09342517525482);\n\t\tr.addVertex(42.36223436974708, -71.09344663292694);\n\t\trs.add(r);\n\n\t\t// Portland-1\n\t\tr = new Region(\"Portland-1\");\n\t\tr.addVertex(42.362757584750575, -71.09386505753326);\n\t\tr.addVertex(42.36273380234492, -71.09342517525482);\n\t\tr.addVertex(42.36217887699113, -71.09354319245148);\n\t\tr.addVertex(42.36198861574153, -71.09409036309052);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-1\");\n\t\tr.addVertex(42.36321737615673, -71.09918656021881);\n\t\tr.addVertex(42.36356618118581, -71.09917583138275);\n\t\tr.addVertex(42.36342348845344, -71.0969335046463);\n\t\tr.addVertex(42.363042972916034, -71.09699787766266);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-2\");\n\t\tr.addVertex(42.36318566651262, -71.09384359986115);\n\t\tr.addVertex(42.36278929461076, -71.09392943054962);\n\t\tr.addVertex(42.36297162599619, -71.09643997818756);\n\t\tr.addVertex(42.36336799674776, -71.09641852051544);\n\t\trs.add(r);\n\n\t\t// Main-3\n\t\tr = new Region(\"Main-3\");\n\t\tr.addVertex(42.36300333574834, -71.09216990143585);\n\t\tr.addVertex(42.36271794740286, -71.09249176651764);\n\t\tr.addVertex(42.36277343968266, -71.09333934456635);\n\t\tr.addVertex(42.363106392332284, -71.09324278504181);\n\t\trs.add(r);\n\n\t\t// Main-4\n\t\tr = new Region(\"Main-4\");\n\t\tr.addVertex(42.36289235154579, -71.09035672814178);\n\t\tr.addVertex(42.36259110772208, -71.09038891464996);\n\t\tr.addVertex(42.36264660011392, -71.09166564614105);\n\t\tr.addVertex(42.36303504548448, -71.09157981545258);\n\t\trs.add(r);\n\n\t\tLocation l;\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36035940296916);\n\t\tl.setLongitude(-71.0944926738739);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36081921192526);\n\t\tl.setLongitude(-71.09338760375977);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36160405047349);\n\t\tl.setLongitude(-71.0919177532196);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3619370093201);\n\t\tl.setLongitude(-71.09123110771179);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36234924163794);\n\t\tl.setLongitude(-71.09039425849915);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3631736981596);\n\t\tl.setLongitude(-71.09626293182373);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36303893196785);\n\t\tl.setLongitude(-71.09436392784119);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362935875273244);\n\t\tl.setLongitude(-71.09288334846497);\n\t\tlog(String.format(\"Test point on Main-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362785253646265);\n\t\tl.setLongitude(-71.09100580215454);\n\t\tlog(String.format(\"Test point on Main-3 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362476081807);\n\t\tl.setLongitude(-71.0936987400055);\n\t\tlog(String.format(\"Test point on Portland-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36099362133876);\n\t\tl.setLongitude(-71.09561920166016);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36154855716084);\n\t\tl.setLongitude(-71.0943853855133);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362008357414815);\n\t\tl.setLongitude(-71.093430519104);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362610849206014);\n\t\tl.setLongitude(-71.09221816062927);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3611521749309);\n\t\tl.setLongitude(-71.09653115272522);\n\t\tlog(String.format(\"Test point on Mass-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3604862471552);\n\t\tl.setLongitude(-71.09537243843079);\n\t\tlog(String.format(\"Test point on Mass-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36238887921827);\n\t\tl.setLongitude(-71.09683156013489);\n\t\tlog(String.format(\"Test point on Windsor-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public List<Region> gets() {\r\n return rdao.getAllRegion();\r\n }", "public List<Region> find(Object data) {\r\n return rdao.searchByRegions(data);\r\n }", "public List<PDGRegion> getPDGRegions();", "private List<Region> stataRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36218276352746, -71.08994364738464);\n\t\tr.addVertex(42.36207970542849, -71.08879566192627);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\trs.add(r);\n\n\t\t// Region 2\n\t\tr = new Region(\"Stata-2\");\n\t\tr.addVertex(42.36184980598321, -71.08983635902405);\n\t\tr.addVertex(42.36181809564884, -71.08882784843445);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\trs.add(r);\n\n\t\t// Region 3\n\t\tr = new Region(\"Stata-3\");\n\t\tr.addVertex(42.36158819524629, -71.08986854553223);\n\t\tr.addVertex(42.361556484779946, -71.08887076377869);\n\t\tr.addVertex(42.36131865577206, -71.08895659446716);\n\t\tr.addVertex(42.361366221645646, -71.08989000320435);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36196871959442);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 1 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361659543737126);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 2 is in region %s\", getRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36140585984613);\n\t\tl.setLongitude(-71.0893964767456);\n\t\tlog(String.format(\"Test point 3 is in region %s\", getRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public List<Region> listRegions() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Region.class);\n\t}", "@Query(\"from Region\")\n\tpublic List<Region> findAllRegiones();", "public TypeOfRegion getRegion();", "public List<String> regions() {\n return this.regions;\n }", "public Region findRegion(Staff find) {\n for (int i = 0; i < numRegions; i++) {\n Staff[] temp = regionList[i].getRegionStaff();\n for (int j = 0; j < regionList[i].getRegionSpec().getNumStaff(); j++) {\n if (temp[j].equals(find)) {\n return regionList[i]; \n }\n }\n }\n return null;\n }", "public java.util.Enumeration getRegion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n return ejbRef().getRegion();\n }", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "public CoordinateRadius getRegion();", "Region region();", "Region region();", "Region region();", "Region region();", "@Override\n\tpublic List<Regioni> findTutti() {\n\t\tList<RegioniEntity> listRegEnt = regioniRepository.findAll();\n\t\tList<Regioni> regioni = new ArrayList<>();\n\t\tfor(RegioniEntity regEnt : listRegEnt) {\t\n\t\t\tRegioni reg = new Regioni();\t\n\t\t\treg.setId(regEnt.getId());\n\t\t\treg.setRegione(regEnt.getNomeRegione());\n\t\t\tregioni.add(reg);\n\t\t}\n\t\t\n\t\treturn regioni;\n\t}", "List<RegionalClassifierEntity> getItsListOfRegions();", "private static List<ProtectedRegion> getRegionsInRegion(ProtectedRegion inputRegion, World world) {\n\t\t\n\t\tList<ProtectedRegion> regionsInsideRegion = new ArrayList<ProtectedRegion>();\n\t\t\n\t\tRegionManager regionManager = Mcc.worldGuard.getRegionManager(world);\n\t\tList<ProtectedRegion> regionList = new ArrayList<ProtectedRegion>(regionManager.getRegions().values());\n\t\tfor(ProtectedRegion region: regionList){\n\t\t\tif(inputRegion.containsAny(region.getPoints())){\n\t\t\t\tregionsInsideRegion.add(region);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn regionsInsideRegion;\n\t}", "public void findByRegion(String region)\n {\n boolean found = false;\n for(KantoDex entry : entries)\n {\n if(entry.getRegion().equals(region))\n {\n found = true;\n }\n }\n if(!found)\n {\n System.out.println(\"You have input a nonexistent region.\"); \n }\n else\n {\n System.out.println(region + \" Region entries:\");\n for(KantoDex entry : entries)\n {\n if(entry.getRegion().equals(region))\n {\n entry.display();\n }\n }\n }\n }", "public Gel_BioInf_Models.File getRelevantRegions() {\n return relevantRegions;\n }", "public Gel_BioInf_Models.File getRelevantRegions() {\n return relevantRegions;\n }", "public void printRegionsNames() {\n for (int i = 0; i < regionList.length; i++) {\n System.out.println(\"Region #\" + (i + 1) + \": \" + regionList[i].getRegionName());\n }\n }", "private List<Region> experimentSuperDenseRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Region 1\n\t\tr = new Region(\"Stata-1\");\n\t\tr.addVertex(42.36199654330529, -71.09211625725555);\n\t\tr.addVertex(42.362892351545966, -71.09046401650238);\n\t\tr.addVertex(42.362234369747256, -71.08898343712616);\n\t\tr.addVertex(42.36113243298882, -71.09136523873138);\n\t\trs.add(r);\n\n\t\tlog(\"Testing regions and getRegion logic...\");\n\t\tLocation l;\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.361921154176926);\n\t\tl.setLongitude(-71.09134912490845);\n\t\tlog(String.format(\"Test point Stata-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "@Secured({\"ROLE_ADMIN\",\"ROLE_USER\"})\n\t@GetMapping(\"/regiones\")\n\tpublic List<Region> index() {\n\t\treturn regionService.findAll();\n\t}", "public Region findRegion(String name, int start, int end) { //recursion\n int middle = (start + end) / 2; \n if (end - start > 1) {\n if (findRegion(name, start, middle) != null) {\n return findRegion(name, start, middle);\n } else {\n return findRegion(name, middle, end);\n }\n } else {\n if (regionList[start].getRegionName().equals(name)) {\n return regionList[start];\n } else if (regionList[end].getRegionName().equals(name)) {\n return regionList[end];\n } else {\n return null; \n }\n }\n }", "public List getZonasRegion(String feriadoRegion);", "private static void mostrarRegiones (List<Regions> list)\n\t{\n\t\tIterator<Regions> it = list.iterator();\n\t\tRegions rg;\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\trg = it.next();\n\t\t\tSystem.out.println(rg.getRegionName() + \" \" +rg.getRegionId());\n\t\t\tSet<Countries> paises = rg.getCountrieses();\n\t\t\tSystem.out.println(\"PAISES\");\n\t\t\tIterator<Countries> it_paises = paises.iterator();\n\t\t\t\n\t\t\twhile (it_paises.hasNext())\n\t\t\t{\n\t\t\t\tCountries country = it_paises.next();\n\t\t\t\tSystem.out.println(country.getCountryName());\n\t\t\t}\n\t\t}\n\t}", "public List<MhsmGeoReplicatedRegionInner> regions() {\n return this.regions;\n }", "public Region getRegion() {\n return region;\n }", "@Test\n\tpublic void getAllByRegion() {\n\t\tList<String> consequenceTypeList = new ArrayList<String>();\n\t\tconsequenceTypeList.add(\"2KB_upstream_variant\");\n\t\tconsequenceTypeList.add(\"splice_region_variant\");\n\t\tList<Snp> snps = snpDBAdaptor.getAllByRegion(new Region(\"1\", 10327, 12807), consequenceTypeList);\n\t\tthis.printSNPList(\"getAllByRegion\", snps, 50);\n\t}", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public Set<GeneralRegion> getMemberRegions() {\n\t\tSet<GeneralRegion> result = new HashSet<>();\n\t\tfor(String name : getMembers()) {\n\t\t\tresult.add(plugin.getFileManager().getRegion(name));\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic List<Historic_siteVO> regionlistAll(Criteria cri) throws Exception {\n\t\treturn dao.regionlistAll(cri);\n\t}", "public static Finder<Long, Region> find() {\n return new Finder<Long, Region>(Long.class, Region.class);\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<String> getRegion() {\n\t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getRegion\");\r\n\t}", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public RegionManagementDetails getCompleteRegionDetails(String seasonId);", "public static String[] getRegion(String dataType, String region){\r\n String line = \"\"; \r\n try{ \r\n BufferedReader br = new BufferedReader(new FileReader(\"dataSets//Continents.csv\")); \r\n while ((line = br.readLine()) != null){\r\n String[] lineArr= line.split(\",\"); \r\n if(lineArr[0].equals(region)){\r\n String[] rez= new String[lineArr.length-1];\r\n for(int i=0; i!=rez.length; i++){\r\n rez[i]=lineArr[i+1];\r\n }\r\n return rez;\r\n }\r\n }\r\n }\r\n catch (IOException e){} \r\n return new String[]{\"Error404\"};\r\n }", "@RequestLine(\"GET /geoip/territories?codes={codes}\")\n Collection<Collection<Region>> getAvailableRegions(@Param(\"codes\") String codes);", "public EnumRegion getRegion()\n {\n return region;\n }", "public String getRegion() {\n return this.region;\n }", "public interface RegionService {\n\t\n\tRegion getById(Long id);\n\tList<Region> getAll();\n}", "@Override\n\tpublic List<Region> getAllRegionsByIdList(List<String> idList) {\n\t\treturn null;\n\t}", "public List<Integer> getRegionIds() {\r\n\t\tList<Integer> regionIds = new ArrayList<>();\r\n\t\tfor (int x = southWestX >> 6; x < (northEastX >> 6) + 1; x++) {\r\n\t\t\tfor (int y = southWestY >> 6; y < (northEastY >> 6) + 1; y++) {\r\n\t\t\t\tint id = y | x << 8;\r\n\t\t\t\tregionIds.add(id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn regionIds;\r\n\t}", "private void loadSearchRegions() {\n showProgress(ApplicationConstants.DIALOG_HEADER, \"Please wait while we retrieve matching results.\");\n String authToken = ShPrefManager.with(getActivity()).getToken();\n RestClient.getAPI().getRegions(authToken, new RestCallback<RegionsResponse>() {\n @Override\n public void failure(RestError restError) {\n hideProgress();\n OpenHomeUtils.showToast(getActivity().getApplicationContext(), restError.getErrorMessage(), Toast.LENGTH_LONG);\n }\n\n @Override\n public void success(RegionsResponse regionsResponse, Response response) {\n hideProgress();\n if (regionsResponse.getMessage().size() > 0) {\n regionsList = regionsResponse.getMessage();\n for (RegionsResponse.Regions region : regionsList) {\n listingsCount += region.getListingsCount();\n if (region.getParentId() == 0)\n adapterList.add(region);\n }\n regionsAdapter = new RegionsAdapter(getActivity(), adapterList, 0);\n mRecyclerView.setAdapter(regionsAdapter);\n currentAdapter = \"R\";\n listingsCountDisplayTextView.setText(listingsCount + \" Listings\");\n currentDisplayingParentId = 0;\n\n } else {\n String message = \"No results to display. Please modify the search criteria and try again.\";\n CustomDialogFragment regSuccessDialogFragment = CustomDialogFragment.newInstance(R.string.try_again,\n message, ApplicationConstants.BUTTON_OK, 0);\n regSuccessDialogFragment.show(getActivity().getFragmentManager(), \"SearchRegionsFragment\");\n }\n }\n });\n }", "public Page<HeritageRegionName> findAll(Pageable pageable);", "int getRegionValue();", "private int[] determineRegion(int X, int Y ,int H){\n int[] quadrantPoint = new int[2];\n for(int y = 0; y < BITMAP_SIZE /H; y++){\n for(int x = 0; x < BITMAP_SIZE /H; x++){\n Region reg = regions[x][y];\n if (X >= reg.leftX && X <= reg.rightX && Y >= reg.topY && Y <= reg.bottomY){\n quadrantPoint[0] = x;\n quadrantPoint[1] = y;\n return quadrantPoint;\n }\n }\n }\n\n return null;\n }", "private void loadSearchRegions() {\n showProgress(ApplicationConstants.DIALOG_HEADER, \"Please wait while we retrieve regions from server.\");\n String authToken = ShPrefManager.with(getActivity()).getToken();\n RestClient.getAPI().getRegions(authToken, new RestCallback<RegionsResponse>() {\n @Override\n public void failure(RestError restError) {\n OpenHomeUtils.showToast(getActivity().getApplicationContext(), \"Could not load regions from the server.\", Toast.LENGTH_LONG);\n }\n\n @Override\n public void success(RegionsResponse regionsResponse, Response response) {\n if (regionsResponse.getMessage().size() > 0) {\n regionsList = regionsResponse.getMessage();\n setOnClickListeners();\n populateRegions();\n } else {\n String message = \"There is an error loading data. Please contact administrator..\";\n CustomDialogFragment regSuccessDialogFragment = CustomDialogFragment.newInstance(R.string.try_again,\n message, ApplicationConstants.BUTTON_OK, 0);\n regSuccessDialogFragment.show(getActivity().getFragmentManager(), \"AddPropertyFragment\");\n }\n }\n });\n\n getAllHazards();\n }", "kr.pik.message.Profile.HowMe.Region getRegion();", "public ArrayList<EHVSS> getByRegion(String region){\n\t\tArrayList<EHVSS> ehvssNames=null;\n\t\ttry {\n\t\t\tConnection connection = DatabaseConnection.getConnection(\"mms_new\");\n\t\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM ehvss where region=?\");\n\t\t\tps.setString(1,region);\n\t\t\tResultSet rs=ps.executeQuery();\n\t\t\tehvssNames=new ArrayList<EHVSS>();\n\t\t\tresultSetParser(rs,ehvssNames);\n\t\t\trs.close();\n\t\t\tps.close();\n\t\t\t//System.out.println(\"Number of Ehvss Locations for region :\"+region+\" is :\"+ehvssNames.size());\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Exception in class : EhvssDAO : method : [getByRegion]\"+e);\n\t\t}catch (Exception exp) {\n\t\t\tSystem.out.println(\"Exception in class : EhvssDAO : method : [getByRegion]\"+exp);\n\t\t}\n\t\treturn ehvssNames;\n\t}", "default List<SemanticRegion<T>> allChildren() {\n List<SemanticRegion<T>> result = new LinkedList<>();\n for (SemanticRegion<T> r : this) {\n result.add(r);\n }\n return result;\n }", "public Collection<IRegionalValidity> getValidRegionList();", "@AutoEscape\n public String getRegion();", "public SystemRegionExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public List<BoundingRegion> getBoundingRegions() {\n return this.boundingRegions;\n }", "java.lang.String getRegionCode();", "public Region getSiteRegionBounds() {\n int numSources = eqkRupForecast.getNumSources();\n\n double minLat = Double.POSITIVE_INFINITY;\n double maxLat = Double.NEGATIVE_INFINITY;\n double minLon = Double.POSITIVE_INFINITY;\n double maxLon = Double.NEGATIVE_INFINITY;\n\n\n //Going over each and every source in the forecast\n for (int sourceIndex = 0; sourceIndex < numSources; ++sourceIndex) {\n // get the ith source\n ProbEqkSource source = eqkRupForecast.getSource(sourceIndex);\n int numRuptures = source.getNumRuptures();\n\n //going over all the ruptures in the source\n for (int rupIndex = 0; rupIndex < numRuptures; ++rupIndex) {\n ProbEqkRupture rupture = source.getRupture(rupIndex);\n\n RuptureSurface rupSurface = rupture.getRuptureSurface();\n\n //getting the iterator for all points on the rupture\n ListIterator it = rupSurface.getLocationsIterator();\n boolean rupInside = false;\n //looping over all the rupture pt locations and if any of those lies\n //within the provided distance range then include the rupture in the list.\n while (it.hasNext()) {\n Location ptLoc = (Location) it.next();\n if (region.contains(ptLoc)) {\n rupInside = true;\n break;\n }\n }\n it = rupSurface.getLocationsIterator();\n while (it.hasNext() && rupInside) {\n Location ptLoc = (Location) it.next();\n double lat = ptLoc.getLatitude();\n double lon = ptLoc.getLongitude();\n double depth = ptLoc.getDepth();\n if (lat < minLat)\n minLat = lat;\n if (lat > maxLat)\n maxLat = lat;\n if (lon < minLon)\n minLon = lon;\n if (lon > maxLon)\n maxLon = lon;\n if (depth > maxDepth)\n maxDepth = depth;\n }\n }\n }\n return new Region(\n \t\tnew Location(minLat, minLon),\n \t\tnew Location(maxLat, maxLon));\n }", "public static java.lang.String getRegion(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "@Delegate\n @Path(\"/projects/{project}/regions/{region}\")\n RegionOperationApi getRegionOperationApi(@PathParam(\"project\") String project, @PathParam(\"region\") String region);", "public Map<List<Cage>, Region> getRegionsContainingCages(){\n\t\tMap<List<Cage>, Region> regionMap = new HashMap<>();\n\t\tfor(int i=1;i<=9;i++){\n\t\t\tList<Cage> cageRowList = new ArrayList<>();\n\t\t\tList<Cage> cageColumnList = new ArrayList<>();\n\t\t\tList<Cage> cageNonetList = new ArrayList<>();\n\t\t\tfor(Cage c : grid.getCages()){\n\t\t\t\tList<Location> locations = c.getCellLocations();\n\t\t\t\tboolean sameRow = true;\n\t\t\t\tboolean sameColumn = true;\n\t\t\t\tboolean sameNonet = true;\n\t\t\t\tfor(Location l : locations){//check if all cells within a cage are in the same location\n\t\t\t\t\tif(l.getRow()!=i) sameRow = false;\n\t\t\t\t\tif(l.getColumn()!=i) sameColumn = false;\n\t\t\t\t\tif(l.getNonet()!=i) sameNonet = false;\n\t\t\t\t}\n\t\t\t\tif(sameRow){\n\t\t\t\t\tcageRowList.add(c);\n\t\t\t\t}\n\t\t\t\tif(sameColumn){\n\t\t\t\t\tcageColumnList.add(c);\n\t\t\t\t}\n\t\t\t\tif(sameNonet){\n\t\t\t\t\tcageNonetList.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!cageRowList.isEmpty()) regionMap.put(cageRowList, Region.getInstance(Type.Row, i));\n\t\t\tif(!cageColumnList.isEmpty()) regionMap.put(cageColumnList, Region.getInstance(Type.Column, i));\n\t\t\tif(!cageNonetList.isEmpty()) regionMap.put(cageNonetList, Region.getInstance(Type.Nonet, i));\n\t\t}\n\t\treturn regionMap;\n\t}", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public boolean findRegionDesc(String regAux);", "public void printRegionStatus() {\n for (int i = 0; i < numRegions; i++) {\n System.out.print(regionList[i].getRegionName() + \" is \");\n if (regionList[i].checkOpen()) {\n System.out.println(\"open. :D\");\n } else {\n System.out.println(\"closed. D:\");\n }\n }\n }", "public Vector findRegionList(\n String searchBy,\n String name,\n Boolean isAllSupregs,\n Integer supregid,\n Integer order)\n throws Exception {\n\n DebugSupport.printlnTest(\"!!RegionObject findRegionList name=\"+name);\t\n Query query = new Query();\n query.append(\n \"SELECT r.regionid regionid, r.regname regname, r.supregid supregid, sr.supregname supregname\");\n query.append(\"FROM Regions r, Superregions sr\");\n query.append(\"WHERE r.supregid=sr.supregid\");\n\n if (searchBy.equals(SearchConstants.SEARCHBY_NAME)) {\n query.append(\"AND r.regname matches upper(?)\", name);\n }\n if (!isAllSupregs.booleanValue()) {\n query.append(\"AND r.supregid=?\", supregid);\n }\n query.append(\"ORDER BY\");\n if (order.intValue() == ORDER_BY_CODE_ASC) {\n query.append(\"1\");\n }else if (order.intValue() == ORDER_BY_CODE_DESC) {\n query.append(\"1 DESC\");\n }else if (order.intValue() == ORDER_BY_SUPREGNAME_ASC) {\n query.append(\"4,2\");\n }else if (order.intValue() == ORDER_BY_SUPREGNAME_DESC) {\n query.append(\"4 DESC,2 DESC\");\n }else if (order.intValue() == ORDER_BY_REGNAME_ASC) {\n query.append(\"2\");\n }else if (order.intValue() == ORDER_BY_REGNAME_DESC) {\n query.append(\"2 DESC\");\n }\n return findVector(query);\n}", "public QueryResult<Variant> getAllVariantsByRegion(Region region, QueryOptions options);", "@Override\n\tpublic int regionAllcount() throws Exception {\n\t\treturn dao.regionAllcount();\n\t}", "@Override\n\tpublic List<Historic_siteVO> readRegionImage(int bno) throws Exception {\n\t\treturn dao.readRegionImage(bno);\n\t}", "public int getRegionid() {\n return regionid;\n }", "public void testGetRecursiveChildRegions() {\r\n\t\ttry {\r\n\t\t\tList<Long> regions = regionMgr.getRecursiveChildRegions(RegionTestBuilder.REGION_ID_KARNATAKA);\r\n\t\t\tassertTrue(\"Unable to get all cities for the state\", regions.size() == 35);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public synchronized List<HRegionInfo> getRegionsOfTable(FullyQualifiedTableName tableName) {\n List<HRegionInfo> tableRegions = new ArrayList<HRegionInfo>();\n // boundary needs to have table's name but regionID 0 so that it is sorted\n // before all table's regions.\n HRegionInfo boundary = new HRegionInfo(tableName, null, null, false, 0L);\n for (HRegionInfo hri: regionAssignments.tailMap(boundary).keySet()) {\n if(!hri.getFullyQualifiedTableName().equals(tableName)) break;\n tableRegions.add(hri);\n }\n return tableRegions;\n }", "public String getRegionid() {\n return regionid;\n }", "public String getValidRegionDesc();", "public List<GeoRegionInner> locations() {\n return this.locations;\n }", "public int state_build_regions(HashMap<Integer, Integer> rmap) {\r\n\t\tUnionFind u=new UnionFind();\r\n\t\t\r\n\t\t//build Unionfind\r\n\t\tfor(Integer nodeIndex:allNodes.keySet()) {\r\n\t\t\r\n\t\t\tLinkedList<Integer> neighborsIndex=nowMap.get(nodeIndex);\r\n\t\t\tif(allNodes.get(nodeIndex).path==0) {\r\n\t\t\t\tfor(Integer nIndex:neighborsIndex) {\r\n\t\t\t\t\tif(allNodes.get(nIndex).path==0)\r\n\t\t\t\t\t\tu.union(allNodes.get(nIndex),allNodes.get(nodeIndex));\r\n\t\t\t\t}\r\n\t\t\t} else if(allNodes.get(nodeIndex).path!=0) {\r\n\t\t\t\tfor(Integer nIndex:neighborsIndex) {\r\n\t\t\t\t\tif(allNodes.get(nIndex).path!=0)\r\n\t\t\t\t\t\tu.union(allNodes.get(nIndex),allNodes.get(nodeIndex));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tint rcount=1;\r\n\t\tLinkedList<Node> count=new LinkedList<Node>();\r\n\t\t//find regions\r\n\t\tfor(Integer nIndex:allNodes.keySet()) {\r\n\t\t\tNode n=allNodes.get(nIndex);\r\n\t\t\tNode np=u.find(n);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(np.path==0) {\r\n\t\t\t\tif(count.contains(np)) {\r\n\t\t\t\t\trmap.put(nIndex, count.indexOf(np)+1);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcount.add(np);\r\n\t\t\t\t\trmap.put(nIndex, count.indexOf(np)+1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\trmap.put(nIndex, -1);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\r\n\t\treturn rcount;\r\n\t}", "public void testGetRegion() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tRegion region = regionMgr.getRegion(RegionTestBuilder.REGION_ID_INDIA);\r\n\t\t\tassertTrue(\"Unable to get country list\", region.getName()\r\n\t\t\t\t\t.equalsIgnoreCase(\"India\"));\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public void testGetRootRegions() {\r\n\t\tregionBuilder = getRegionTestBuilder();\r\n\t\ttry {\r\n\t\t\tList countryList = regionMgr.getRootRegions();\r\n\t\t\tassertTrue(\"Unable to get country list\", countryList.size() > 0);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tassertTrue(\"An excpetion has occured\", false);\r\n\t\t}\r\n\t}", "public List<Region> getid(String id) {\r\n int idRegion = Integer.parseInt(id);\r\n return rdao.getRegionId(idRegion);\r\n }", "public ArrayList<EHVSS> getByRegion(String region,String startIndex,String pageSize){\n\t\tArrayList<EHVSS> ehvssNames=null;\n\t\ttry {\n\t\t\tConnection connection = DatabaseConnection.getConnection(\"mms_new\");\n\t\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM ehvss where region=? limit \"+startIndex+\",\"+pageSize);\n\t\t\tps.setString(1,region);\n\t\t\tResultSet rs=ps.executeQuery();\n\t\t\tehvssNames=new ArrayList<EHVSS>();\n\t\t\tresultSetParserForJtable(rs,ehvssNames);\n\t\t\trs.close();\n\t\t\tps.close();\n\t\t\t//System.out.println(\"Number of Ehvss Locations for region :\"+region+\" is :\"+ehvssNames.size());\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Exception in class : EhvssDAO : method : [getByRegion]\"+e);\n\t\t}catch (Exception exp) {\n\t\t\tSystem.out.println(\"Exception in class : EhvssDAO : method : [getByRegion]\"+exp);\n\t\t}\n\t\treturn ehvssNames;\n\t}", "@Override\n\tpublic Region getRegionById(String id) {\n\t\treturn null;\n\t}", "public List<RegionServer> regionServers() {\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tList<RegionServer> list = new ArrayList<>();\n\t\ttry {\n\t\t\tURL url = new URL(HBase.HTTP + SystemConfig.getProperty(\"hive.cube.hbase.master\") + HBase.HBASE_REGION_SERVER_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject tmpBuf = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONObject object = (JSONObject) JSON.parseArray(tmpBuf.getString(\"beans\")).get(0);\n\t\t\tString[] liveRegionServers = object.getString(\"tag.liveRegionServers\").split(\";\");\n\t\t\tfor (String node : liveRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(true);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] deadRegionServers = object.getString(\"tag.deadRegionServers\").split(\";\");\n\t\t\tfor (String node : deadRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(false);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Filter[Region] HBase JMX has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public String getRegionno() {\n return regionno;\n }" ]
[ "0.6902161", "0.6727077", "0.6695266", "0.6617658", "0.6601647", "0.6598632", "0.65853924", "0.6560178", "0.65155363", "0.6510052", "0.65088093", "0.64420813", "0.6411813", "0.63737804", "0.6310619", "0.63080955", "0.62890315", "0.6283539", "0.6283539", "0.6283539", "0.6283539", "0.6266109", "0.62653315", "0.6258613", "0.6222812", "0.62131935", "0.62027454", "0.6191887", "0.61850065", "0.6172129", "0.61438084", "0.6138623", "0.60250044", "0.59440315", "0.59437484", "0.5926798", "0.5905709", "0.5905709", "0.5905709", "0.59027284", "0.5893243", "0.58627385", "0.58521867", "0.58521867", "0.58521867", "0.58521867", "0.58521867", "0.58488286", "0.5845541", "0.58425295", "0.58425295", "0.58425295", "0.58425295", "0.5839308", "0.5839308", "0.5814264", "0.58082515", "0.57941574", "0.57919586", "0.5774592", "0.5752419", "0.5738481", "0.57304925", "0.572488", "0.5722757", "0.57169914", "0.5716477", "0.56918734", "0.5655532", "0.5654568", "0.56532526", "0.5646787", "0.5613772", "0.5602105", "0.5567412", "0.55577314", "0.55509424", "0.55404234", "0.5540406", "0.5533069", "0.553232", "0.55309874", "0.55268353", "0.5519882", "0.5512549", "0.551038", "0.55076575", "0.55063623", "0.5485385", "0.5472979", "0.5466473", "0.5465866", "0.5456818", "0.54550576", "0.5452432", "0.5439076", "0.5435182", "0.54276735", "0.5427624", "0.5423685", "0.5422976" ]
0.0
-1
TODO Autogenerated method stub
public void run() { }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
////////////////////////////// ///// GETTER AND SETTER ////// //////////////////////////////
public int getDistance() { return distance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n public void get() {}", "String setValue();", "protected abstract Set method_1559();", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public int\t\tget() { return value; }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n String get();", "public T get() {\n return value;\n }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public void setdat()\n {\n }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "public Object get()\n {\n return m_internalValue;\n }", "@Override\n public Object getValue()\n {\n return value;\n }", "private void assignment() {\n\n\t\t\t}", "public Object getValue() { return _value; }", "public int value() { \n return this.value; \n }", "public V get() {\n return value;\n }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public void setAge(int age) { this.age = age; }", "public byte[] get(){\n return this.value;\n }", "public void get() {\n }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "public String get();", "public Object getValue(){\n \treturn this.value;\n }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "public abstract String get();", "public void setValue(Object value) { this.value = value; }", "public Object getNewValue()\n {\n return newValue;\n }", "public Object getValue()\n {\n\treturn value;\n }", "public String get() {\n return value;\n\t}", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public String get()\n {\n return this.string;\n }", "public Object getValue() { return this.value; }", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "@Override\npublic void setAttributes() {\n\t\n}", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public int getSet() {\n return set;\n }", "@Override\n public void saveValues() {\n \n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "@Override\n\tpublic void setValue(Object object) {\n\n\t}", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "@Override\n protected void updateProperties() {\n }", "private ReadProperty()\r\n {\r\n\r\n }", "public void set(String name, Object value) {\n }", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "private void setData() {\n\n }", "public int get () { return rating; }", "@Override\n public int getValue() {\n return super.getValue();\n }", "@Override\n\tpublic void setData() {\n\n\t}", "public void setName(String name){this.name=name;}", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "public String get() {\n return this.value;\n }", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public void setU(String f){\n u = f;\n}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public Value getValue(){\n return this.value;\n }", "public String get()\n {\n return val;\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "private Value() {\n\t}", "@Override\n public String getValue() {\n return value;\n }", "public void setPrice(double price){this.price=price;}", "public int value(){\n return this.value;\n }", "public void setX(int x) { this.x=x; }", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "public int getValue() \n {\n return value;\n }", "@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "public int getAge() {return age;}", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}", "public S getValue() { return value; }", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "public abstract void setValue(T value);", "private SetProperty(Builder builder) {\n super(builder);\n }", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "public void setRes(){\r\n \r\n }", "public void setValue(S s) { value = s; }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "V getValue() {\n return value;\n }", "public int getValue(){\n return this.value;\n }", "public abstract void set(M newValue);", "public void setC_Conversion_UOM_ID (int C_Conversion_UOM_ID)\n{\nset_Value (\"C_Conversion_UOM_ID\", new Integer(C_Conversion_UOM_ID));\n}", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "public void setGender(Gender_Tp gender) { this.gender = gender; }" ]
[ "0.6680133", "0.66557235", "0.64903885", "0.6441443", "0.63352257", "0.6238328", "0.62064195", "0.62064195", "0.61964864", "0.61880803", "0.618699", "0.61501", "0.6126863", "0.61100733", "0.6069482", "0.6061832", "0.60593665", "0.6057609", "0.6034608", "0.5996866", "0.5986509", "0.5986395", "0.5985758", "0.5984228", "0.5978837", "0.5967229", "0.596507", "0.59621525", "0.59491783", "0.59302527", "0.5905643", "0.5905003", "0.59038466", "0.59020317", "0.58905494", "0.5886973", "0.58852476", "0.5872261", "0.5871023", "0.5869721", "0.58688974", "0.5865015", "0.5863378", "0.58559585", "0.58487785", "0.5825388", "0.5824926", "0.5823607", "0.5816128", "0.58099765", "0.5805076", "0.5804119", "0.58015716", "0.5801017", "0.57965887", "0.5776376", "0.5764736", "0.57564944", "0.57564944", "0.5753036", "0.5735054", "0.5733654", "0.5733188", "0.57307106", "0.5727017", "0.5715618", "0.57073957", "0.5692326", "0.56887925", "0.5688522", "0.5688127", "0.56869376", "0.5683318", "0.5680535", "0.5677383", "0.56738085", "0.5671951", "0.56698376", "0.56675345", "0.5656449", "0.56553876", "0.5651898", "0.5648571", "0.5642928", "0.5642895", "0.56415874", "0.5640255", "0.5639888", "0.56385857", "0.5635795", "0.56332636", "0.56300056", "0.56261885", "0.56197625", "0.56189585", "0.5617348", "0.56109923", "0.5609033", "0.56025976", "0.5601662", "0.55981636" ]
0.0
-1
Time Complexity: O(n) Space Complexity: O(n)
static int[] productExceptSelf(int[] nums) { int n = nums.length; int[] prefix = new int[n]; int[] suffix = new int[n]; prefix[0] = 1; suffix[n - 1] = 1; for (int i = 1; i < n; i++) { prefix[i] = prefix[i - 1] * nums[i - 1]; } for (int i = n - 2; i >= 0; i--) { suffix[i] = suffix[i + 1] * nums[i + 1]; } int[] result = new int[n]; for (int i = 0; i < n; i++) { result[i] = prefix[i] * suffix[i]; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] seqArray = new int[n];\n for (int i = 0; i < n; i++) {\n seqArray[i] = scanner.nextInt();\n }\n // getSeqValue(seqArray); //this method is an accepted one on Hackerrank but time complexity is not order n; i.e. !O(n);\n getLinearOrderY(seqArray); // trying to get O(n) time complexity;\n }", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "static void UseArrayList(ArrayList<Integer> myList2){\r\n\t\tLong start = System.currentTimeMillis();\r\n\t\tfor (int n=0; n<myList2.size();n++)\r\n\t\t{\r\n\t\t\tfor (int m=n+1; m<myList2.size();m++){\r\n\t\t\t\tif( myList2.get(n)== myList2.get(m) ) {System.out.println(\"Duplicate found \"+myList2.get(n));}\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong End = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Total time taken for executing this code is: \" + (End-start));\r\n\t}", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "public static int solveEfficient(int n) {\n if (n == 0 || n == 1)\n return 1;\n\n int n1 = 1;\n int n2 = 1;\n int sum = 0;\n\n for (int i = 2; i <= n; i++) {\n sum = n1 + n2;\n n1 = n2;\n n2 = sum;\n }\n return sum;\n }", "@Override public short getComplexity() {\n return 0;\n }", "public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "public List<List<Integer>> threeSum(int[] nums) {\n List<List<Integer>> result = new ArrayList<>(nums.length);\n\n // Prepare\n Arrays.sort(nums);\n// int firstPositiveIndex = 0;\n// int negativeLength = 0;\n// List<Integer> numsFiltered = new ArrayList<>();\n// for (int i = 0; i < nums.length; i++) {\n// if (i == 0 || i == 1 || nums[i] == 0 || (nums[i] != nums[i-2])) {\n// numsFiltered.add(nums[i]);\n// if ((nums[i] >= 0) && (firstPositiveIndex == 0)) {\n// firstPositiveIndex = numsFiltered.size() - 1;\n// }\n// if ((nums[i] <= 0)) {\n// negativeLength = numsFiltered.size();\n// }\n// }\n// }\n// nums = numsFiltered.stream().mapToInt(i->i).toArray();\n\n // Func\n\n for(int i=0; (i < nums.length) && (nums[i] <= 0); i++) {\n if (i != 0 && nums[i] == nums[i-1]) {\n continue;\n }\n for(int j=i+1; j<nums.length; j++) {\n if (j != i+1 && nums[j] == nums[j-1]) {\n continue;\n }\n for(int k=nums.length-1; (k>j) && nums[k] >= 0; k--) {\n if (k != nums.length-1 && nums[k] == nums[k+1]) {\n continue;\n }\n int sum = nums[i]+nums[j]+nums[k];\n if (sum > 0) {\n continue;\n } else if (sum < 0) {\n break;\n }\n\n List<Integer> ok = new ArrayList<>();\n ok.add(nums[i]);\n ok.add(nums[j]);\n ok.add(nums[k]);\n result.add(ok);\n break;\n }\n }\n }\n\n// System.out.println(\"Finish time = \" + (System.nanoTime() - start) / 1_000_000);\n// System.out.println(\"result size = \" + result.size());\n\n return result;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "static long nPolyNTime(int[] n) {\n int temp = n.length;\n long sum = 0;\n if(n == null || n.length == 0) return -1;\n for(int i = 0; i < n.length; ++i) {\n while(temp --> 0) {\n for(int j = 0; j < n.length; ++j) {\n sum += n[i] + n[j];\n }\n }\n }\n return sum;\n }", "private static int betterSolution(int n) {\n return n*n*n;\n }", "private static int f(int n, int complete, int other, int[] arr) {\n if(n<=0)\n return 0;\n int res=0;\n ArrayList<Integer>list=new ArrayList<Integer>();\n for(int a:arr)\n if(a>0)\n list.add(a);\n int brr[]=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n while(brr.length!=0){\n int index=0;\n for(int i=1;i<brr.length;i++)\n if(brr[index]<brr[i])\n index=i;\n for(int i=0;i<brr.length;i++){\n if(index==i)\n brr[i]-=complete;\n else\n brr[i]-=other;\n }\n list=new ArrayList<Integer>();\n for(int a:brr)\n if(a>0)\n list.add(a);\n brr=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n res++;\n }\n return res;\n }", "public static boolean addUpToFast(int[] array, int n){\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor(int i = 0; i < array.length; i++){\n\t\t\tif(hs.contains(n-array[i]))\n\t\t\t\treturn true;\n\t\t\ths.add(array[i]);\n\t\t}\n\t\treturn false;\n\t}", "static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}", "public void sum(int n) {\n int sum = 0;\n for (int j = 0; j < n; j++) // 2n+2\n sum += j;\n for (int k = 0; k < n; k++) // 2n+2\n sum += k;\n for (int l = 0; l < n; l++) //2n+2\n sum += l;\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "private static int distance(ArrayList<Integer>[] adj, ArrayList<Integer>[] cost, int s, int t) {\n\n Set<Integer> visited = new HashSet<>(); //option 1\n Map<Integer, Integer> distance = new HashMap<>();\n// Queue<Integer> q = new PriorityQueue<>(11, (o1, o2) -> { //option 0\n// Integer d1 = distance.get(o1); //option 0\n// Integer d2 = distance.get(o2); //option 0\n Queue<Map.Entry<Integer, Integer>> q = new PriorityQueue<>(11, (o1, o2) -> { //option 1\n Integer d1 = o1.getValue(); //option 1\n Integer d2 = o2.getValue(); //option 1\n\n if (Objects.equals(d1, d2)) return 0;\n if (d1 == null) return 1;\n if (d2 == null) return -1;\n\n return d1 - d2;\n });\n\n distance.put(s, 0);\n// q.addAll(IntStream.range(0, adj.length).boxed().collect(Collectors.toList())); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(s, 0)); //option 1\n\n while (!q.isEmpty()) {\n// int u = q.remove(); //option 0\n int u = q.remove().getKey(); //option 1\n\n if (u == t) {\n Integer dist = distance.get(u);\n if (dist == null) return -1;\n return dist;\n }\n\n if (visited.contains(u)) continue; //option 1\n visited.add(u); //option 1\n\n List<Integer> adjList = adj[u];\n List<Integer> costList = cost[u];\n for (int i = 0; i < adjList.size(); i++) {\n int v = adjList.get(i);\n int w = costList.get(i);\n Integer dist = distance.get(v);\n Integer newDist = distance.get(u);\n if (newDist != null) newDist += w;\n\n if (newDist != null && (dist == null || dist > newDist)) {\n //relax\n distance.put(v, newDist);\n// q.remove(v); //option 0\n// q.add(v); //option 0\n q.add(new AbstractMap.SimpleImmutableEntry<>(v, distance.get(v))); //option 1\n }\n }\n }\n\n return -1;\n }", "public static int[] twoSum(int[] numbers, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] aux = new int[numbers.length];\n HashMap<Integer, Integer> valueToIndex = new HashMap<Integer, Integer>();\n for (int i = 0; i < numbers.length; i++) {\n valueToIndex.put(numbers[i], i);\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n \n int[] result = new int[2];\n if (aux[i] == aux[j]) { /* Handle duplicates */\n int first = -1, second = -1;\n for (int k = 0; k < numbers.length; k++) {\n if (numbers[k] == aux[i]) {\n if (first == -1) {\n first = k;\n } else if (second == -1) {\n second = k;\n break;\n }\n }\n }\n result[0] = first + 1;\n result[1] = second + 1;\n return result;\n }\n \n \n if (valueToIndex.get(aux[i]) < valueToIndex.get(aux[j])) {\n result[0] = valueToIndex.get(aux[i]) + 1;\n result[1] = valueToIndex.get(aux[j]) + 1;\n } else {\n result[0] = valueToIndex.get(aux[j]) + 1;\n result[1] = valueToIndex.get(aux[i]) + 1;\n }\n return result;\n }", "private int gameV(int i, int j, int x) {\n int count = 2;\n for (int ii = 0; ii < i; ii++) {\n for (int jj = ii + 1; jj < n; jj++) {\n if (ii != x && jj != x) count++;\n }\n }\n for (int jj = i + 1; jj < j; jj++) {\n if (jj != x) count++;\n }\n return count;\n }", "public static void main(String[] args) \n {\n int[] numOfPoints = { 1000, 10000, 7000, 10000, 13000 };\n for(int count = 0; count < numOfPoints.length; count++)\n {\n List<Point> pointsTobeUsed = new ArrayList<Point>();\n int current = numOfPoints[count];\n int inc = 0;\n \n //creating list of points to be used\n for(int x = 0; x <= current; x++)\n {\n \n if(x <= current/2)\n {\n pointsTobeUsed.add(new Point(x,x));\n \n }\n else\n {\n pointsTobeUsed.add(new Point(x, x - (1 + 2*(inc)) ) );\n inc++;\n }\n }\n \n //n logn implementation of Pareto optimal\n long timeStart = System.currentTimeMillis();\n \n // n logn quicksort\n pointsTobeUsed = quickSort(pointsTobeUsed, 0, pointsTobeUsed.size() -1 );\n \n \n \n ParetoOptimal(pointsTobeUsed);\n \n \n long timeEnd = System.currentTimeMillis();\n System.out.println(\"final:\" + \" exper: \" + (timeEnd - timeStart) + \" N: \" + current ); \n }\n }", "static int runningTime(int[] arr) {\n return insertionSort(arr);\n \n }", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "static int[] find2(int a[]){\r\n int sum = a[0];\r\n int pro = a[0];\r\n for(int i=1;i<a.length;i++){\r\n sum += a[i];\r\n pro += a[i]*a[i];\r\n }\r\n int s = (n*(n+1))/2 - sum;\r\n int p = (n*(n+1)*(2*n+1))/6 - pro;\r\n return solveSP(s, p);\r\n }", "public void log(int[] numbers) {\n\t\tSystem.out.println(); // O(1)\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\tSystem.out.println(); // O(1)\n\t\t\n\t\t// O(2n), O(n+n)\n\t\t// We can drop 2* constant, O(n). Both represent linear growth\n\t\t// as we care only about input size\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\tfor (int number: numbers) // O(n)\n\t\t\tSystem.out.println(number);\n\t\t\n\t\t\n\t\t\n\t}", "public int removeDuplicates(int[] nums) {\n if (nums.length == 0) return 0;\n int i = 0;\n for (int j = 1; j < nums.length; j++) {\n if (nums[j] != nums[i]) {\n i++;\n nums[i] = nums[j];\n }\n }\n return i + 1;\n}", "static long arrayManipulation(int n, int[][] queries) {\r\n long result = 0, sum = 0;\r\n long[] arr = new long[n];\r\n for(int i = 0; i < queries.length; i++){\r\n int firstIndex = queries[i][0] - 1;\r\n int lastIndex = queries[i][1] - 1;\r\n long numberToAdd = queries[i][2];\r\n arr[firstIndex] += numberToAdd;\r\n if (lastIndex+1 < n)\r\n arr[lastIndex+1] -= numberToAdd;\r\n }\r\n\r\n for(long l : arr){\r\n sum += l;\r\n if(sum > result)\r\n result = sum;\r\n }\r\n\r\n return result;\r\n }", "public static void a2v2(int[] A)\n {\n Map<Integer, List<Integer>> hashMap = new HashMap<>();\n\n insert(hashMap, 0, -1);\n\n int sum = 0;\n\n for (int i = 0; i < A.length; i++)\n {\n sum += A[i];\n\n if (hashMap.containsKey(sum))\n {\n List<Integer> list = hashMap.get(sum);\n\n // find all subarrays with the same sum\n for (Integer value: list)\n {\n System.out.println(\"Subarray [\" + (value + 1) + \"…\" +\n i + \"]\");\n }\n }\n\n // insert (sum so far, current index) pair into the hashmap\n insert(hashMap, sum, i);\n }\n }", "static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}", "public int findFirstUniqueNumber (List<Integer> numberList) {\n\n ////// Solution 1:\n LinkedHashMap<Integer, Integer> occurMap = new LinkedHashMap<>();\n\n for (int number: numberList) { // O(n)\n if (occurMap.containsKey(number) && occurMap.get(number) != 0) {\n occurMap.replace(number, occurMap.get(number), 0);\n }\n occurMap.putIfAbsent(number, 1);\n }\n\n for (Map.Entry<Integer, Integer> entry: occurMap.entrySet()) {\n if (entry.getValue() == 1) {\n return entry.getKey();\n }\n }\n\n ////// Solution 2: O(n * n)\n// for (int n: numberList) {\n// if (numberList.indexOf(n) == numberList.lastIndexOf(n)) { // O(n * n)\n// return n;\n// }\n// }\n\n return -1;\n }", "public static void main(String[] args) {\n\t\tfinal long startTime = System.nanoTime();\r\n\t\t\r\n\t\tint [] plop = {1,1,1,2,2,3};\r\n\t\tSystem.out.println(removeDuplicates2(plop));\r\n\t\t\r\n\r\n\t\tfinal long duration = System.nanoTime() - startTime;\r\n\t\tSystem.out.println(duration);\r\n\t\t\r\n\t}", "static int getMissingByAvoidingOverflow(int a[], int n)\n\t {\n\t int total = 2;\n\t for (int i = 3; i <= (n + 1); i++)\n\t {\n\t total =total+ i -a[i - 2];\n\t //total =total- a[i - 2];\n\t }\n\t return total;\n\t }", "private static void findDuplicatesByHashTable(int[] arr) {\n\t\t\n\t\t\n\t\tHashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\t\n\t\tfor(int i=0; i<arr.length ; i++)\n\t\t{\n\t\t\tif(!map.containsKey(arr[i]))\n\t\t\t{\n\t\t\t\tmap.put(arr[i], 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmap.put(arr[i], map.get(arr[i])+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( Map.Entry<Integer, Integer> entry : map.entrySet() )\n\t\t{\n\t\t\tif(entry.getValue() > 1 )\n\t\t\t{\n\t\t\t\tSystem.out.println(\" Duplicate is by HashTable \" + entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static int f3(int N) {\n \n // O(1)\n if (N == 0) return 1;\n else{ \n \n int x = 0;\n // O(N)\n for(int i = 0; i < N; i++)\n x += f3(N-1);\n return x;\n }\n }", "static int countSubarrWithEqualZeroAndOne(int arr[], int n)\n {\n int count=0;\n int currentSum=0;\n HashMap<Integer,Integer> mp=new HashMap<>();\n for(int i=0;i<arr.length;i++)\n {\n if(arr[i]==0)\n arr[i]=-1;\n currentSum+=arr[i];\n \n if(currentSum==0)\n count++;\n if(mp.containsKey(currentSum))\n count+=mp.get(currentSum);\n if(!mp.containsKey(currentSum))\n mp.put(currentSum,1);\n else\n mp.put(currentSum,mp.get(currentSum)+1);\n \n \n }\n return count;\n }", "private static void second(int[] arr, int sum){\n\n Map<Integer,Boolean> map = new Hashtable<>();\n\n for(int i:arr){\n\n if (map.containsKey(sum - i)){\n System.out.println(i + \" , \" + (sum-i));\n }\n else{\n map.put(i, true);\n }\n\n }\n\n }", "private static List<Integer> getCommonElementsAlgo2(int [] arr1, int [] arr2) {\n\t\t\n\t\tList<Integer> duplicates = new ArrayList<>();\n\t\t\n\t\tHashtable<Integer, Integer> table = new Hashtable<>();\n\t\t\n\t\tfor (int i : arr1) {\n\t\t\tif (table.containsKey(i)) {\n\t\t\t\ttable.put(i, table.get(i) + 1);\n\t\t\t}\n\t\t\ttable.put(i, 1);\n\t\t}\n\t\t\n\t\tfor (int j : arr2) {\n\t\t\tif (table.containsKey(j)) {\n\t\t\t\tduplicates.add(j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn duplicates;\n\t\t\n\t}", "private static void task03(int nUMS, AVLTree<Integer> h) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(h.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\th.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + h.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nint n=s.nextInt();\nint a[]=new int[n];\nint x=0;\nfor(int i=1;i<=n;i++)\n{\n\tif(i%2!=0)\n\t{\n\t\ta[x++]=i;\n\t}\n}\nint sum=0;\nsum=a[0];\nfor(int i=0;i<x;i++)\n{\n\tif((i+1)<x)\n\t{\n\tif(i%2==0)\n\t\tsum=sum+a[i+1];\n\telse\n\t\tsum=sum-a[i+1];\n\t}\n}\nSystem.out.println(sum);\n\t}", "public static void process(int n){\n\t\tint right, left, i;\n\n\t\tright = i = 0;\n\t\twhile(i < n){\n\t\t\twhile (right < n && c[i] == c[right]) right++;\n\t\t\tfor(int j = i; j < right; ++j) max_right[j] = right;\n\t\t\ti = right;\n\t\t}\n\n\t\tleft = i = n-1;\n\t\twhile(i >= 0){\n\t\t\twhile (left >= 0 && c[i] == c[left]) left--;\n\t\t\tfor (int j = i; j > left; --j) max_left[j] = left;\n\t\t\ti = left;\n\t\t}\n\t}", "public static void main(String[] args) {\n float[] fb=new float[9];\n fb[0]=(int)12;\n fb[1]=(byte)13;\n fb[2]=(short)8;\n fb[3]=12.021f;\n // fb[4]=23443.43d;\n// fb[4]='a';\n// for(int i=0;i<=4;i++) {\n// \t System.out.println(fb[i]);\n// }\n List<Integer> lis1=new ArrayList<>();\n List<Integer> lis2=new ArrayList<>();\n lis1.add(2);\n lis1.add(4);\n lis1.add(16);\n lis1.add(32);\n lis1.add(96);\n lis1.add(123);\n lis1.add(435);\n lis1.add(234);\n lis1.add(100);\n lis1.add(122);\n lis1.add(240);\n lis1.add(350);\n java.util.Iterator<Integer> itr= lis1.iterator();\n //while(itr.hasNext()) {\n // itr.remove();\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(lis1);\n // \n// long startTime = System.currentTimeMillis();\n// getTotalX(lis1,lis2);\n// System.out.println(\"Time taken by 2 * o(n^2) \" + (System.currentTimeMillis() - startTime) + \"ms\"); \n// \n \t\t \n\t}", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "private int calcDistanceMemoize(int i, int j, char[] one, char[] two, int [][]table) {\n if (i < 0)\n return j+1;\n\tif (j < 0)\n\t return i+1;\n\n if (table[i][j] == -1) \n table[i][j] = calcDistanceRecursive(i, j, one, two, table);\n\t\n return table[i][j];\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < nums.length; i++) {\n max=Math.max(max,nums[i]);\n }\n Integer[] map = new Integer[max+1];\n for (int i = 0; i < nums.length; i++) {\n Integer c = map[nums[i]];\n if(c!=null && i-c<=k){\n return true;\n }else {\n map[nums[i]]=i;\n }\n }\n return false;\n }", "private static void task3(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(t.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tt.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + t.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "private static void sortAccording(int A1[], int A2[], int m, int n)\n {\n // The temp array is used to store a copy \n // of A1[] and visited[] is used to mark the \n // visited elements in temp[].\n int temp[] = new int[m], visited[] = new int[m];\n for (int i = 0; i < m; i++)\n {\n temp[i] = A1[i];\n visited[i] = 0;\n }\n \n // Sort elements in temp\n Arrays.sort(temp);\n \n // for index of output which is sorted A1[]\n int ind = 0; \n \n // Consider all elements of A2[], find them\n // in temp[] and copy to A1[] in order.\n for (int i = 0; i < n; i++){\n\n // Find index of the first occurrence\n // of A2[i] in temp\n int f = first(temp, 0, m-1, A2[i], m);\n \n // If not present, no need to proceed\n if (f == -1) \n continue;\n \n // Copy all occurrences of A2[i] to A1[]\n for (int j = f; (j < m && temp[j] == A2[i]); j++){\n \n A1[ind++] = temp[j];\n visited[j] = 1;\n }\n }\n \n // Now copy all items of temp[] which are \n // not present in A2[]\n for (int i = 0; i < m; i++)\n if (visited[i] == 0)\n A1[ind++] = temp[i];\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "public static String findSum2(int[] a, int x){\n\t\tMap<Integer, Integer> cache = new HashMap<Integer, Integer>();\r\n\t\tint delta;\r\n\t\tfor(int i = 0; i < a.length; i++) {\r\n\t\t\tdelta = x - a[i];\r\n\t\t\tif(cache.get(delta) != null) {\r\n\t\t\t\treturn delta + \" \" + a[i];\r\n\t\t\t}else{\r\n\t\t\t\tcache.put(a[i], delta);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"Not Found\";\r\n\t}", "public static void main(String[] args) {\n\t\tArrays.fill(arr, 1);\n\t\tlong startTime = System.nanoTime();\n\t\t// Traverse till square root of MAX\n\t\t// Using logic similar to sieve of eratosthenes to\n\t\t// populate factor sum array\n\t\tint limit = (int)Math.sqrt(MAX);\n\t\tfor (int i = 2; i <= limit; ++i) {\n\t\t\tint j = i+i;\n\t\t\tint count = 2;\n\t\t\twhile (j <= MAX){\n\t\t\t\t// As we already add count (j/i) to the factor sum when adding i,\n\t\t\t\t// we don't add when i is equal to or greater than count\n\t\t\t\tif (i < count) {\n\t\t\t\t\t// Adding i and count (j/i) to the factor sum of j\n\t\t\t\t\tarr[j] += i;\n\t\t\t\t\tarr[j] += count;\n\t\t\t\t}\n\t\t\t\tj += i;\n\t\t\t\tcount++;\n\t\t\t} \n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tSystem.out.println(\"The following are amicable numbers\");\n\t\tfor (int i = 2; i <= MAX; ++i) {\n\t\t\tint num = arr[i];\n\t\t\tif (num <= MAX && num > i) {\n\t\t\t\tif (arr[num] == i) {\n\t\t\t\t\tSystem.out.println(count+\": \"+i+\" and \"+num);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlong endTime = System.nanoTime();\n\t\tdouble duration = timeInSec(endTime,startTime) ;\n\t\tSystem.out.println(\"Run time \" + duration + \" : secs\");\t\t\n\t}", "public void triplet(int[] b,int n){\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<n;i++){\r\n\t\t\tfor(int j=i+1;j<n-1;j++){\r\n\t\t\t\tfor(int k=j+1;k<n-2;k++){\r\n\t\t\t\t\tif(b[i]+b[j]+b[k]==0){\r\n\t\t\t\t\t\tSystem.out.println(b[i]+\" \"+b[j]+\" \"+b[k]);\r\n\t\t\t\t\t\tcount++;\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\tSystem.out.println(\"no of distinct triplet is:\"+count);\t\r\n\r\n\t}", "private static int[] p2(int[] ar, int n) {\n int[] p2 = new int[n];\n Arrays.fill(p2, n);\n Stack<Integer> st = new Stack<>();\n for (int i = 0; i < n; i++) {\n while (st.size() != 0 && ar[i] < ar[st.peek()]) {\n p2[st.peek()] = i;\n st.pop();\n }\n st.push(i);\n }\n return p2;\n }", "public ArrayList<ArrayList<Integer>> fourSum_02(ArrayList<Integer> a, int b) {\n\t\t//List to store the result\n\t\tArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();\n \tint len = a.size();\n \tif(len < 4)\n \t return res;\n \t\n //Using the hashMap to store sum and corresponding 2 elements\n \tHashMap<Integer, Index> h = new HashMap<Integer, Index>();\n \t\n \tfor(int i = 0; i < len-1; i++) {\n \t\tfor(int j = i+1; j < len; j++) {\n \t\t\tint sum = a.get(i) + a.get(j);\n \t\t\tif(h.containsKey(b-sum)) {\n \t\t\t\t//then get the elements of the existing sum stored in hashmap\n \t\t\t\tIndex indx = h.get(b-sum);\n \t\t\t\tint exI = indx.getI();\n \t\t\t\tint exJ = indx.getJ();\n \t\t\t\tif(res.size() == 0) {\n \t\t\t\t\tArrayList<Integer> l = new ArrayList<Integer>();\n\t \t\t\t\tl.add(exI);\n\t \t\t\t\tl.add(exJ);\n\t \t\t\t\tl.add( a.get(i));\n\t \t\t\t\tl.add( a.get(j));\n\t \t\t\t\tCollections.sort(l);\n\t \t\t\t\tres.add(l);\n \t\t\t\t} else {\n\t \t\t\t\tif((exI != a.get(i)) && (exJ != a.get(j))) {\n\t \t\t\t\t\tArrayList<Integer> l = new ArrayList<Integer>();\n\t\t \t\t\t\tl.add(exI);\n\t\t \t\t\t\tl.add(exJ);\n\t\t \t\t\t\tl.add(a.get(i));\n\t\t \t\t\t\tl.add(a.get(j));\n\n\t\t \t\t\t\tCollections.sort(l);\n\t\t \t\t\t\tboolean flag = true;\n\t\t \t\t\t\t\n\t\t \t\t\t\tfor(ArrayList<Integer> ll : res) {\n\t\t \t\t\t\t\tif(ll.equals(l)) {\n\t\t \t\t\t\t\t\tflag = false;\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\t\t \t\t\t\tif(flag == true)\n\t\t \t\t\t\t\tres.add(l);\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\th.put(sum, new Index(a.get(i), a.get(j)));\n \t\t}\n \t}\n \treturn res;\n\t}", "static int logTime(int[] n, int start, int end, int val) {\n if(n == null || n.length == 0) return -1;\n int mid = (start + end) / 2;\n if(val < n[mid]) logTime(n, 0, mid, val);\n if(val > n[mid]) logTime(n, mid + 1, n.length, val);\n return n[mid];\n }", "public int solution(int K, int[] A) {\n HashMap<Integer,ArrayList<Integer>> map = new HashMap<Integer,ArrayList<Integer>>();\n \n int dup=0,nonDup=0;\n for (int i=0;i< A.length;i++){\n if(2*A[i]==K){\n if(!map.containsKey(A[i])){\n dup++;\n map.put(A[i],new ArrayList<Integer>());\n }\n continue;\n }\n \n if(!map.containsKey(A[i])){\n \tmap.put(A[i],new ArrayList<Integer>());\n }\n map.get(A[i]).add(i);\n nonDup+=map.get(K-A[i]).size();\n }\n return nonDup*2+dup;\n }", "public static void func(){\n\t\tHashMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tint limit = 1000;\n\t\tboolean psb[] = generatePrime(limit);\n\t\t\n\t\tint ps[] = MathTool.generatePrime(100000);\n\t\tfor (int i = 1; ps[i]<1000; i++) {\n\t\t\t//System.out.println(ps[i]);\n\t\t}\n\t\tint max=0;\n\t\tfor (int i = 0; ps[i] < limit; i++) {\n\t\t\tint n = ps[i];\n\t\t\tint j=i;\n\t\t\twhile(n<limit){\n\t\t\t\tif(!psb[n]){\n\t\t\t\t\tint num =j-i+1;\n\t\t\t\t\tif(map.containsKey(n)){\n\t\t\t\t\t\tif(map.get(new Integer(n)) < num){\n\t\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmap.put(n, num);\n\t\t\t\t\t}\n\t\t\t\t\tif(num > max){\n\t\t\t\t\t\tmax=num;\n\t\t\t\t\t\tSystem.out.println(num+\" \"+n+\" \"+i+\" \"+j);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tn+=ps[j];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void discretization(int[] nums) {\n\t\tint[] sorted = nums.clone();\n\t\tArrays.sort(sorted);\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tnums[i] = Arrays.binarySearch(sorted, nums[i]);\n\t\t}\n\t}", "static int linearLogTime(int[] n, int[] m) {\n if(n == null || n.length == 0 || m == null || m.length == 0) return -1;\n int sum = 0;\n for(int i = 0; i < n.length; ++i) {\n sum += logTime(m, 0, m.length, 15);\n }\n return sum;\n }", "public int findDuplicate(int[] nums) {\n int slow = nums[0];\n int fast = nums[0];\n do {\n slow = nums[slow];\n fast = nums[nums[fast]];\n } while (slow != fast);\n \n slow = nums[0];\n while (slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n return slow;\n }", "private int getCondensedIndex(int n, int i, int j) {\n if (i < j) {\n return n * i - (i * (i + 1) / 2) + (j - i - 1);\n }\n else if (i > j) {\n return n * j - (j * (j + 1) / 2) + (i - j - 1);\n }\n else{\n return 0;\n }\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "public static void cntArray(int A[], int N) \n { \n // initialize result with 0 \n int result = 0; \n \n for (int i = 0; i < N; i++) { \n \n // all size 1 sub-array \n // is part of our result \n result++; \n \n // element at current index \n int current_value = A[i]; \n \n for (int j = i + 1; j < N; j++) { \n \n // Check if A[j] = A[i] \n // increase result by 1 \n if (A[j] == current_value) { \n result++; \n } \n } \n } \n \n // print the result \n System.out.println(result); \n }", "static int trappingWater(int arr[], int n) {\r\n\r\n // Your code here\r\n /** *** tle\r\n for(int i=1;i<n-1;i++){\r\n int l=arr[i];\r\n for (int j = 0; j < i; j++) {\r\n l=l < arr[j] ? arr[j] : l;\r\n }\r\n int r=arr[i];\r\n for (int j = i+1; j <n ; j++) {\r\n r=r < arr[j] ? arr[j] : r;\r\n }\r\n\r\n s=s+(l>r? r:l) -arr[i];\r\n }\r\n return s;\r\n\r\n //////////////////////////////////////////////\r\n SC=O(N)\r\n if(n<=2)\r\n return 0;\r\n int[] left=new int[n];\r\n int[] right=new int[n];\r\n left[0]=0;\r\n int leftmax=arr[0];\r\n for (int i = 1; i <n ; ++i) {\r\n left[i]=leftmax;\r\n leftmax=Math.max(leftmax,arr[i]);\r\n }\r\n right[n-1]=0;\r\n int mxright=arr[n-1];\r\n for (int i = n-2; i >=0 ; --i) {\r\n right[i]=mxright;\r\n mxright=Math.max(mxright,arr[i]);\r\n }\r\n int s=0;\r\n for (int i = 1; i < n-1; ++i) {\r\n if(arr[i]<left[i] && arr[i]<right[i]){\r\n s+=Math.min(left[i],right[i])-arr[i];\r\n }\r\n }\r\n return s;\r\n /////////////////////////////////////////////////////\r\n **/\r\n\r\n if(n<=2)\r\n return 0;\r\n\r\n int leftMax = arr[0];\r\n int rightMax = arr[n-1];\r\n\r\n int left = 1;\r\n int right = n-2;\r\n int water = 0;\r\n\r\n while(left <= right) {\r\n if (leftMax < rightMax) {\r\n if (arr[left] >= leftMax) {\r\n leftMax = arr[left];\r\n } else\r\n water = water + (leftMax - arr[left]);\r\n\r\n //leftMax = Math.max(leftMax, arr[left]);\r\n left++;\r\n } else {\r\n if (arr[right] > rightMax) {\r\n rightMax = arr[right];\r\n }\r\n\r\n water = water + (rightMax - arr[right]);\r\n right--;\r\n }\r\n }\r\n return water;\r\n\r\n }", "public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> array = new ArrayList<>();\n\t\tLinkedList<Integer> linked = new LinkedList<>();\n\t\t\n\t\tlong aStart = System.currentTimeMillis();\n\t\tint i;\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tarray.add(i);\n\t\t}\n\t\tlong aEnd = System.currentTimeMillis();\n\t\tlong aTime = aEnd - aStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+aTime+\"ms\");\n\t\t\n\t\t\n\t\tlong lStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\tlong lEnd = System.currentTimeMillis();\n\t\tlong lTime = lEnd - lStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+lTime+\"ms\");\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\t\n\t\t\n\t\taStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<1000000; i++){\n\t\t\tarray.add(i);\n\t\t}\n\t\taEnd = System.currentTimeMillis();\n\t\taTime = aEnd - aStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+aTime+\"ms\");\n\t\t\n\t\t\n\t\tlStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\tlEnd = System.currentTimeMillis();\n\t\tlTime = lEnd - lStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+lTime+\"ms\");\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t}", "public long findFastestTime()\r\n {\r\n for(int top = 1; top < listOfTimes.size(); top++)\r\n { \r\n long item = listOfTimes.get(top); \r\n int i = top;\r\n\r\n while(i > 0 && item < listOfTimes.get(i - 1))\r\n {\r\n listOfTimes.set(i, listOfTimes.get(i- 1));\r\n i--;\r\n }//end while \r\n\r\n listOfTimes.set(i, item);\r\n }//end for \r\n\r\n return listOfTimes.get(0);\r\n }", "public int get_odd_occurences_optimal_v2(int[] a) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tresult ^= i;\n\t\t}\n\t\treturn result;\n\t}", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }", "public static void main(String[] args) {\n\t\tint p[]=new int[200];\n\t\tint n;int count=0;\n\t\tint pp=0;\n\t\tfor(int i=2;i<1000;i++) {\n\t\t\tint flag=1;\n\t\t\tfor(int j=2;j<i;j++) {\n\t\t\t\tif(i%j==0) {\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t//checking if flag is 0 or not\t\n\t\t\t}if(flag==1) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(i);\n\t\t\t \n\t\t\t\tp[pp]=i;\n\t\t\t pp++;\n\t\t\t count++;\n\t\t\t}\n\t}\n\t\tn=count;\n\t//for(int i=0;i<p.length;i++) {\n\t//if(p[i]!=0)\n\t //System.out.println(p[i]);\n\t//}\n\tint k=0;\n\tint count1=0;\n\tboolean b=false;\n\tint aa[]=new int[200];\t\n\t//calling my stack class \n\tMyStack m=new MyStack();\n\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t//calling check method anagram calss\t\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\tSystem.out.println(p[i]+\" \"+p[j]);\n\t\t\taa[k]=p[i];\n\t\t\tm.push(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\tk++; \n\t\t\taa[k]=p[j];\n\t\t\tk++;\n\t\t\tm.push(p[j]);\n\t\t\tcount1++;\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<count1*2;i++)\n\t//{int a=m.popint();\n\t//if(p[i]!=0)\n\t\t//System.out.println(a);\n\t//}\n\t//for(int t=0;t<aa.length;t++) {\n\t\t//if(aa[t]!=0) {\n\t\t//\tSystem.out.println(aa[t]);\n\t\t//}\n\t//}\n\tSystem.out.println(\"this is for stack\");\n\tSystem.out.println(\" ************************\");\n\n\tm.reverse();\n\t System.out.println(count1); \n\tSystem.out.println(\"this for queue\");\n\tSystem.out.println(\" ************************\");\n\tMyQueue mq=new MyQueue(count1*2);\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\t//System.out.println(p[i]+\" \"+p[j]);\n\t\t\t//aa[k]=p[i];\n\t\t\tmq.enqueue(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\t//k++; \n\t\t\t//aa[k]=p[j];\n\t\t\t//k++;\n\t\t\tmq.enqueue(p[j]);\n\t\t\t\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<(count1*2)-1;i++);\n\t//{\n\t//int a=mq.dequeue();\n\t//System.out.println(a);\n\t//}\n\tSystem.out.println(mq);\n\n\n\t}", "private static void traverse(int i, int j) {\r\n\t\tif(i + j == SIZE + SIZE){\r\n\t\t\tCOUNT++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(i < SIZE){\r\n\t\t\ttraverse(i + 1, j);\r\n\t\t}\r\n\t\tif(j < SIZE){\r\n\t\t\ttraverse(i, j + 1);\r\n\t\t}\r\n\t}", "static int gen(int n)\n{ \n int []S = new int [n + 1];\n \n S[0] = 0;\n if(n != 0)\n S[1] = 1;\n \n for (int i = 2; i <= n; i++)\n { \n \n // S(2 * n) = 4 * S(n)\n if (i % 2 == 0)\n S[i] = 4 * S[i / 2];\n \n // S(2 * n + 1) = 4 * S(n) + 1\n else\n S[i] = 4 * S[i/2] + 1;\n }\n \n return S[n];\n}", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n if (t < 0) return false;\n long sz = (long)t + 1;\n Map<Long, Long> map = new HashMap<>();\n for (int i = 0; i < nums.length; ++i) {\n long bucket = getBucket(nums[i], sz);\n if (map.containsKey(bucket)) return true;\n if (map.containsKey(bucket + 1) && Math.abs(nums[i] - map.get(bucket + 1)) < sz) return true;\n if (map.containsKey(bucket - 1) && Math.abs(nums[i] - map.get(bucket - 1)) < sz) return true;\n map.put(bucket, (long)nums[i]);\n if (i >= k) map.remove(getBucket(nums[i - k], sz));\n }\n return false;\n}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nint n=sc.nextInt();\r\n\r\nList<Integer> l=new ArrayList<Integer>();\r\nfor(int i=1;i<=n;i++){\r\n\tif(i%2!=0)\r\n\t{\r\n\t\tl.add(i);\r\n\t}\r\n}\r\n\tSystem.out.println(l);\r\n\tint n1=l.get(0);\r\n\tfor(int i=0;i<l.size();i++){\r\n\tif(i%2==0)\r\n\t\r\n\t\tn1=n1-l.get(i);\r\n\t//System.out.println(s);\r\n\telse\r\n\t\tn1=n1+l.get(i);\r\n\t}\r\n\tSystem.out.println(n1+1);\r\n\t}", "private int hashFunc2(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n // Research shows that you can use a Prime number Less than the array size to calculate the step value.\n // Prime Number 3 arbitrarily chosen.\n return 3 - hashVal % 3;\n }" ]
[ "0.72128385", "0.70046955", "0.6649564", "0.64122117", "0.63029665", "0.6197095", "0.60571164", "0.6027981", "0.6005389", "0.5931952", "0.579814", "0.57863426", "0.57391953", "0.57099843", "0.56881434", "0.56744534", "0.5655361", "0.5645755", "0.56107897", "0.55877745", "0.557108", "0.5565118", "0.5553283", "0.55511117", "0.5538677", "0.55278563", "0.5482301", "0.54623735", "0.5446415", "0.542484", "0.5422749", "0.5417862", "0.54163396", "0.53923315", "0.5350468", "0.5346113", "0.53175455", "0.53165144", "0.5315913", "0.5314061", "0.5294064", "0.528665", "0.5265924", "0.525219", "0.52366906", "0.5233051", "0.5232711", "0.52308196", "0.52307767", "0.5228379", "0.5225751", "0.52209145", "0.5217314", "0.5213267", "0.5212825", "0.5207555", "0.51990014", "0.5198617", "0.5195685", "0.5191579", "0.51902354", "0.5170725", "0.5165064", "0.5163816", "0.5152171", "0.5145941", "0.5145406", "0.5140345", "0.51400024", "0.51308036", "0.51289713", "0.51249546", "0.51189923", "0.5113072", "0.51073575", "0.5103827", "0.5099971", "0.50925434", "0.50920445", "0.5088108", "0.5086141", "0.50814086", "0.50797766", "0.50792617", "0.5075831", "0.50564504", "0.5055983", "0.50470406", "0.5043135", "0.50293595", "0.502858", "0.50281096", "0.5023226", "0.50223804", "0.50215447", "0.5018165", "0.5006669", "0.50056183", "0.5003469", "0.50019807", "0.50007254" ]
0.0
-1
we don't actually need seperate array to store prefix product and suffix products, we can do all the approach discussed in method 3 directly onto our final answer array. Time Complexity: O(n) Space Complexity: O(1)
static int[] productExceptSelfSpaceOptimized(int[] nums) { int n = nums.length; int[] result = new int[n]; Arrays.fill(result, 1); int curr = 1; for (int i = 0; i < n; i++) { result[i] *= curr; curr *= nums[i]; } curr = 1; for (int i = n - 1; i >= 0; i--) { result[i] *= curr; curr *= nums[i]; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int[] productExceptSelfByMathAndConstantSpace(int[] nums){\n int len = nums.length;\n int[] ret = new int[len]; // not count as extra space\n\n // prefix\n ret[0] = 1;\n for(int i = 1; i < len; i++){\n ret[i] = ret[i - 1] * nums[i - 1];\n }\n\n // right to keep the suffix product of i, and ret[i](product) = ret[i](prefix) * right(suffix); and then update right.\n int right = 1; // keep right value of ret[i]\n for(int i = len - 1; i >= 0; i--){\n ret[i] = right * ret[i]; // prefix prdocut of i(ret[i] for current i) * suffix product of i(right, actaully is 'i + 1' for current i)\n right = right * nums[i]; // suffix product of i(actually suffix product of \"i+1\" when right is used.)\n }\n\n return ret;\n }", "static int[] productExceptSelf(int[] nums) {\n int n = nums.length;\n int[] prefix = new int[n];\n int[] suffix = new int[n];\n\n prefix[0] = 1;\n suffix[n - 1] = 1;\n\n for (int i = 1; i < n; i++) {\n prefix[i] = prefix[i - 1] * nums[i - 1];\n }\n\n for (int i = n - 2; i >= 0; i--) {\n suffix[i] = suffix[i + 1] * nums[i + 1];\n }\n\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = prefix[i] * suffix[i];\n }\n return result;\n }", "int[] productExceptSelf(int[] nums) {\n int leng = nums.length;\n int[] ret = new int[leng];\n if (leng == 0)\n return ret;\n int runningprefix = 1;\n for (int i = 0; i < leng; i++) {\n ret[i] = runningprefix;\n runningprefix *= nums[i];\n }\n int runningsufix = 1;\n for (int i = leng - 1; i >= 0; i--) {\n ret[i] *= runningsufix;\n runningsufix *= nums[i];\n }\n return ret;\n }", "private int[] productExceptSelfByMath(int[] nums){\n int len = nums.length;\n int[] ret = new int[len]; // not count as extra space\n\n int[] preMul = new int[len];\n int[] sufMul = new int[len];\n\n // head and tail\n preMul[0] = 1;\n sufMul[len - 1] = 1;\n // prefix multiply\n for(int i = 1; i < len; i++){\n preMul[i] = preMul[i - 1] * nums[i - 1];\n }\n // suffix multiply\n for(int i = len -2; i >= 0; i--){\n sufMul[i] = sufMul[i + 1] * nums[i + 1];\n }\n // cross\n for(int i = 0; i < len; i++){\n ret[i] = preMul[i] * sufMul[i];\n }\n\n return ret;\n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tlong md=s.nextLong();\r\n\t\tlong mr=s.nextLong();\r\n\t\tString a=binGen(0,n);\r\n\t\tString MR;\r\n\t\tString MD;\r\n\t\tif(md<0) { MD=binGen(md,n); }\r\n\t\telse { MD=binGen(md,n);}\r\n\t\tif(mr<0) {MR=binGen(mr,n);}\r\n\t\telse { MR=binGen(mr,n);}\r\n\t\tSystem.out.println(\"MULTIPLICAND=\"+MD);System.out.println(\"MULTIPLIER=Q=\"+MR);\r\n\t\tString[] A=new String[n]; \r\n\t\tString[] Q=new String[n]; \r\n\t\tfor(int i=0;i<n-1;i++)\r\n\t\t{\r\n\t\t\tA[i]=a.substring(i,i+1);\r\n\t\t}\r\n\t\tA[n-1]=a.substring(n-1);\r\n\t\tfor(int i=0;i<n-1;i++)\r\n\t\t{\r\n\t\t\tQ[i]=MR.substring(i,i+1);\r\n\t\t}\r\n\t\tQ[n-1]=MR.substring(n-1);\r\n\t\tString[] C=new String[2*n+1];\r\n\t\tfor(int i=0;i<A.length;i++)\r\n \t{\r\n \t\tC[i]=A[i];\r\n \t}\r\n \tfor(int i=A.length;i<C.length-1;i++)\r\n \t{\r\n \t\tC[i]=Q[i-Q.length];\r\n \t}\r\n\t\tC[C.length-1]=\"0\";\r\n\t\tSystem.out.println(\"A\"+\" \"+\"Q\"+\" \"+\"Q0\");\r\n\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);} System.out.print(\" \");\r\n\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);}System.out.print(\" \"); System.out.print(C[C.length-1]);System.out.println();\r\n\t\t \t\r\n\t\twhile(n!=0)\r\n\t\t{\r\n\t\t\tString str=C[C.length-2]+C[C.length-1];\r\n\t\t\tif(str.contentEquals(\"00\")|| str.contentEquals(\"11\"))\r\n\t\t\t\t{\r\n\t\t\t\t C=ASR(A,Q,C);\r\n\t\t\t\t for(int i=0;i<A.length;i++) {A[i]=C[i];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {Q[i]=C[i+A.length];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);} System.out.print(\" \");\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);}System.out.print(\" \"); System.out.print(C[C.length-1]);System.out.println();\r\n\t\t\t\t \t}\r\n\t\t\telse if(str.contentEquals(\"01\"))\r\n\t\t\t{\r\n\t\t\t\tA=binAdd(A,MD);\r\n\t\t\t\tC=ASR(A,Q,C);\r\n\r\n\t\t\t\t for(int i=0;i<A.length;i++) {A[i]=C[i];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {Q[i]=C[i+A.length];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);} System.out.print(\" \");\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);} System.out.print(\" \"); System.out.print(C[C.length-1]);System.out.println();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tA=binSub(A,MD);\r\n\t\t\t\tC=ASR(A,Q,C);\r\n\t\t\t\t\r\n\t\t\t\t for(int i=0;i<A.length;i++) {A[i]=C[i];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {Q[i]=C[i+A.length];}\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(A[i]);}\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t for(int i=0;i<Q.length;i++) {System.out.print(Q[i]);}System.out.print(\" \"); System.out.print(C[C.length-1]); System.out.println();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tn--;\r\n\t\t}\r\n\t\tString st1=\"\";\r\n\t\tString st2=\"\";\r\n\t\tfor(int i=0;i<A.length;i++) {st1=st1+A[i];st2=st2+Q[i];}\r\n\t\tSystem.out.println(\"FINAL ANSWER :-\");\r\n\t\tSystem.out.println(st1+st2);\r\n\t\tif((md<0 && mr<0)|| (md>=0 && mr>=0) ) {System.out.println(Long.parseLong(st1+st2,2));}\r\n\t\telse if((md<0 && mr>0)||(md>0&&mr<0)) {System.out.println(0-Long.parseLong((twocomp(st1+st2)),2));}\r\n\t\t\r\n\t}", "private String[] getCrossProduct(String digits) {\n\t\tString finalDigit[] = dict[Integer.parseInt(digits.charAt(0)+\"\")];\n\t\tString nextDigit[];\n\t\tString[] str ;\n\t\tint idx;\n\t\t\n\t\tfor(int k = 1; k < digits.length(); k++) {\n\t\t\tnextDigit= dict[Integer.parseInt(digits.charAt(k)+\"\")];\n\t\t\tidx = 0;\n\t\t\tstr = new String[finalDigit.length* nextDigit.length];\n\t\t\tfor(int i = 0; i < finalDigit.length; i++) {\n\t\t\t\tfor(int j = 0; j < nextDigit.length; j++){\n\t\t\t\t\tstr[idx++] = finalDigit[i] + nextDigit[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinalDigit = str;\n\t\t\t\n\t\t}\n\t\treturn finalDigit;\n\t}", "public String multiply(String num1, String num2) {\n int[] n1 = new int[num1.length()];\r\n for(int i = 0; i < num1.length(); i++) {\r\n \tn1[i] = num1.charAt(i) - '0';\r\n }\r\n int[] n2 = new int[num2.length()];\r\n for(int i = 0; i < num2.length(); i++) {\r\n \tn2[i] = num2.charAt(i) - '0';\r\n }\r\n //the result\r\n int[] result = new int[num1.length() + num2.length()];\r\n \r\n //multiple two large numbers\r\n for(int i = n2.length - 1; i >=0; i--) {\r\n \t//the starting point in the result array\r\n \tint v2 = n2[i];\r\n \tint startPoint = result.length - 1 - (n2.length - 1 - i);\r\n \tint carrier = 0;\r\n \tfor(int j = n1.length - 1; j >= 0; j--) {\r\n \t\tint index = startPoint - (n1.length - 1 - j);\r\n \t\tint v1 = n1[j];\r\n \t\t\r\n// \t\tSystem.out.println(\"i: \" + i + \": \" + v2 + \", j: \" + j + \": \" + v1 + \", carrier: \" + carrier);\r\n \t\t\r\n \t\tint finalValue = v1*v2 + carrier + result[index];\r\n \t\tcarrier = finalValue/10;\r\n \t\tresult[index] = finalValue % 10;\r\n \t\t//update the last\r\n \t\tif(j == 0) {\r\n \t\t\tif(carrier > 0) {\r\n \t\t\t\tresult[index - 1] = carrier; //XXX note, need to write to the array cell\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n// \tthis.printArray(result);\r\n }\r\n \r\n //convert to the result\r\n StringBuilder sb = new StringBuilder();\r\n boolean zero = true;\r\n for(int i : result) {\r\n \tif(i != 0 && zero) {\r\n \t\tzero = false;\r\n \t}\r\n \tif(!zero) {\r\n \t sb.append(i);\r\n \t}\r\n }\r\n if(sb.length() == 0) {\r\n \tsb.append(\"0\"); //all ZERO\r\n }\r\n return sb.toString();\r\n }", "public static void main(String args[])\n {\n int[] original = {1,2,3,4,5};\n int[] temp1 = new int[original.length]; //this array will hold the first product\n int[] temp2 = new int[original.length]; //this array will hold the second product\n temp1[0] = 1;\n temp2[original.length-1] = 1;\n for(int i=1;i<temp1.length;i++)\n {\n temp1[i] = temp1[i-1]*original[i-1];\n }\n for(int i=original.length-2;i>=0;i--)\n {\n temp2[i] = temp2[i+1]*original[i+1];\n }\n for(int i=0;i<original.length;i++)\n {\n original[i] = temp1[i]*temp2[i];\n System.out.print(original[i] + \" \");\n }\n }", "public int[] solution(String S, int[] P, int[] Q) {\n \n int[][] result = new int[S.length()][4];\n int[] returnResult = new int[P.length];\n \n //how many different solutions exist?\n //'A' [0], [0] - 1 solution\n //'AG' [0, 0, 1], [0, 1, 1] - 3\n // 'AGT' [0,0,0,1,1,2], [0,1,1,2,2,2] - 6\n // 10\n // 15\n // 21\n \n //Prefix Sum - calculation\n \n for (int i = 1; i< S.length()+1; i++){\n \n if (i == 1){\n switch (S.substring(i-1, i)){\n case \"A\": result[i-1][0] = 1;\n break;\n case \"C\": result[i-1][1] = 1;\n break;\n case \"G\": result[i-1][2] = 1;\n break;\n case \"T\": result[i-1][3] = 1;\n break;\n }\n }else{\n int a = 0;\n switch (S.substring(i-1, i)){\n case \"A\": a = 0;\n break;\n case \"C\": a= 1;\n break;\n case \"G\": a =2;\n break;\n case \"T\": a =3;\n break;\n }\n result[i-1][a] = 1 + result[i-2][a];\n result[i-1][(a+1)%4] = result[i-2][(a+1)%4];\n result[i-1][(a+2)%4] = result[i-2][(a+2)%4];\n result[i-1][(a+3)%4] = result[i-2][(a+3)%4];\n }\n\n }\n \n /*\n for (double i : result){\n System.out.println(i);\n }\n */\n \n //A = 1, G = 2, C = 3, T = 4\n //when A found return 1 and move to next computation.\n // P[k] <= Q[K]\n int lowerBound = 0;\n int upperBound = 0;\n for (int i = 0; i < P.length; i++){\n lowerBound = P[i];\n upperBound = Q[i];\n \n int[] toEvaluate = new int[4];\n\n //System.out.println(lowerBound);\n if (lowerBound == 0){\n toEvaluate[0]= result[upperBound][0];\n toEvaluate[1]= result[upperBound][1];\n toEvaluate[2]= result[upperBound][2];\n toEvaluate[3]= result[upperBound][3];\n }else{\n toEvaluate[0]= result[upperBound][0] - result[lowerBound-1][0]; \n toEvaluate[1]= result[upperBound][1] - result[lowerBound-1][1];\n toEvaluate[2]= result[upperBound][2] - result[lowerBound-1][2];\n toEvaluate[3]= result[upperBound][3] - result[lowerBound-1][3];\n }\n \n /*\n for (int eval : toEvaluate){\n System.out.println(eval);\n \n }\n */\n if (toEvaluate[0] > 0) {returnResult[i] = 1;\n }else if (toEvaluate[1] > 0) {returnResult[i] = 2;\n }else if (toEvaluate[2] > 0) {returnResult[i] = 3;\n }else if (toEvaluate[3] > 0) {returnResult[i] = 4;\n }\n \n }\n \n return returnResult; \n }", "static Integer maximumProductOfAllEntriesButOneBySuffixArray(Integer array[]) {\n int suffix[] = new int[array.length];\n suffix[array.length - 1] = 1;\n\n for (int i = array.length - 1; i > 0; i--) {\n suffix[i - 1] = suffix[i] * array[i];\n }\n\n int prefixProduct = 1;\n int maximumProduct = Integer.MIN_VALUE;\n\n for (int i = 0; i < array.length; i++) {\n int currentProduct = prefixProduct * suffix[i];\n if (maximumProduct < currentProduct) maximumProduct = currentProduct;\n\n prefixProduct *= array[i];\n }\n\n return maximumProduct;\n }", "private void permutation(String prefix, String str) {\n \r\n int n = str.length();\r\n if (n == 0)\r\n {\r\n \r\n ls.add(prefix);\r\n System.out.print(prefix+\",\");\r\n if(ls.isEmpty()==true)\r\n {\r\n ls.remove(ls.indexOf(n)); \r\n }\r\n \r\n al.add(ls);\r\n calc(al);\r\n \r\n }\r\n\r\n else {\r\n \r\n //System.out.print(ls);\r\n \r\n for (int i = 0; i < n; i++)\r\n permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n));\r\n \r\n \r\n }\r\n \r\n \r\n \r\n}", "public static void times (int[] n1, int[] n2, int[] result) {\n\t\tint pos = result.length-1;\n\n\t\t// clear all values....\n\t\tfor (int i = 0; i < result.length; i++) { result[i] = 0; }\n\n\t\tfor (int m = n1.length-1; m>=0; m--) {\n\t\t\tint iPos = pos - (n1.length-1 - m);\n\t\t\tint iPosSubOne = iPos-1;\n\t\t\tif (n1[m] == 0) {\n\t\t\t\tcontinue; // skip zero multiplier! Won't affect total.\n\t\t\t}\n\n\t\t\tfor (int n = n2.length-1; n>=0; n--, iPos--,iPosSubOne--) {\n\t\t\t\tint prod = n1[m]*n2[n];\n\t\t\t\t\n\t\t\t\t// GENERATED-BEGIN\n\t\t\t\tswitch (prod) {\n\t\t\t\tcase 0: break;\n\t\t\t\tcase 1: result[iPos] += 1;break;\n\t\t\t\tcase 2: result[iPos] += 2;break;\n\t\t\t\tcase 3: result[iPos] += 3;break;\n\t\t\t\tcase 4: result[iPos] += 4;break;\n\t\t\t\tcase 5: result[iPos] += 5;break;\n\t\t\t\tcase 6: result[iPos] += 6;break;\n\t\t\t\tcase 7: result[iPos] += 7;break;\n\t\t\t\tcase 8: result[iPos] += 8;break;\n\t\t\t\tcase 9: result[iPos] += 9;break;\n\t\t\t\tcase 10: result[iPosSubOne] += 1;break;\n\t\t\t\tcase 11: result[iPos] += 1;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 12: result[iPos] += 2;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 13: result[iPos] += 3;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 14: result[iPos] += 4;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 15: result[iPos] += 5;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 16: result[iPos] += 6;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 17: result[iPos] += 7;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 18: result[iPos] += 8;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 19: result[iPos] += 9;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 20: result[iPosSubOne] += 2;break;\n\t\t\t\tcase 21: result[iPos] += 1;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 22: result[iPos] += 2;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 23: result[iPos] += 3;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 24: result[iPos] += 4;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 25: result[iPos] += 5;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 26: result[iPos] += 6;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 27: result[iPos] += 7;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 28: result[iPos] += 8;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 29: result[iPos] += 9;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 30: result[iPosSubOne] += 3;break;\n\t\t\t\tcase 31: result[iPos] += 1;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 32: result[iPos] += 2;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 33: result[iPos] += 3;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 34: result[iPos] += 4;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 35: result[iPos] += 5;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 36: result[iPos] += 6;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 37: result[iPos] += 7;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 38: result[iPos] += 8;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 39: result[iPos] += 9;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 40: result[iPosSubOne] += 4;break;\n\t\t\t\tcase 41: result[iPos] += 1;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 42: result[iPos] += 2;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 43: result[iPos] += 3;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 44: result[iPos] += 4;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 45: result[iPos] += 5;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 46: result[iPos] += 6;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 47: result[iPos] += 7;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 48: result[iPos] += 8;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 49: result[iPos] += 9;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 50: result[iPosSubOne] += 5;break;\n\t\t\t\tcase 51: result[iPos] += 1;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 52: result[iPos] += 2;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 53: result[iPos] += 3;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 54: result[iPos] += 4;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 55: result[iPos] += 5;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 56: result[iPos] += 6;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 57: result[iPos] += 7;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 58: result[iPos] += 8;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 59: result[iPos] += 9;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 60: result[iPosSubOne] += 6;break;\n\t\t\t\tcase 61: result[iPos] += 1;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 62: result[iPos] += 2;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 63: result[iPos] += 3;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 64: result[iPos] += 4;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 65: result[iPos] += 5;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 66: result[iPos] += 6;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 67: result[iPos] += 7;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 68: result[iPos] += 8;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 69: result[iPos] += 9;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 70: result[iPosSubOne] += 7;break;\n\t\t\t\tcase 71: result[iPos] += 1;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 72: result[iPos] += 2;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 73: result[iPos] += 3;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 74: result[iPos] += 4;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 75: result[iPos] += 5;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 76: result[iPos] += 6;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 77: result[iPos] += 7;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 78: result[iPos] += 8;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 79: result[iPos] += 9;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 80: result[iPosSubOne] += 8;break;\n\t\t\t\tcase 81: result[iPos] += 1;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 82: result[iPos] += 2;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 83: result[iPos] += 3;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 84: result[iPos] += 4;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 85: result[iPos] += 5;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 86: result[iPos] += 6;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 87: result[iPos] += 7;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 88: result[iPos] += 8;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 89: result[iPos] += 9;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 90: result[iPosSubOne] += 9;break;\n\t\t\t\tcase 91: result[iPos] += 1;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 92: result[iPos] += 2;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 93: result[iPos] += 3;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 94: result[iPos] += 4;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 95: result[iPos] += 5;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 96: result[iPos] += 6;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 97: result[iPos] += 7;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 98: result[iPos] += 8;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 99: result[iPos] += 9;result[iPosSubOne] += 9;break;\n\t\t\t\t};\n\t\t\t\tswitch (result[iPos]) {\n\t\t\t\tcase 0: break; \n\t\t\t\tcase 1: break; \n\t\t\t\tcase 2: break; \n\t\t\t\tcase 3: break; \n\t\t\t\tcase 4: break; \n\t\t\t\tcase 5: break; \n\t\t\t\tcase 6: break; \n\t\t\t\tcase 7: break; \n\t\t\t\tcase 8: break; \n\t\t\t\tcase 9: break; \n\t\t\t\tcase 10: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 11: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 12: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 13: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 14: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 15: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 16: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 17: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 18: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 19: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 20: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 21: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 22: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 23: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 24: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 25: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 26: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 27: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 28: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 29: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 30: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 31: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 32: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 33: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 34: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 35: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 36: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 37: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 38: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 39: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 40: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 41: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 42: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 43: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 44: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 45: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 46: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 47: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 48: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 49: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 50: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 51: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 52: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 53: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 54: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 55: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 56: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 57: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 58: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 59: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 60: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 61: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 62: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 63: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 64: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 65: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 66: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 67: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 68: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 69: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 70: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 71: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 72: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 73: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 74: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 75: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 76: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 77: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 78: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 79: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 80: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 81: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 82: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 83: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 84: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 85: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 86: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 87: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 88: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 89: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 90: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 91: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 92: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 93: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 94: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 95: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 96: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 97: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 98: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 99: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// GENERATED-END\n\t\t\t}\n\t\t}\n\t}", "public String multiply(String num1, String num2) {\n int len1 = num1.length();\n int len2 = num2.length();\n int[] products = new int[len1 + len2];\n //1. compute products from each pair of digits from num1 and num2.\n for (int i = len1 - 1; i >= 0; i -- ) {\n for (int j = len2 - 1; j >= 0; j--) {\n int digit1 = num1.charAt(i) - '0';\n int digit2 = num2.charAt(j) - '0';\n products[i+j+1] += digit1 * digit2;\n }\n }\n //2.carry each element over\n int carry = 0;\n for (int i =products.length - 1; i >= 0; i--){\n int tmp = (products[i] + carry) % 10;\n carry = (products[i] + carry) / 10;\n products[i] = tmp;\n }\n //3.output the solution\n StringBuilder sb = new StringBuilder();\n for (int num : products) sb.append(num);\n // eliminate the leading 0\n while (sb.length() != 0 && sb.charAt(0) == '0') sb.deleteCharAt(0);\n return sb.length() == 0 ? \"0\" : sb.toString();\n }", "private static void permutation(String prefix, String str) {\n int n = str.length();\n if (n == 0) System.out.println(prefix);\n else {\n for (int i = 0; i < n; i++){\n \t System.out.println(\"prefix+str.char at i \" +prefix + str.charAt(i)+\" substring1 \"+str.substring(0, i)+\" substring2 \"+str.substring(i+1, n));\n permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n));}\n }\n}", "private static List<Pair<String,String>> product(String[] alist, String[] blist){\n\n List<Pair<String, String>> prod = new ArrayList<>();\n\n for(String a : alist){\n for(String b : blist){\n prod.add(new Pair<>(a,b));\n }\n }\n return prod;\n }", "public static int [] evaluate(int a[]) {\n\t\tint n = a.length;\n\t\tint maxlen = 0;\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tint sum = 0;\n\t\tint start = 0, end = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tsum += a[i];\n\t\t\t//case 1: prefix ending at i may be longest\n\t\t\tif(sum == 1) {\n\t\t\t\tmaxlen = i+1;\n\t\t\t\tend = i; start = 0;\n\t\t\t}\n\t\t\t//case 2: suffix ending at i(not starting at 0) may be longest\n\t\t\tif(map.containsKey(sum-1)) {\n\t\t\t\tif(maxlen < i-map.get(sum-1)) {\n\t\t\t\t\tmaxlen = i-map.get(sum-1);\n\t\t\t\t\tstart = map.get(sum-1)+1;\n\t\t\t\t\tend = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//using \"!\" b/c we don't want to override the smallest i with this prefix sum\n\t\t\t//in search of longest subarray\n\t\t\tif(!map.containsKey(sum)) map.put(sum, i); \n\t\t}\n\t\tint ans[] = {maxlen, start, end};\n\t\t//System.out.println(\"array : \"+Arrays.toString(a)+\" , start = \"+start+\", end = \"+end+\", max = \"+maxlen);\n\t\treturn ans;\n\t}", "public static void main(String[] args) {\r\n\t\tint[] array = { 1, 2, 3, 4, 5, 6, 10, 20 };\r\n\t\tint sum;\r\n\t\tsum = example1(array);\r\n\t\tSystem.out.println(\"This is the result of the sum from Example 1\");\r\n\t\tSystem.out.println(sum);\r\n\t\tSystem.out.println(\"--------------------------------------------\");\r\n\r\n\t\t/*\r\n\t\t * Explanation: We know that while loop runs (n) times, so even if we count\r\n\t\t * total time such as O(1) +O(1) +(O(n). Since we drop lower term and we look\r\n\t\t * for the worse case therefore the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\r\n\t\t// Testing Exmaple2 here\r\n\t\tint[] array2 = { 12, 3, 4, 5, 11, 9 };\r\n\t\tint evenIndexSum;\r\n\t\tevenIndexSum = example2(array2);\r\n\t\tSystem.out.println(\"\\nResult of the sum of numbers with even index from Example 2\");\r\n\t\tSystem.out.println(evenIndexSum);\r\n\t\tSystem.out.println(\"-----------------------------------------------------------\");\r\n\r\n\t\t// Testing Example 3 here\r\n\r\n\t\tint[] array3 = { 7, 1, 8, 2, 13, 17 };\r\n\t\tint prefixSum;\r\n\t\tprefixSum = example3(array3);\r\n\t\tSystem.out.println(\"Result of the prefix sum of Example 3\");\r\n\t\tSystem.out.println(prefixSum);\r\n\t\tSystem.out.println(\"\\n***************************************\");\r\n\r\n\t\t// Testing Example 4 here\r\n\r\n\t\tint[] array4 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };\r\n\t\tint sumPrefixSum;\r\n\t\tsumPrefixSum = example4(array4);\r\n\t\tSystem.out.println(\"Result of the prefix sums of given array Example 4\");\r\n\t\tSystem.out.println(sumPrefixSum);\r\n\t\tSystem.out.println(\"\\n+++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n\r\n\t\t// Testing Example 5 here\r\n\t\tint[] firstArray = { 1, 2, 3, 4, 5, 6 };\r\n\t\tint[] secondArray = {1,2,3,4,5,6};\r\n\r\n\t\tint prefixArraySum;\r\n\t\tprefixArraySum = example5(firstArray, secondArray);\r\n\r\n\t\tSystem.out.println(\"Result second array stores sum of prefix sums from first\");\r\n\t\tSystem.out.println(prefixArraySum);\r\n\t\tSystem.out.println(\"\\n=======================================================\");\r\n\r\n\t}", "@Test\n public void saConstruction() {\n String text = \"BAAAAB0ABAAAAB1BABA2ABA3AAB4BBBB5BB\";\n\n SuffixArray sa1 = new SuffixArraySlow(text);\n SuffixArray sa2 = new SuffixArrayMed(text);\n SuffixArray sa3 = new SuffixArrayFast(text);\n SuffixArray[] suffixArrays = {sa1, sa2, sa3};\n\n for (int i = 0; i < suffixArrays.length; i++) {\n for (int j = i + 1; j < suffixArrays.length; j++) {\n SuffixArray s1 = suffixArrays[i];\n SuffixArray s2 = suffixArrays[j];\n for (int k = 0; k < s1.getSa().length; k++) {\n assertThat(s1.getSa()[k]).isEqualTo(s2.getSa()[k]);\n }\n }\n }\n }", "public static void multiply(int[] n1, int[] n2, int[] result) {\n\t\tint pos = result.length-1;\n\t\t// clear all values....\n\t\tfor (int i = 0; i < result.length; i++) {result[i] = 0; }\n\t\t\n\t\tint off;\n\t\tfor (int m = n1.length-1; m>=0; m--) {\n\t\t\toff = n1.length-1 - m;\n\t\t\tif (n1[m] == 0) {\n\t\t\t\tcontinue; // skip zero multiplier! Won't affect total.\n\t\t\t}\n\t\t\tfor (int n = n2.length-1; n>=0; n--) {\n\t\t\t\tint prod = n1[m]*n2[n];\n\t\t\t\t\n\t\t\t\tresult[pos-off] += prod % 10;\n\t\t\t\tif (result[pos-off] > 9) { // carry internally\n\t\t\t\t\tdo {\n\t\t\t\t\t\tresult[pos-off] -= 10;\n\t\t\t\t\t\tresult[pos-off-1]++;\n\t\t\t\t\t} while (result[pos-off] > 9);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (prod > 9) {\n\t\t\t\t\tresult[pos-off-1] += prod / 10; // deal with carry sum later\n\t\t\t\t}\n\t\t\t\toff++;\n\t\t\t}\n\t\t}\n\t}", "private static int[] computeTemporaryArray(String pattern)\r\n\t{\r\n\t\t// Temp array is of the same size of the pattern.\r\n\t\t// Every point tells us what is the longest suffix length which is also the prefix in this temp array.\r\n\t\tint [] lps = new int[pattern.length()];\r\n\t\t\r\n\t\t// First point is always 0\r\n\t\tint j =0;\r\n\r\n\t\t// Note that there is no i++ here in this for()\r\n\t\tfor(int i=1; i < pattern.length();)\r\n\t\t{\r\n\t\t\t// Match is found\r\n\t\t\tif(pattern.charAt(i) == pattern.charAt(j))\r\n\t\t\t{\r\n\t\t\t\tlps[i] = j + 1;\r\n\t\t\t\tj++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\r\n\t\t\t// Match is not found\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// If j is not at zero, move back and do not increase i\r\n\t\t\t\tif(j != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tj = lps[j-1];\r\n\t\t\t\t}\r\n\t\t\t\t// If j is at zero, there is no other option but to proceed further and mark that cell as zero\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tlps[i] =0;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lps;\r\n\t}", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }", "public static int[] suffixArray(CharSequence S) {\n int n = S.length();\n Integer[] order = new Integer[n];\n for (int i = 0; i < n; i++)\n order[i] = n - 1 - i;\n\n // stable sort of characters\n Arrays.sort(order, (a, b) -> Character.compare(S.charAt(a), S.charAt(b)));\n\n int[] sa = new int[n];\n int[] classes = new int[n];\n for (int i = 0; i < n; i++) {\n sa[i] = order[i];\n classes[i] = S.charAt(i);\n }\n // sa[i] - suffix on i'th position after sorting by first len characters\n // classes[i] - equivalence class of the i'th suffix after sorting by\n // first len characters\n\n for (int len = 1; len < n; len *= 2) {\n int[] c = classes.clone();\n for (int i = 0; i < n; i++) {\n // condition sa[i - 1] + len < n simulates 0-symbol at the end\n // of the string\n // a separate class is created for each suffix followed by\n // simulated 0-symbol\n classes[sa[i]] = i > 0 && c[sa[i - 1]] == c[sa[i]] && sa[i - 1] + len < n\n && c[sa[i - 1] + len / 2] == c[sa[i] + len / 2] ? classes[sa[i - 1]] : i;\n }\n // Suffixes are already sorted by first len characters\n // Now sort suffixes by first len * 2 characters\n int[] cnt = new int[n];\n for (int i = 0; i < n; i++)\n cnt[i] = i;\n int[] s = sa.clone();\n for (int i = 0; i < n; i++) {\n // s[i] - order of suffixes sorted by first len characters\n // (s[i] - len) - order of suffixes sorted only by second len\n // characters\n int s1 = s[i] - len;\n // sort only suffixes of length > len, others are already sorted\n if (s1 >= 0)\n sa[cnt[classes[s1]]++] = s1;\n }\n }\n return sa;\n }", "private static int[] productExceptSelf(int[] nums) {\n int[] result = new int[nums.length];\n\n result[0] = 1;\n for (int i = 1; i < nums.length; i++) {\n result[i] = result[i - 1] * nums[i - 1];\n }\n\n int prodRight = 1;\n for (int j = nums.length - 2; j >= 0; j--) {\n prodRight *= nums[j + 1];\n result[j] = result[j] * prodRight;\n }\n\n return result;\n\n }", "static\nint\nfindMaxSum(\nint\n[]arr, \nint\nn) \n\n{ \n\n\n// Array to store prefix sum. \n\nint\n[]preSum = \nnew\nint\n[n]; \n\n\n// Array to store suffix sum. \n\nint\n[]suffSum = \nnew\nint\n[n]; \n\n\n// Variable to store maximum sum. \n\nint\nans = \nint\n.MinValue; \n\n\n// Calculate prefix sum. \n\npreSum[0] = arr[0]; \n\nfor\n(\nint\ni = 1; i < n; i++) \n\npreSum[i] = preSum[i - 1] + arr[i]; \n\n\n// Calculate suffix sum and compare \n\n// it with prefix sum. Update ans \n\n// accordingly. \n\nsuffSum[n - 1] = arr[n - 1]; \n\n\nif\n(preSum[n - 1] == suffSum[n - 1]) \n\nans = Math.Max(ans, preSum[n - 1]); \n\n\nfor\n(\nint\ni = n - 2; i >= 0; i--) \n\n{ \n\nsuffSum[i] = suffSum[i + 1] + arr[i]; \n\n\nif\n(suffSum[i] == preSum[i]) \n\nans = Math.Max(ans, preSum[i]); \n\n} \n\n\nreturn\nans; \n\n}", "private static String subProcess(int[] n1, int[] n2) {\n\n\t\t// if n1.length is smaller than n2.length, we are going to be too small.\n\t\tif (n1.length < n2.length) {\n\t\t\treturn \"+\" + toString (n1);\n\t\t}\n\t\t\n\t\t// we have to extend, and reduce length. Note that this WILL terminate because\n\t\t// we would have left earlier if n2 were greater than n1.\n\t\tint off = 0;\n\t\tint length = n2.length;\n\t\twhile (compareTo(n2,0,length,n1,off) > 0) {\n\t\t\tn2 = expand(n2);\n\t\t\tlength = n2.length;\n\t\t\t\n\t\t\tif (length > n1.length) {\n\t\t\t\t// gone too far! We at last have our remainder! Return as \"+remainder\".\n\t\t\t\treturn \"+\" + toString(n1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint []innerSum = new int[n1.length+1]; // add 1 just in case we get too high\n\t\tint []result = new int[length]; \n\t\tint start;\n\t\t\n\t\t// initial set.\n\t\tif (n2[0] == 0) { start = 9; } else { start = n1[0]/n2[0]; }\n\t\t\n\t\tmultiply(n2, start, innerSum);\n\t\tinnerSum = reduce(innerSum);\n\t\t\n\t\tif (innerSum.length < n2.length) {\n\t\t\t// perfect fit. Expand back out to work with subtractDown. REALLY UGLY CODE\n\t\t\tinnerSum = expand(innerSum);\n\t\t} else {\n\t\t\t// must reduce and continue....\n\t\t\twhile (n2.length < innerSum.length) {\n\t\t\t\tstart--; // had gone too far! Back down.\n\t\t\t\tinnerSum = new int[n1.length+1];\n\t\t\t\tmultiply (n2, start, innerSum);\n\t\t\t\tinnerSum = reduce(innerSum);\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean subtractDown = compareTo(innerSum, n1, innerSum.length) > 0; // if false, we have to add up\n\t\twhile (true) {\n\t\t\tif (subtractDown) {\n\t\t\t\tstart--;\n\t\t\t\tsubtract(innerSum, n2, result, subProcessSign);\n\t\t\t\tassign(innerSum, result);\n\t\t\t\t\n\t\t\t\tsubtractDown = compareTo(innerSum, n1, innerSum.length) > 0;\n\t\t\t} else {\n\t\t\t\t// found. Note that 'start' is the digit in the quotient. Subtract from and replace.\n\t\t\t\tint []newTop = new int[innerSum.length];\n\t\t\t\textract(newTop,0,n1,0,innerSum.length);\n\t\t\t\t\n\t\t\t\tresult = new int[innerSum.length];\n\t\t\t\tsubtract(newTop, innerSum, result, subProcessSign); \n\t\t\t\textract(n1,0,result,0,result.length); // copy back in\n\t\t\t\t\n\t\t\t\tint[]normalized_n1 = reduce(n1);\n\t\t\t\tint[]normalized_n2 = reduce(n2);\n\t\t\t\tString s = start + subProcess(normalized_n1, normalized_n2);\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"abccbc\";\n\t\t\n\t\tlong[][] dp = new long[str.length()][str.length()];\t\n\t\t\n\t\tfor (int g=0 ; g<str.length() ; g++) {\n\t\t\t\n\t\t\tfor (int i=0 , j=g ; j<str.length() ; i++ , j++) {\n\t\t\t\tif (g == 0) dp[i][j] = 1;\n\t\t\t\t\n\t\t\t\telse if (g == 1) dp[i][j] = (str.charAt(i) == str.charAt(j)) ? 3 : 2;\n\t\t\t\t\n\t\t\t\telse dp[i][j] = (str.charAt(i) == str.charAt(j)) ? (dp[i][j-1] + dp[i+1][j] + 1) : (dp[i][j-1] + dp[i+1][j] - dp[i+1][j-1]);\n\t\t\t\t\n\t\t\t\t//if (dp[i][j] && str.substring(i, j+1).length() > result.length()) result = str.substring(i, j+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(dp[0][str.length()-1]);\n\t}", "private long getPrefixValue(int preIndex){\n long result = 0;\n for(int index = 0; index<=preIndex;index++){\n result = result^array[index];\n }\n return result;\n }", "public int[] solutionPrefixSum(String S, int[] P, int[] Q) {\n int[][] prefixSums = new int[S.length() + 1][3];\n\n // primeira linha, aqui não foi lido nada ainda (para facilitar as contas depois)\n prefixSums[0] = new int[3];\n\n for (int i = 0; i < S.length(); i++) {\n prefixSums[i + 1] = prefixSums[i].clone();\n atualizaLinha(prefixSums[i + 1], S.charAt(i));\n }\n\n // somas prefixadas prontas, hora de caçar as respostas\n\n int[] solutions = new int[P.length];\n\n for (int i = 0; i < P.length; i++) {\n int inicioIntervalo = P[i] + 1;\n int fimIntervalo = Q[i] + 1;\n\n if (prefixSums[fimIntervalo][0] - prefixSums[inicioIntervalo - 1][0] > 0) {\n solutions[i] = decode('A');\n } else if (prefixSums[fimIntervalo][1] - prefixSums[inicioIntervalo - 1][1] > 0) {\n solutions[i] = decode('C');\n } else if (prefixSums[fimIntervalo][2] - prefixSums[inicioIntervalo - 1][2] > 0) {\n solutions[i] = decode('G');\n } else {\n solutions[i] = decode('T');\n }\n\n }\n\n return solutions;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int t = sc.nextInt();\n for(int ii=0;ii<t;ii++){\n String str = sc.next();\n int sa[] = getSuffixArray(str);\n int lcp[] = getLCP(sa,str);\n int n = str.length();\n long range[] = new long[n];\n for(int i=0;i<n;i++){\n long len = (long)(n-sa[i]);\n range[i] = (long)(len*(len+1)/2)-(long)(lcp[i]*(lcp[i]+1)/2);\n }\n long k = sc.nextLong();\n for(int i=0;i<n;i++){\n int s = sa[i];\n int lc = lcp[i];\n if(range[i]>=k){\n int len = 1+lc;\n while(k>len){\n k -= len;\n len++;\n }\n System.out.println(str.charAt(s+(int)k-1));\n break;\n }\n else\n k -= range[i];\n }\n }\n }", "public int[] productExceptSelf(int[] nums) {\n int[] res = new int[nums.length];\n if (nums.length == 0) {\n return res;\n }\n int beforeFactor = 1;\n for (int i = 0; i < nums.length; i++) {\n res[i] = beforeFactor;\n beforeFactor *= nums[i];\n }\n int afterFactor = 1;\n for (int i = nums.length - 1; i >= 0; i--) {\n res[i] *= afterFactor;\n afterFactor *= nums[i];\n }\n return res;\n\n }", "public static int[] solution(String str1, String str2) {\n int[] ans = new int[2];\n int n = str1.length(), m = str2.length();\n int[][] dp = new int[m + 1][n];\n for (int k = 0; k < n; k++) {\n for (int i = 0, j = k; j < n; i++, j++) {\n if (k == 0)\n dp[i][j] = str1.charAt(j) - '0';\n else if (k == 1) {\n int a = str1.charAt(i) - '0', b = str1.charAt(j) - '0';\n if (str2.charAt(i) == '+')\n dp[i][j] = a + b;\n else\n dp[i][j] = a * b;\n } else {\n int min = Integer.MAX_VALUE;\n for (int x = i; x < j; x++) {\n if (str2.charAt(x) == '+')\n min = Math.min(min, dp[i][x] + dp[x + 1][j]);\n else\n min = Math.min(min, dp[i][x] * dp[x + 1][j]);\n }\n dp[i][j] = min;\n }\n }\n }\n\n ans[0] = dp[0][n - 1];\n\n for (int k = 0; k < n; k++) {\n for (int i = 0, j = k; j < n; i++, j++) {\n if (k == 0)\n dp[i][j] = str1.charAt(j) - '0';\n else if (k == 1) {\n int a = str1.charAt(i) - '0', b = str1.charAt(j) - '0';\n if (str2.charAt(i) == '+')\n dp[i][j] = a + b;\n else\n dp[i][j] = a * b;\n } else {\n int max = Integer.MIN_VALUE;\n for (int x = i; x < j; x++) {\n if (str2.charAt(x) == '+')\n max = Math.max(max, dp[i][x] + dp[x + 1][j]);\n else\n max = Math.max(max, dp[i][x] * dp[x + 1][j]);\n }\n dp[i][j] = max;\n }\n }\n }\n\n ans[1] = dp[0][n - 1];\n\n return ans;\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tString arr[][] = {{\"A\", \"B\"}, {\"K\", \"e\"}, {\"L\", \"X\", \"e\"}};\n\t\t\n\t\tString s = \"\";\n\t\t\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\n\t\t\t\ts = s + arr[i][arr[i].length-1];\n\t\t}\n\t\tSystem.out.println(s);\n\t\t\n\t\t\n\t\t//Homework\n\t\t//Find the multiplication of the first elements in every array\n\t\tint brr[][] = {{32, 12, 11}, {21, 34}, {3}};\n\t\t\n\t\tint prod = 1; \n\t\t\n\t\tfor (int i = 0; i < brr.length; i++) {\n\t\t\t\n\t\t\tprod = prod * brr[i][0];\n\t\t}\n System.out.println(prod);\n\t}", "public int[] productExceptSelf(int[] nums) {\n int[] le = new int[nums.length + 1];\n int[] ri = new int[nums.length + 1];\n le[0] = ri[ri.length - 1] = 1;\n for(int i = 1; i < le.length; i++) {\n le[i] = le[i-1]*nums[i-1];\n ri[ri.length - i - 1] = ri[ri.length - i]*nums[nums.length - i];\n }\n for(int i = 0; i < nums.length; i++) {\n nums[i] = le[i] * ri[i+1];\n }\n return nums;\n }", "static String product (String s1, String s2) {\r\n try {\r\n if (s1==errorSignature\r\n || s2==errorSignature) return errorSignature;\r\n if (s1==null || s1.length()==0) return s2;\r\n if (s2==null || s2.length()==0) return s1;\r\n StringBuffer result = new StringBuffer();\r\n\r\n // arrays for reference passing values\r\n char type1 [] = new char[1];\r\n char type2 [] = new char[1];\r\n int pos1 [] = new int[1];\r\n int pos2 [] = new int[1];\r\n int power1[] = new int[1];\r\n int power2[] = new int[1];\r\n int index1[] = new int[1];\r\n int index2[] = new int[1];\r\n int n1 = eatNumber (s1, pos1); // <n>(..dimensionReference)\r\n int n2 = eatNumber (s2, pos2); // <n>(..dimensionReference)\r\n int n = 0;\r\n\r\n String name1 = eatReference (s1, pos1, type1, power1, index1);\r\n String name2 = eatReference (s2, pos2, type2, power2, index2);\r\n\r\n boolean done1 = false;\r\n boolean done2 = false;\r\n for (;;) {\r\n // invariant: type1&type2, power1&power2 etc denote lexically ordered\r\n // components that still need to be reflected in the result buffer.\r\n //\r\n\r\n boolean eat1 = false;\r\n boolean eat2 = false;\r\n boolean spawn1 = false;\r\n boolean spawn2 = false;\r\n int power = 0;\r\n\r\n if (done1) {\r\n if (done2) break;\r\n eat2 = spawn2 = true;\r\n power = power2[0];\r\n }\r\n else if (done2) {\r\n eat1 = spawn1 = true;\r\n power = power1[0];\r\n }\r\n else if (type1[0]=='D') {\r\n if (type2[0]=='D') {\r\n int cmp=name1.compareTo(name2);\r\n if (cmp<0) {eat1 = spawn1 = true; power = power1[0];}\r\n else if (cmp>0) {eat2 = spawn2 = true; power = power2[0];}\r\n else {eat1 = eat2 = true; power = power1[0]+power2[0];\r\n if (power!= 0) spawn1 = true; }\r\n }\r\n else { // type2[0]=='W'\r\n eat1 = spawn1 = true; power = power1[0];\r\n }\r\n } else { // type1[0]=='W'\r\n if (type2[0]=='D') {\r\n eat2 = spawn2 = true; power = power2[0];\r\n }\r\n else { // both 'W'\r\n if (index1[0]<index2[0]) {eat1 = spawn1 = true; power = power1[0];}\r\n else if (index1[0]>index2[0]) {eat2 = spawn2 = true; power = power2[0];}\r\n else { eat1 = eat2 = true; power = power1[0]+power2[0];\r\n if (power!= 0) spawn1 = true; }\r\n }\r\n }\r\n if (spawn1) {\r\n n++;\r\n if (type1[0]=='D') result.append ('D').append (power).append (name1) .append(';');\r\n else result.append ('W').append (power).append ('V') .append(index1[0]).append (';');\r\n }\r\n else if (spawn2) {\r\n n++;\r\n if (type2[0]=='D') result.append ('D').append (power).append (name2) .append(';');\r\n else result.append ('W').append (power).append ('V') .append(index2[0]).append (';');\r\n }\r\n if (eat1) {if (--n1==0) done1=true; else name1=eatReference(s1,pos1,type1,power1,index1);}\r\n if (eat2) {if (--n2==0) done2=true; else name2=eatReference(s2,pos2,type2,power2,index2);}\r\n }\r\n if (n==0) return null;\r\n return n+result.toString();\r\n }\r\n catch (RuntimeException e) {\r\n throw new RuntimeException (\"INTERNAL ERROR: illegal dimension signature: \"+s1+\" or \"+s2);\r\n }\r\n }", "public int[] productExceptSelf(int[] nums) {\n int[] ans = new int[nums.length];\n ans[0] = 1;\n\n // for any item i it is the product of left side and right side elements.\n // store product of left side elements up to i in ans\n for (int i = 1; i < nums.length; i++)\n ans[i] = nums[i-1] * ans[i-1];\n\n // product of right side elements\n int rp = 1;\n for (int j = nums.length -1 ; j >=0 ; j--) {\n ans[j] = rp * ans[j];\n rp = rp * nums[j];\n }\n return ans;\n }", "public int[] productExceptSelf2(int[] nums) {\n int[] res = new int[nums.length];\n\n res[0] = 1;\n // from left to right\n for (int i = 1; i < nums.length; i++) {\n res[i] = res[i-1] * nums[i-1];\n }\n\n // from right to left, use a variable to store the product\n int right = 1;\n for (int i = nums.length - 1; i >= 0; i--) {\n res[i] *= right;\n right *= nums[i];\n }\n\n return res;\n }", "public List<List<String>> suggestedProducts(String[] products, String searchWord) {\n Trie trie = new Trie();\n for(String product : products){\n trie.insert(product);\n }\n List<List<String>> res = new ArrayList<>();\n\n for(int i = 1; i <= searchWord.length(); i++){\n String str = searchWord.substring(0, i);\n List<String> inner = trie.suggest(str);\n res.add(inner);\n\n\n }\n return res;\n\n\n\n }", "public static void main(String[] args) {\n System.out.println(Arrays.toString(arrayOfArrayProducts(new int[] {2,3,0,982,10})));\n }", "static long productPandigitalSum() {\n // Create a long to return\n long sum = 0;\n HashSet<Integer> products = new HashSet<>();\n\n // Has to be a product between a two and three digit number\n for(int a = 1; a < 100; a++) {\n for(int b = 100; b < 10000; b++) {\n // If pandigital, add to the set\n if(arePandigital(a, b, (a*b))) products.add(a*b);\n }\n }\n\n // Go through the set and add it to the set\n for(Integer i : products) sum += i;\n\n return sum;\n }", "public int[] productExceptSelf(int[] nums) {\n int[] res = new int[nums.length];\n int[] left = new int[nums.length];\n int[] right = new int[nums.length];\n\n left[0] = 1;\n for (int i = 1; i < nums.length; i++) {\n left[i] = left[i-1] * nums[i-1];\n }\n\n right[nums.length-1] = 1;\n for (int i = nums.length-2; i >= 0; i--) {\n right[i] = right[i+1] * nums[i+1];\n }\n\n for (int i = 0; i < res.length; i++) {\n res[i] = left[i] * right[i];\n }\n\n return res;\n }", "private static byte[] joins(final byte[] prefix, final byte[] suffix) {\n byte[] ret = new byte[prefix.length + suffix.length];\n System.arraycopy(prefix, 0, ret, 0, prefix.length);\n System.arraycopy(suffix, 0, ret, prefix.length, suffix.length);\n return ret;\n }", "int[] prefix_suffix_tabble(String pattern){\n\n // ABAB\n int[] table = pattern.length;\n\n int M = pattern.length();\n int i=0;\n int j=1;\n\n table[0] = 0;\n\n while(j<M){\n if(pattern.charAt(i) == pattern.charAt(j)){\n table[j] = i+1;\n i++;\n j++;\n }\n else{ // charAt(i) != charAt(j)\n\n\n if(i==0){ // cant go to previous, so just set it to 0 and move on. Almost our base case\n table[j] = 0;\n j++;\n continue;\n }\n\n // set i to the value of the previous and keep doing it\n int valueAtPrevious = table[i-1];\n i = valueAtPrevious;\n }\n }\n return table;\n // ith index indicates a prefix that is also a suffix from 0 including i. Cant be the whole String\n\n\n }", "public static void main(String[] args) {\n String num1 = \"256117489511377083148593685533950561400363410418754703282767252221661609163404299\";\n String num2 = \"61200496111643709081218550902198211480012378840070191147459688611759881218205422431757614\";\n// String num1 = \"29476\";\n// String num2 = \"919\";\n MultiplyStringsSolution solution = new MultiplyStringsSolution();\n long a = System.currentTimeMillis();\n System.out.println(solution.multiply(num1, num2));\n long b = System.currentTimeMillis();\n System.out.println(b - a);\n System.out.println(solution.multiply2(num1, num2));\n long c = System.currentTimeMillis();\n System.out.println(c - b);\n System.out.println(solution.multiply3(num1, num2));\n long d = System.currentTimeMillis();\n System.out.println(d - c);\n System.out.println(solution.multiply4(num1, num2));\n long e = System.currentTimeMillis();\n System.out.println(e - d);\n }", "private static BigInteger[][] multiply (BigInteger a[][], BigInteger b[][])\n {\n BigInteger x = (a[0][0].multiply(b[0][0])).add(a[0][1].multiply(b[1][0]));\n BigInteger y = (a[0][0].multiply(b[0][1])).add(a[0][1].multiply(b[1][1]));\n BigInteger z = (a[1][0].multiply(b[0][0])).add(a[1][1].multiply(b[1][0]));\n BigInteger w = (a[1][0].multiply(b[0][1])).add(a[1][1].multiply(b[1][1]));\n \n return new BigInteger[][]{{x, y},{z, w}};\n }", "public int[] productExceptSelf(int[] nums) {\n\t\tint[] forward = new int[nums.length];\n\t\tint[] backward = new int[nums.length];\n\t\tint[] result = new int[nums.length];\n\t\t\n\t\tforward[0] = 1;\n\t\tSystem.out.printf(\"%d \", forward[0]);\n\t\tfor (int i =1; i < nums.length; i++) {\n\t\t\tforward[i] = forward[i-1] * nums[i-1];\n\t\t\tSystem.out.printf(\"%d \", forward[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tbackward[nums.length-1] = 1;\n\t\t\n\t\tfor (int i = nums.length - 2; i >= 0 ; i--) {\n\t\t\tbackward[i] = backward[i+1] * nums[i+1];\n\t\t\tSystem.out.printf(\"%d \", backward[i]);\n\t\t}\n\t\tSystem.out.printf(\"%d \", backward[nums.length-1]);\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tresult[i] = forward[i] * backward[i];\n\t\t\tSystem.out.printf(\"%d \", result[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\treturn result;\n\t}", "public static void main(String[] args)\n {\n double start = System.currentTimeMillis();\n int sum = 0;\n BigInteger product = new BigInteger(\"1\");\n BigInteger one = new BigInteger(\"1\");\n BigInteger number = new BigInteger(\"100\");\n while (number.compareTo(one) == 1)\n {\n product = product.multiply(number);\n number = number.subtract(new BigInteger(\"1\"));\n }\n String pString = product.toString();\n for (int i = 0; i < pString.length(); i++)\n {\n int n = Character.getNumericValue(pString.charAt(i));\n sum += n;\n }\n System.out.println(sum);\n System.out.printf(\"\\nRunning Time: %fms\\n\", System.currentTimeMillis() - \n start);\n }", "public Set<List<String>> getCombination(int[] inHand) {\n Set<List<String>> result = new HashSet<>();\n for (int i = 0; i < inHand.length; i++) {\n if (inHand[i] < 1) continue;\n int[] copyHand = copyArray(inHand);\n //possibility of A AA AAA\n for (int j = 1; j <= inHand[i]; j++) {\n if (j == 1) {\n String cSet = \"\";\n\n for (int seq = i; seq <= i + 2; seq++) {\n if (seq >= inHand.length || copyHand[seq] < 1) continue;\n cSet += seq;\n copyHand[seq] -= 1;\n }\n// System.out.println(\"i: \" + i + \" j: \" + j+\"inhand: \" + arrayToString\n// (inHand));\n\n Set<List<String>> a = getCombination(copyHand);\n Set<List<String>> newA = new HashSet<>();\n for (List<String> s : a) {\n s.add(cSet);\n s.sort(Comparator.naturalOrder());\n if (s.equals(\"\")) continue;\n newA.add(s);\n }\n result.addAll(newA);\n continue;\n }\n\n String currentSet = \"\";\n int[] copyOfInHand = copyArray(inHand);\n for (int t = 0; t < j; t++) {\n currentSet += i;\n }\n\n copyOfInHand[i] -= j;\n Set<List<String>> after = getCombination(copyOfInHand);\n Set<List<String>> newAfter = new HashSet<>();\n for (List<String> s : after) {\n s.add(currentSet);\n s.sort(Comparator.naturalOrder());\n newAfter.add(s);\n }\n result.addAll(newAfter);\n }\n }\n if (result.isEmpty()) result.add(new ArrayList<>());\n int min = result.stream().map(set -> set.size()).min(Comparator\n .naturalOrder()).get();\n Set<List<String>> minSets = result.stream().filter(set -> set.size() == min)\n .collect(Collectors\n .toSet());\n// combinationCache.put(inHand, minSets);\n return minSets;\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public int[] productExceptSelf(int[] nums) {\n if(nums == null || nums.length == 0)\n return new int[] {};\n \n /* \n * nums = {1,2,3,4}\n * When this is done: When done in reverse:\n * result[0] = 1 result[0] = 2 * 3 * 4\n * result[1] = 1 result[1] = 3 * 4\n * result[2] = 1 * 2 result[2] = 4\n * result[3] = 1 * 2 * 3 result[3] = 1\n * \n * When the results are combined, you get the product without itself.\n */\n int[] result = new int[nums.length];\n // Get product left of i\n for(int i = 0, prd = 1; i < nums.length; i++) {\n result[i] = prd;\n prd *= nums[i];\n }\n // Get the product right of i\n for(int i = nums.length-1, prd = 1; i >= 0; i--) {\n result[i] *= prd;\n prd *= nums[i];\n }\n return result;\n }", "public static void main(String[] args) {\n\n String expresson = \"1+((2+3)*40)-5\";\n List<String> strings = toInffixExpresion(expresson);\n System.out.println(strings.toString());\n\n List<String> parse = parseSuffix(strings);\n System.out.println(parse);\n }", "public List<List<String>> suggestedProducts(String[] products, String searchWord) {\n List<List<String>> result = new ArrayList<>();\n \n Trie trie = new Trie();\n \n for(String product : products){\n trie.addToTrie(product);\n }\n int n = searchWord.length();\n for(int i =1;i<=n;i++){\n String word = searchWord.substring(0,i);\n List<String> list = new ArrayList<String>();\n \n trie.getSearchList(word,list,3);\n \n if(list.size()>3){\n List<String> temp = list.subList(0,3);\n result.add( temp);\n }else{\n result.add( list);\n }\n \n }\n \n return result;\n }", "public static int[] getProductArray(int[] arr, int[] leftElementsProductsArr, int[] rightElementsProductsArr) {\n\t\tint[] output = new int[arr.length];\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tint leftElement = i > 0 ? leftElementsProductsArr[i-1] : 1;\n\t\t\tint rightElement = i < arr.length-1 ? rightElementsProductsArr[i+1] : 1;\n\t\t\t\n\t\t\tint product = leftElement * rightElement;\n\t\t\toutput[i] = product;\n\t\t}\n\t\treturn output;\n\t}", "public List<Integer> diffWaysToCompute(String input) {\n List<Integer> result=new ArrayList<>();\n if(input==null||input.length()==0) return result;\n List<String> ops=new ArrayList<>();\n for(int i=0; i<input.length(); i++){\n int j=i;\n while(j<input.length()&&Character.isDigit(input.charAt(j)))\n j++;\n ops.add(input.substring(i, j));\n if(j!=input.length()) ops.add(input.substring(j, j+1));\n i=j;\n }\n int N=(ops.size()+1)/2; //num of integers\n ArrayList<Integer>[][] dp=(ArrayList<Integer>[][]) new ArrayList[N][N];\n for(int d=0; d<N; d++){\n if(d==0){\n for(int i=0; i<N; i++){\n dp[i][i]=new ArrayList<>();\n dp[i][i].add(Integer.valueOf(ops.get(i*2)));\n }\n continue;\n }\n for(int i=0; i<N-d; i++){\n dp[i][i+d]=new ArrayList<>();\n for(int j=i; j<i+d; j++){\n ArrayList<Integer> left=dp[i][j], right=dp[j+1][i+d];\n String operator=ops.get(j*2+1);\n for(int leftNum:left)\n for(int rightNum:right){\n if(operator.equals(\"+\"))\n dp[i][i+d].add(leftNum+rightNum);\n else if(operator.equals(\"-\"))\n dp[i][i+d].add(leftNum-rightNum);\n else\n dp[i][i+d].add(leftNum*rightNum);\n }\n }\n }\n }\n return dp[0][N-1];\n}", "public static long[] productFib(long prod) {\n int maxLength = 55;\n long[] fib = new long[maxLength];\n fib[0] = 0;\n fib[1] = 1;\n for (int i = 2; i < fib.length; i++) {\n fib[i] = fib[i - 1] + fib[i - 2];\n }\n\n\n for (int i = 0; i < fib.length - 1; i++) {\n if (prod == fib[i] * fib[i + 1]) {\n return new long[]{fib[i], fib[i + 1], 1};\n }\n }\n\n for (int i = 1; i < fib.length - 1; i++) {\n if (fib[i - 1] * fib[i] < prod && prod < fib[i] * fib[i + 1]) {\n return new long[]{fib[i], fib[i + 1], 0};\n }\n }\n\n return null;\n\n }", "static String arithmeticExpressions(int[] arr) {\n String result = \"\";\n String[] operation = {\"+\", \"-\", \"*\"};\n boolean done = false;\n Map<Integer, String> outputToExpression = new HashMap<>();\n outputToExpression.put(arr[0], String.valueOf(arr[0]));\n for(int i = 1; i < arr.length; i++) {\n Map<Integer, String> tempOutputToExpression = new HashMap<>();\n int currentInteger = arr[i];\n final Set<Map.Entry<Integer, String>> entry2 = outputToExpression.entrySet();\n for(int entry : outputToExpression.keySet()) {\n for(int k = 0; k < operation.length; k++) {\n int tempOutput = entry;\n if(operation[k].equals(\"+\")) {\n tempOutput = tempOutput + currentInteger;\n tempOutputToExpression.put(tempOutput, outputToExpression.get(entry) + \"+\" + currentInteger);\n }\n if(operation[k].equals(\"-\")) {\n tempOutput = tempOutput - currentInteger;\n tempOutputToExpression.put(tempOutput, outputToExpression.get(entry) + \"-\" + currentInteger);\n }\n if(operation[k].equals(\"*\")) {\n tempOutput = (tempOutput * currentInteger) % 101;\n tempOutputToExpression.put(tempOutput, outputToExpression.get(entry) + \"*\" + currentInteger);\n }\n if(tempOutput % 101 == 0) {\n result = tempOutputToExpression.get(tempOutput);\n for(int j = i + 1; j < arr.length; j++) {\n result += \"*\" + arr[j];\n }\n done = true;\n }\n if(done) break;\n }\n if(done) break;\n }\n if(done) break;\n outputToExpression = tempOutputToExpression;\n }\n\n\n return result;\n }", "public int[] solution(int N, int[] P, int[] Q) {\n int[] primes = new int[N + 1];\n int[] prefixSum = new int[N + 1];\n\n for (int i = 2; i * i < N+1; i++) {\n if (primes[i] == 0) {\n int k = i + i;\n for (; k < N+1; k+=i) {\n if (primes[k] == 0) {\n primes[k] = i;\n }\n }\n }\n }\n for (int i = 4; i < N+1; i++) {\n if (primes[i] != 0 && i % primes[i] == 0 && primes[i/primes[i]] == 0) {\n prefixSum[i] = prefixSum[i - 1] + 1;\n } else {\n prefixSum[i] = prefixSum[i - 1];\n }\n }\n\n\n int[] retVal = new int[P.length];\n for (int j = 0; j < P.length; j++) {\n retVal[j] = prefixSum[Q[j]] - prefixSum[P[j] - 1];\n }\n return retVal;\n }", "public static void main(String[] args) {\n\t\tProductofArrayExceptSelf slt = new ProductofArrayExceptSelf();\n\t\tint[] nums ={1,2,3,4};\n\t\tint[] res = slt.productExceptSelf(nums);\n\t\tfor(int i=0; i<res.length;i++){\n\t\tSystem.out.print(res[i]+\",\");\n\t\t}\n\t}", "private static void variationsFromFirstIndex(Set<String> combinations, String[] input, String sufix, int index, int length) {\n if (index == length) {\n combinations.add(sufix);\n return;\n }\n\n // One by one add all strings from input and recursively call for length equals to length-1\n for (int i = 0; i < input.length; ++i) {\n\n // Next string of input added\n String newPrefix = input[i] + sufix;\n\n // length is decreased, because we have added a new string\n variationsFromFirstIndex(combinations, input, newPrefix, index + 1, length);\n }\n }", "public static int[] productExceptSelf(int[] nums) {\n if(nums==null || nums.length == 0)\n \t throw new IllegalArgumentException(\"Input array is either null or empty !!\");\n int N = nums.length;\n\t int[] result = new int}N];\n result}0] = 1;\n for(int l=1;l<N;l++) {\n \t if( nums}l-1]==0)\n \t\t nums}l-1] =1;\n \t result}l] = result}l-1] * nums}l-1];\n }", "static int[] modifiedArrayWithDivision(int[] original) {\n\t\tint[] newArr = new int[original.length];\n\t\tint totalProduct = 1;\n\t\t\n\t\t// Get the product of all numbers in array\n\t\tfor (int i = 0; i < original.length; i++) {\n\t\t\ttotalProduct *= original[i];\n\t\t}\n\t\t\n\t\t// Divide product by int at index to determine final array\n\t\tfor (int i = 0; i < newArr.length; i++) {\n\t\t\tnewArr[i] = totalProduct / original[i];\n\t\t}\n\t\t\n\t\treturn newArr;\n\t}", "public static void main(String[] args) {\n\r\n\t\tint[] a = {23,12,45,98,54};\r\n\t\t\r\n\t\tint [] result = new int [6]; //{54,98,45,12,23}\r\n\t\t\r\n\t\tint [] b = new int[6];\r\n\t\r\n\t\t\r\n\t\tfor(int i =0; i<a.length; i++) {\r\n\t\t\tresult[5 - i] = a[i];\r\n\t\t}\r\n\t\tfor(int i : result) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t\t\r\n\t\t//a 배열과 b배열의 값은 index 해당하는 값을 더하고 그 결과가 3의 배수이면 result 의 \r\n\t\t//해당 index에 값을 5배 하여 저장하고 그렇지 않은 index에는 10을 저장함 \r\n\t\t\r\n\t\tfor (int i=0; i<6; i++) {\r\n\t\t\tif((a[i] + b[i])%3 ==0)\r\n\t\t\t{\r\n\t\t\t\tresult[i] = a[i] + b[i]*5;\r\n\t\t\t}\r\n\t\t\telse result[i] = 10;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "static int[] modifiedArrayWithoutDivision(int[] original) {\n\t\tint[] newArr = new int[original.length];\n\t\tint tempProduct = 1;\n\t\t\n\t\t// For each index in new array\n\t\tfor (int i = 0; i < newArr.length; i++) {\n\t\t\t// For each int in original array\n\t\t\tfor (int j = 0; j < original.length; j++) {\n\t\t\t\t// If not the current index, multiply number by tempProduct\n\t\t\t\tif (j != i) {\n\t\t\t\t\ttempProduct *= original[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewArr[i] = tempProduct; // Store product in current array index\n\t\t\ttempProduct = 1; // Reset product\n\t\t}\n\t\treturn newArr;\n\t}", "private static String[] calculateAllMultiplicationsAndDivisions(String[] formulaArray){\n Integer operatorPosition = getMultiplicationOrDivisionPosition(formulaArray);\n while(operatorPosition!=-1){\n try {\n formulaArray = calculateMultiplicationOrDivision(formulaArray, operatorPosition);\n }catch(Exception e){\n System.err.println(e);\n }\n operatorPosition= getMultiplicationOrDivisionPosition(formulaArray);\n }\n return formulaArray;\n\n }", "public int[] productExceptSelf(int[] nums) {\n\t\tint[] res = new int[nums.length];\n\t\tres[0] = 1;\n\t\tfor (int i = 1; i < nums.length; i++) {\n\t\t\tres[i] = res[i - 1] * nums[i - 1];\n\t\t}\n\t\tint right = 1;\n\t\tfor (int i = nums.length - 1; i >= 0; i--) {\n\t\t\tres[i] *= right;\n\t\t\tright *= nums[i];\n\t\t}\n\t\treturn res;\n\t}", "public static void main(String[] args) {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tdouble a=0;\r\n\t\t double b=2;\r\n\t\t\t double n=4;\r\n\t\t\t double s;\r\n\r\n\t\t\tfor(int i=0; i<=n-1;i++) {\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t s = a + Math.pow(2, i)*b;\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(s);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int j=0;j<=n-1;j++)\r\n\t\t\t{\r\n\t\t\t\tint arr\r\n\t\t\t}\r\n\t\t\t\r\n\t}", "public static String produceAnswer(String input) { \r\n \tString[] array = input.split(\" \");\t//create an array that will store the 3 split string outputs(split on spaces)\t\r\n String firstOperand = array[0];\t\t//create a variable that will store the firstoperand\r\n String operator = array[1];\t\t//create a variable that will store the secondoperand\r\n String secondOperand = array[2];\t//create a variable that will store the thirdoperand\r\n int[] finalAnswer = new int [3];\t//create a new array that stores 3 values and will also serve to store the final answer\r\n \r\n int operand1Whole= findWhole(firstOperand);\t//use findwhole method to find the whole # and store in variable\r\n int operand1Num= findNumerator(firstOperand);\t//use findnumerator method to get the num of first frac\r\n int operand1Denom= findDenominator(firstOperand);\t//use finddenominator method to find denom of first frac\r\n int[] op1Fraction = toImproperFrac(operand1Whole, operand1Num, operand1Denom);\t//make a new int array to store \r\n \r\n int operand2Whole= findWhole(secondOperand);\t//use findwhole method to find the whole # and store in variable for the 2nd fraction\r\n int operand2Num= findNumerator(secondOperand);\t//use findnumerator method to find num of 2nd operand\r\n int operand2Denom= findDenominator(secondOperand);\t//use find denominator method to find the denom of the 2nd operand\r\n int[] op2Fraction = toImproperFrac(operand2Whole, operand2Num, operand2Denom);\t//make a new int array to store the improper frac of operand 2\r\n \r\n String result=\"\";\t//make a string variable that will be used when returning the result\r\n if(operator.equals(\"+\")) {\t//make a conditional that checks if the operator is +\r\n \taddingFrac(op1Fraction, op2Fraction, finalAnswer);\t//if it is use the addingfrac method with op1fraction, op2, and the final answer to get the sum\r\n \tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert the sum into a mixed number using the tomixednumber method; set = to result\r\n \t\r\n } else if(operator.equals(\"-\")) {\t//also test if operator is -\r\n \t\tsubFrac(op1Fraction, op2Fraction, finalAnswer);\t//if so use subfrac method to get the difference (use op1frac, op2 frac, and final answer\r\n \t\tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert diff into mixed number set = to result\r\n \t\t\r\n \t} else if(operator.equals(\"*\")) {\t//also test if operator is *\r\n \t\t\tmultiplyFrac(op1Fraction, op2Fraction, finalAnswer);\t//if so use multiply frac to get the product \r\n \t\t\tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert to mixed number set = to result\r\n \t\t\t\r\n \t\t} else if(operator.equals(\"/\")) {\t//also check if operator is /\r\n \t\t\t\tdivideFrac(op1Fraction, op2Fraction, finalAnswer);\t//if so use dividefrac method to get the quotient\r\n \t\t\t\tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert to mixed number set = to result\r\n \t\t\t\t\t\r\n \t\t\t}\r\n \treturn result;\t\t//return result\r\n \t\t}", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"Sunday Perfect Day to start coding\";\n\t\t\n\t\tString [] reverseStr = str.split(\" \");\n\t\t\n\t\t//1ST WAY\n\t\tSystem.out.println(Arrays.toString(reverseStr));\n\t\tString store [] = new String[reverseStr.length];\n\t\tfor (int i = 0; i < reverseStr.length; i++) {\n\t\t\tstore[i]=reverseStr[reverseStr.length-1-i];\n\t\t}\n\t\tSystem.out.print(Arrays.toString(store));\n\t\t//--------------------------------------\n\t\t//This one would only print words without Array type\n//\t\tfor (int i = 0; i < reverseStr.length; i++) {\n//\t\t\tSystem.out.print(reverseStr[reverseStr.length-1-i] + \" \");\n//\t\t}\n\t\t//--------------------------------------\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t//2ND WAY\n\t\tfor (int i = 0; i < reverseStr.length/2; i++) {\n\t\t\tString temp = reverseStr[i];\n\t\t\treverseStr[i]=reverseStr[reverseStr.length-1-i];\n\t\t\treverseStr[reverseStr.length-1-i]=temp;\n\t\t}\n\t\tSystem.out.println(Arrays.toString(reverseStr));\n\t\t\n\t\t//--------------------------------------\n\t\tString str1 = \"Sunday Perfect Day to start coding\";\n\t\t\n\t\tString [] reverseStr1 = str.split(\" \");\n\t\tString store1 = \"\";\n\t\tfor (int i = 0; i < reverseStr1.length; i++) {\n\t\t\tchar []c1 = reverseStr1[i].toCharArray();\n\t\t\tfor (int j = 0; j < c1.length/2; j++) {\n\t\t\t\tchar temp = c1[j];\n\t\t\t\tc1[j]=c1[c1.length-1-j];\n\t\t\t\tc1[c1.length-1-j]=temp;\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(Arrays.toString(c1));\n\t\t\tString reverse = new String(c1);\n\t\t\tstore1+=reverse+\" \";\n\t\t}\n\t\t\n\t\tSystem.out.println(store1);\n\t\tString [] splt2 = store1.split(\" \");\n\t\tSystem.out.println(Arrays.toString(splt2));\n\t\t\n\t\t\n\t\t\n\t\t//--------------------------------------\n\t\t//REVERSE\n//\t\tString []fruit = {\"Apple\"};\n//\t\tString fruit2 = \"\";\n//\t\tfor (int i = 1; i <= fruit[0].length(); i++) {\n//\t\t\tfruit2+=\"\"+fruit[0].charAt(fruit[0].length()-i);\n//\t\t\t\n//\t\t}\n//\t\tSystem.out.print(fruit2);\n//\t\tString []fruit3 = {fruit2};\n//\t\t\n//\t\tSystem.out.println();\n//\t\t\n//\t\tSystem.out.println(Arrays.toString(fruit3));\n//\t\t\n\t\t//--------------------------------------\n\t\t\n\n\t\t\n\t\t\n\t}", "private static void backTrack(String num, long target, int start, long sum, long subSum,\n char[] exp, int expLen, List<String> result) {\n if (start >= num.length()) {\n if ((sum + subSum) == target) {\n result.add(new String(exp, 0, expLen));\n }\n return;\n }\n long curNum = 0;\n int expId = (start == 0) ? expLen : expLen + 1;\n for (int i = start; i < num.length(); ++i) {\n curNum = 10 * curNum + (int)(num.charAt(i) - '0');\n exp[expId++] = num.charAt(i);\n if (start == 0) {\n backTrack(num, target, i+1, sum + subSum, curNum, exp, expId, result);\n } else {\n exp[expLen] = '+';\n backTrack(num, target, i+1, sum + subSum, curNum, exp, expId, result);\n exp[expLen] = '-';\n backTrack(num, target, i+1, sum + subSum, -curNum, exp, expId, result);\n exp[expLen] = '*';\n backTrack(num, target, i+1, sum, subSum * curNum, exp, expId, result);\n }\n if (i == start && num.charAt(i) == '0') {\n break;\n }\n }\n }", "public static int[] rightElementsProducts(int[] arr) {\n\t\tint[] rightElementsProductsArr = new int[arr.length];\n\t\tint product = 1;\n\t\tfor(int i = arr.length-1; i >=0; i--) {\n\t\t\tproduct = product * arr[i];\n\t\t\trightElementsProductsArr[i] = product;\n\t\t}\n\t\treturn rightElementsProductsArr;\n\t}", "public static void getPerms(HashMap<Character,Integer> freqMap,String prefix,int length,ArrayList<String> result) {\n if(length==0) {\n result.add(prefix);\n return;\n }\n for(Character c:freqMap.keySet()){\n Integer count= freqMap.get(c);\n if(count>0){\n freqMap.put(c,count-1);\n getPerms(freqMap,prefix+c,length-1,result);\n freqMap.put(c,count);\n }\n\n }\n }", "private static String[] calculateAllAdditionsAndSubtractions(String[] formulaArray){\n Integer operatorPosition = getAdditionOrSubtractionPosition(formulaArray);\n while(operatorPosition!=-1){\n try {\n formulaArray = calculateAdditionOrSubtraction(formulaArray, operatorPosition);\n }catch(Exception e){\n System.err.println(e);\n }\n operatorPosition= getAdditionOrSubtractionPosition(formulaArray);\n }\n return formulaArray;\n\n }", "static void updateArray(int arr[], int N) { \n\t\t\t// convert array into prefix sum array \n\t\tfor (int i = 1; i < N; i++) \n\t\t\tarr[i] += arr[i - 1]; \n\t}", "public static void main (String args []) {\n\r\n String str = \"\\\"क\\\", \\\"का\\\", \\\"कि\\\", \\\"की\\\", \\\"कु\\\", \\\"कू\\\", \\\"के\\\", \\\"कै\\\", \\\"को\\\", \\\"कौ\\\", \\\"कं\\\", \\\"क:\\\"\" ;\r\n String strEng = \"\\\"ka\\\", \\\"kā\\\", \\\"ki\\\", \\\"kī\\\", \\\"ku\\\", \\\"kū\\\", \\\"kē\\\", \\\"kai\\\", \\\"ko\\\", \\\"kau\\\", \\\"kṁ\\\", \\\"ka:\\\"\" ;\r\n\r\n String additionalConsonants = \"\\\"क़\\\", \\\"क़ा\\\", \\\"क़ि\\\", \\\"क़ी\\\", \\\"क़ु\\\", \\\"क़ू\\\", \\\"क़े\\\", \\\"क़ै\\\", \\\"क़ो\\\", \\\"क़ौ\\\", \\\"क़ं\\\", \\\"क़:\\\"\"; \r\n String additionalConsonantsEng = \"\\\"qa\\\", \\\"qā\\\", \\\"qi\\\", \\\"qī\\\", \\\"qu\\\", \\\"qū\\\", \\\"qē\\\", \\\"qai\\\", \\\"qo\\\", \\\"qau\\\", \\\"qṁ\\\", \\\"qa:\\\"\" ;\r\n\r\n //String str = \"क, का, कि, की, कु, कू, के, कै, को, कौ, कं, क:\" ;\r\n \r\n \r\n \r\n //generateNP(str);\r\n //generateEN(strEng);\r\n //System.out.println();\r\n generateNPAdditionalConsonants(additionalConsonants);\r\n generateENAdditionalConsonants(additionalConsonantsEng);\r\n\r\n\r\n\r\n }", "int product(int[] nums) {\n int total = 1;\n for (int n: nums) {\n total = total * n;\n }\n return total; \n }", "static String stringMultiplier( String word , int multiplier) {\n\t\tString largeWord = \"\"; \n\t\tfor (int i = 1; i <= multiplier; i++ ) {\n\t\t\tlargeWord += (word + \" \"); \n\t\t}\n\t\treturn largeWord;\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "private long getSuffixCValue(int sufIndex){\n long result = 0;\n for(int index = sufIndex; index<number;index++){\n result = result^array[index];\n }\n return result;\n }", "public static void main(String[] args) {\n int arr1[][] = {{1,89,75},{56,20,15},{63,02,30}};\n int arr2[][] = {{48,8,02},{78,280,1895},{3,0562,390}};\n //int arr2[][] = {{40,50,60},{8,52,82},{88,90,02}};\n //int arr2[][] = {{48,8,02},{78,280,1895},{3,0562,390}};\n\n int arrSum[][] = new int[3][3];\n int arrSub[][] = new int[3][3];\n int arrMult[][] = new int[3][3];\n\n System.out.println(\"array1\");\n for(int i = 0; i<arr1.length; i++){\n for(int j=0; j<arr1.length; j++){\n System.out.print(arr1[i][j] + \" \");\n }\n System.out.println();\n }\n System.out.println();\n\n\n System.out.println(\"array2\");\n for(int i = 0; i<arr1.length; i++){\n for(int j=0; j<arr1.length; j++){\n System.out.print(arr2[i][j] + \" \");\n }\n System.out.println();\n }\n\n for(int i = 0; i < arr1.length; i++){\n for(int j = 0; j < arr1.length; j++){\n arrSum[i][j] = arr1[i][j]+arr2[i][j];\n arrSub[i][j] = arr1[i][j]-arr2[i][j];\n //arrMult[i][j] = arr1[i][j]*arr2[i][j];\n }\n System.out.println();\n }\n for(int i = 0; i <arr2.length;i++){\n for(int j = 0; j<arr2.length;j++){\n arrMult[i][j] = 0;\n for(int k =0; k<3;k++){\n arrMult[i][j] += arr1[i][k]*arr2[k][j];\n }\n }\n }\n System.out.println();\n System.out.println(\"matrix addition ...\");\n for(int i = 0; i<arr1.length; i++){\n for(int j=0; j<arr1.length; j++){\n System.out.print(arrSum[i][j] + \" \");\n }\n System.out.println();\n }\n System.out.println();\n\n\n System.out.println(\"matrix subtraction ...\");\n for(int i = 0; i<arr1.length; i++){\n for(int j=0; j<arr1.length; j++){\n System.out.print(arrSub[i][j] + \" \");\n }\n System.out.println();\n }\n System.out.println();\n\n\n\n System.out.println(\"matrix multiplication ...\");\n for(int i = 0; i<arr1.length; i++){\n for(int j=0; j<arr1.length; j++){\n System.out.print(arrMult[i][j] + \" \");\n }\n System.out.println();\n }\n System.out.println();\n\n\n \n }", "public String[] getTOHSolution(int size,String start,String aux,String end,String result[]){\n\t\tif(size<=0){\n\t\t\tSystem.out.println(\"Please Enter a Valid Number\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//base case \n\t\tif(size==1){\n\t\t\tresult[i++]=start+\"-->\"+end;\n\t\t\t\n\t\t}\n\t\t//recurring case\n\t\telse{\n\t\t\tgetTOHSolution(size-1,start,end,aux,result);\n\t\t\tresult[i++]=start+\"-->\"+end;\n\t\t\tgetTOHSolution(size-1,aux,start,end,result);\n\t\t}\n\t\treturn result;\n\t}", "private int getResult() {\n ArrayList<Character> operanzi = new ArrayList<Character>();\n ArrayList<Character> operatori = new ArrayList<Character>();\n for(int i = 1; i <= n; i++){\n // System.out.println(i);\n if ((expr[i] == 'T' ) || (expr[i] == 'F'))\n operanzi.add(expr[i]);\n else \n operatori.add(expr[i]);\n }\n System.out.println(operanzi.get(0));\n int n1 = operanzi.size();\n System.out.println(n1);\n long [][] T = new long[n1][n1];\n long [][] F = new long[n1][n1];\n\n for (int i = 0; i < operanzi.size(); i++) {\n \n if (operanzi.get(i) == 'T') {\n T[i][i] = 1;\n F[i][i] = 0;\n } else if (operanzi.get(i) == 'F') {\n T[i][i] = 0;\n F[i][i] = 1;\n }\n }\n long aux=0;\n for (int l=1; l<n1; ++l) \n { \n for (int i=0, j=l; j<n1; ++i, ++j) \n { \n T[i][j] = F[i][j] = 0; \n for (int g=0; g<l; g++) \n { \n int k = i + g; \n long total_i_k = evaluate(T[i][k],F[i][k],'+'); \n long total_k_j = evaluate(T[k+1][j] , F[k+1][j],'+'); \n long total = evaluate(total_i_k,total_k_j,'*');\n if (operatori.get(k) == '&') \n { \n aux = evaluate(T[i][k],T[k+1][j],'*');\n T[i][j] = evaluate(T[i][j],aux,'+'); \n \n\n F[i][j] = evaluate( F[i][j],evaluate(total,aux,'-'),'+'); \n } \n if (operatori.get(k) == '|') \n { \n aux = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate(F[i][j],aux,'+'); \n \n T[i][j] =evaluate( T[i][j],evaluate(total, aux,'-'),'+'); \n } \n if (operatori.get(k) == '^') \n { \n aux = evaluate(F[i][k],T[k+1][j],'*');\n long aux1= evaluate(T[i][k],F[k+1][j],'*');\n T[i][j] = evaluate( T[i][j],evaluate( aux , aux1,'+'),'+'); \n aux = evaluate(T[i][k],T[k+1][j],'*');\n aux1 = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate( F[i][j],evaluate(aux,aux1,'+'),'+');\n } \n } \n } \n } \n return (int)T[0][n1-1]; \n }", "private void helper(String num, StringBuilder resBld, int s, long target, long factor, List<String> res) {\n int len = num.length(), preLen = resBld.length();\n // iterate over all possible ends of first number\n for(int i = s; i <= len - 2; i ++) {\n // Note: type: avoid leading zero in the expression\n if(i > s && num.charAt(s) == '0') break;\n long val = Long.parseLong(num.substring(s, i + 1));\n resBld.append(num.charAt(i));\n \n resBld.append('*');\n helper(num, resBld, i + 1, target, factor * val, res);\n resBld.deleteCharAt(resBld.length() - 1); \n\n // Note: '-' only takes effect on the first number, so we treat it as a -1 factor \n // to the first number\n resBld.append('-');\n helper(num, resBld, i + 1, target - factor * val, -1, res);\n resBld.deleteCharAt(resBld.length() - 1); \n \n resBld.append('+');\n helper(num, resBld, i + 1, target - factor * val, 1, res);\n resBld.deleteCharAt(resBld.length() - 1);\n }\n // NOTE: type: conservative ending\n // avoid s exceeds length of num in the following iterations\n resBld.append(num.charAt(len - 1));\n // avoid leading zero\n if((num.charAt(s) != '0' || s == len - 1) && factor * Long.parseLong(num.substring(s, len)) == target)\n res.add(resBld.toString());\n resBld.setLength(preLen);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint input1 = sc.nextInt(); //input 값 입력\n\t\tint length1 = (int)(Math.log10(input1)+1); // input값 자릿수 저장\n\t\tint input2 = sc.nextInt();\n\t\tint length2 = (int)(Math.log10(input2)+1);\n\t\t\n\t\tString trans = String.valueOf(input2); //두번째 값 string형 변환\n\t\t\n\t\tchar [] arr = trans.toCharArray(); // 변환된 String char배열 변환\n\t\tint [] arr2 = new int[arr.length]; // arr의 값을 int형을 바꿀 배열\n\t\tint [] result = new int[arr2.length];//arr2의 값을 첫번째 input값과 계산하여 저장\n\n\t\t\n\t\tif(length1 < 3 || length1 > 3) { //자릿수 검사\n\t\t\tSystem.out.println(\"입력값의 자릿수는 3자리\");\n\t\t}else if(length2 <3 || length2 > 3) {\n\t\t\tSystem.out.println(\"입력값의 자릿수는 3자리\");\n\t\t}\n\t\tfor(int i = arr.length-1 ; i <= 0 ; i--) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0 ; i < arr2.length ; i++) { //int형 변환\n\t\t\tarr2[i] = arr[i] - '0';\n\t\t}\n\t\t\n\t\t\n\t\tint count = 100, sum = 0;\n\t\tfor(int i = 0 ; i < result.length ; i++) {\n\t\t\tresult[i] = input1*arr2[i]; //계산결과 저장\n\t\t\tsum += result[i] * count; // 계산결과 저장\n\t\t\tcount /= 10;\n\t\t}\n\t\t\n\t\tfor(int i = result.length-1 ; i >= 0 ; i--) { // 출력\n\t\t\tSystem.out.println(result[i]);\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t\t\n\t\t\n\t}", "private static BigInteger multiplyKaratsuba(BigInteger x, BigInteger y) {\n int xlen = x.mag.length;\n int ylen = y.mag.length;\n\n // The number of ints in each half of the number.\n int half = (Math.max(xlen, ylen)+1) / 2;\n\n // xl and yl are the lower halves of x and y respectively,\n // xh and yh are the upper halves.\n BigInteger xl = x.getLower(half);\n BigInteger xh = x.getUpper(half);\n BigInteger yl = y.getLower(half);\n BigInteger yh = y.getUpper(half);\n\n BigInteger p1 = xh.multiply(yh); // p1 = xh*yh\n BigInteger p2 = xl.multiply(yl); // p2 = xl*yl\n\n // p3=(xh+xl)*(yh+yl)\n BigInteger p3 = xh.add(xl).multiply(yh.add(yl));\n\n // result = p1 * 2^(32*2*half) + (p3 - p1 - p2) * 2^(32*half) + p2\n BigInteger result = p1.shiftLeft(32*half).add(p3.subtract(p1).subtract(p2)).shiftLeft(32*half).add(p2);\n\n if (x.signum != y.signum) {\n return result.negate();\n } else {\n return result;\n }\n }", "public Term[] allMatches(String prefix)\n {\n //slice out the terms with given prefix\n Comparator<Term> c_pf = Term.byPrefixOrder(prefix.length());\n int first = BinarySearchDeluxe.firstIndexOf(terms,\n new Term(prefix, 0),\n c_pf);\n int last = BinarySearchDeluxe.lastIndexOf(terms,\n new Term(prefix, 0),\n c_pf);\n\n //make a copy of sliced terms\n\n Term[] temp_term = new Term[last-first+1];\n for(int i=first; i<=last;i++)\n {\n temp_term[i-first] = terms[i];\n }\n\n //order them based on weight\n Comparator<Term> c_rw = Term.byReverseWeightOrder();\n Arrays.sort(temp_term, c_rw);\n\n return temp_term;\n\n }", "private int[] multiplyToLen(int[] x, int xlen, int[] y, int ylen, int[] z) {\n int xstart = xlen - 1;\n int ystart = ylen - 1;\n\n if (z == null || z.length < (xlen+ ylen))\n z = new int[xlen+ylen];\n\n long carry = 0;\n for (int j=ystart, k=ystart+1+xstart; j >= 0; j--, k--) {\n long product = (y[j] & LONG_MASK) *\n (x[xstart] & LONG_MASK) + carry;\n z[k] = (int)product;\n carry = product >>> 32;\n }\n z[xstart] = (int)carry;\n\n for (int i = xstart-1; i >= 0; i--) {\n carry = 0;\n for (int j=ystart, k=ystart+1+i; j >= 0; j--, k--) {\n long product = (y[j] & LONG_MASK) *\n (x[i] & LONG_MASK) +\n (z[k] & LONG_MASK) + carry;\n z[k] = (int)product;\n carry = product >>> 32;\n }\n z[i] = (int)carry;\n }\n return z;\n }", "void find(String digits) {\n Map<Character, char[]> map = buildMap();\n List<String> res = new ArrayList<String>();\n \n for (int i = 0; i < map.get(digits.charAt(0)).length; i++) {\n \tres.add(map.get(digits.charAt(0))[i] + \"\");\n }\n \n int size = res.size();\n for (int i = 1; i < digits.length(); i++) { // Every digit\n \tList<String> next = new ArrayList<String>();\n \tchar[] arr = map.get(digits.charAt(i));\n \t\n \tfor (int j = 0; j < size; j++) { // Every existing string prefix\n \t\tString prefix = res.get(j);\n \t\tfor (char c : arr) { // Every possible next char\n \t\t\tnext.add(prefix + c);\n \t\t}\n \t}\n \t\n \tres = next;\n }\n \n for (String s : res) {\n \tSystem.out.println(s);\n }\n }", "public String multiply(String num1, String num2) {\n\t int[] result=new int[num1.length()+num2.length()];\n\t int[] temp1=new int[num1.length()];\n\t int[] temp2=new int[num2.length()];\n\t for(int i=0;i<temp1.length;i++) {\n\t \ttemp1[i]=num1.charAt(i)-'0';\n\t }\n\t for(int i=0;i<temp2.length;i++){\n\t \ttemp2[i]=num2.charAt(i)-'0';\n\t }\n\t \n\t for(int j=temp1.length-1;j>=0;j--) {\n\t \tfor(int k=temp2.length-1;k>=0;k--) {\n\t \t\t result[j+k+1]+=temp1[j]*temp2[k];\n\t \t}\n\t }\n\t int carry=0;\n\t for(int i=result.length-1;i>=0;i--) {\n\t \t int temp=(result[i]+carry)%10;\n\t \t carry=(result[i]+carry)/10;\n\t \t result[i]=temp;\n\t }\n\t StringBuilder b1=new StringBuilder();\n\t for(int num:result) b1.append(num);\n\t while (b1.length() != 0 && b1.charAt(0) == '0') b1.deleteCharAt(0);\n return b1.length() == 0 ? \"0\" : b1.toString();\n\t \n }", "int LCSubStr(char X[], char Y[], int m, int n) \n {\n int LCStuff[][] = new int[m + 1][n + 1]; \n int result = 0; // To store length of the longest common substring \n \n // Following steps build LCSuff[m+1][n+1] in bottom up fashion \n for (int i = 0; i <= m; i++) \n { \n for (int j = 0; j <= n; j++) \n { \n if (i == 0 || j == 0) \n LCStuff[i][j] = 0; \n else if (X[i - 1] == Y[j - 1]) \n { \n LCStuff[i][j] = LCStuff[i - 1][j - 1] + 1; \n result = Integer.max(result, LCStuff[i][j]); \n } \n else\n LCStuff[i][j] = 0; \n } \n } \n return result; \n }", "public static void main(String[] args) {\n\r\n\t\tString input = \"21462675756\";\r\n\t\tSystem.out.println(createString(input));\r\n\t\tint a[] = { 1, 2, 3, 7, 5 };\r\n\t\tint b[] = {1, 4, 20, 3, 10, 5};\r\n\t\t// sortAndRemoveDuplicates(a);\r\n\t\t// shiftelements(a, 2);\r\n\r\n\t\tsubArrayWithGivenSum(a, 12);\r\n\t\tsubArrayWithGivenSum(b, 33);\r\n\r\n\t}", "public String generateFeaturesResult()\n\t{\n\t\tthis.removeDuplicateAffixes();\n\t\tArrayList<Affix> gPrefix = reverseAffixOrder(this.prefixes);\n\t\tArrayList<Affix> gInfix = reverseAffixOrder(this.infixes);\n\t\tArrayList<Affix> gSuffix = reverseAffixOrder(this.suffixes);\n\t\tAffixBreakdown ab \t\t = new AffixBreakdown();\n\t\tString rootWithInfix;\n\t\tString result\t \t\t = \"\";\n\n\n\n\t\tif( gInfix.size() > 0 || gInfix != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\trootWithInfix = this.infixedRootWord(word.getOriginalWord(),word.getRootWord(), gInfix.get(0).getAffix());\n\t\t\t} catch (Exception e) {\n\t\t\t\trootWithInfix = word.getRootWord();\n\t\t\t}\n\t\t} else {\n\t\t\trootWithInfix = word.getRootWord();\n\t\t}\n\n\n\t\tif( longestCanonicalPrefixLength() > 4 )\n\t\t{\n\t\t\tAffix longPrefix = longestCanonicalPrefix();\n\n\t\t\tresult = result + ab.convertPrefix( longPrefix.getAffix().toString() );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// cycle through all the prefixes first\n\t\t\tfor( int i = 0; i < this.prefixes.size(); i++)\n\t\t\t{\n\t\t\t\tresult = result + \"~\" + gPrefix.get(i).getAffix();\n\t\t\t}\n\t\t}\n\n\t\t// cycle through all the suffixes as the last\n\t\tfor( int i = 0; i < gSuffix.size(); i++)\n\t\t{\n\t\t\tresult = result + \"+\" + gSuffix.get(i).getAffix();\n\t\t}\n\t\treturn result;\n\t}", "private static BigInteger multiplyToomCook3(BigInteger a, BigInteger b) {\n int alen = a.mag.length;\n int blen = b.mag.length;\n\n int largest = Math.max(alen, blen);\n\n // k is the size (in ints) of the lower-order slices.\n int k = (largest+2)/3; // Equal to ceil(largest/3)\n\n // r is the size (in ints) of the highest-order slice.\n int r = largest - 2*k;\n\n // Obtain slices of the numbers. a2 and b2 are the most significant\n // bits of the numbers a and b, and a0 and b0 the least significant.\n BigInteger a0, a1, a2, b0, b1, b2;\n a2 = a.getToomSlice(k, r, 0, largest);\n a1 = a.getToomSlice(k, r, 1, largest);\n a0 = a.getToomSlice(k, r, 2, largest);\n b2 = b.getToomSlice(k, r, 0, largest);\n b1 = b.getToomSlice(k, r, 1, largest);\n b0 = b.getToomSlice(k, r, 2, largest);\n\n BigInteger v0, v1, v2, vm1, vinf, t1, t2, tm1, da1, db1;\n\n v0 = a0.multiply(b0);\n da1 = a2.add(a0);\n db1 = b2.add(b0);\n vm1 = da1.subtract(a1).multiply(db1.subtract(b1));\n da1 = da1.add(a1);\n db1 = db1.add(b1);\n v1 = da1.multiply(db1);\n v2 = da1.add(a2).shiftLeft(1).subtract(a0).multiply(\n db1.add(b2).shiftLeft(1).subtract(b0));\n vinf = a2.multiply(b2);\n\n // The algorithm requires two divisions by 2 and one by 3.\n // All divisions are known to be exact, that is, they do not produce\n // remainders, and all results are positive. The divisions by 2 are\n // implemented as right shifts which are relatively efficient, leaving\n // only an exact division by 3, which is done by a specialized\n // linear-time algorithm.\n t2 = v2.subtract(vm1).exactDivideBy3();\n tm1 = v1.subtract(vm1).shiftRight(1);\n t1 = v1.subtract(v0);\n t2 = t2.subtract(t1).shiftRight(1);\n t1 = t1.subtract(tm1).subtract(vinf);\n t2 = t2.subtract(vinf.shiftLeft(1));\n tm1 = tm1.subtract(t2);\n\n // Number of bits to shift left.\n int ss = k*32;\n\n BigInteger result = vinf.shiftLeft(ss).add(t2).shiftLeft(ss).add(t1).shiftLeft(ss).add(tm1).shiftLeft(ss).add(v0);\n\n if (a.signum != b.signum) {\n return result.negate();\n } else {\n return result;\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "private void calcProduct() {\n String numberVal = number.getText().toString();\n if (numberVal.isEmpty()) {\n numberVal = \"0\";\n }\n\n // divide the number by 2 w/o remainder\n int count = Integer.parseInt(numberVal) >> 1;\n\n // empirically calculated maximum number for even elements\n if (count > 30) {\n Toast.makeText(\n this,\n \"The given number is too large for product of even items!\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // array initialization\n int[] arr = new int[count];\n for (int i = 0; i < count; i++) {\n arr[i] = (i + 1) << 1;\n }\n\n // calculate product\n long product = 1;\n for (int i = 0; i < count; i++) {\n product *= arr[i];\n }\n\n result.setText(String.format(\"The product of even numbers is %d\", product)); ;\n }", "public List<String> letterCombinations(String digits) {\n HashSet<String> rnt = new HashSet<String>();\n \n for(int i=0 ;i<digits.length(); i++){\n char[] array = getChar(digits.charAt(i));\n HashSet<String> newSet = new HashSet<String>();\n for(int j=0; j<array.length; j++){\n for(String currs: rnt){\n newSet.add(currs+array[j]);\n }\n if(i==0){\n newSet.add(array[j]+\"\");\n }\n }\n \n rnt = newSet;\n }\n \n ArrayList<String> rntList = new ArrayList<String>();\n for(String currs: rnt){\n rntList.add(currs);\n }\n return rntList;\n }", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"aaabbbbbbddcmmm\";\n\t\tString[] arr1 = str.split(\"\");\n\t\t\n\t\tString last=\"\";\n\t\tint count = 1;\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tcount = 1;\n\t\t\t\n\t\t\tfor (int j = i+1; j < arr1.length; j++) {\n\t\t\t\tif(arr1[i].equals(arr1[j])) {\n\t\t\t\t\tcount++;\n\t\t\t\t\ti=j;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tlast += count + arr1[i];\n\t\t}\n\t\t\n\t\n\t\t//return last;\n\t\t\n\t\tSystem.out.println(last);\n\t}", "public String multiply(String s1, String s2) {\n assert s1 != null;\n assert s2 != null;\n int len1 = s1.length(), len2 = s2.length();\n int[] digits = new int[len1 + len2];\n //compute the products of every digit pair\n for (int i = 0; i < len1; i++) {\n for (int j = 0; j < len2; j++) {\n int d1 = s1.charAt(i) - '0';\n int d2 = s2.charAt(j) - '0';\n digits[i+j+1] += d1 * d2;\n }\n }\n StringBuilder sb = new StringBuilder();\n int carry = 0;\n //carry every digit over\n for (int p = len1+len2-1; p >= 0 ; p--) {\n int num = carry + digits[p];\n int stay = num % 10;\n carry = num / 10;\n digits[p] = stay;\n }\n //trim the leading zeros\n int begin = 0;\n while (begin < len1+len2-1 && digits[begin] == 0) {\n begin++;\n }\n for (int i = begin; i < len1+len2; i++) {\n sb.append(digits[i]);\n }\n return sb.toString();\n }", "public static int getProduct(int b, int n1, int n2){\n int r1=0,pow=1,res1=0,res=0,carry=0,sum=0;\n while(n1 !=0)\n {\n r1=n1%10;\n n1/=10;\n res1=multiply(r1,n2,b,pow);\n res=SumAnybase(res1,res,b);\n pow=pow*10;\n }\n return res;\n }", "public void tempArray() {\n for (int i = 0; i < newWord.length(); i++) {\n for (String c : keySetNewWord) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n int p = mapNewWord.get(c) + 1;\n mapNewWord.put(c, p);\n }\n }\n }\n }", "private static void mergetokens(String tk, String[] a, String[] b, StringBuilder answer) {\n\t\tint[] i = new int[1];\n\t\tint[] j = new int[1];\n\t\twhile(toToken(tk, a, b, i, j, answer)){\n\t\t\tif(i[0] == a.length - 1 && j[0] == b.length - 1){\n\t\t\t\tanswer.append(a[i[0]]);\n\t\t\t\tanswer.append(b[j[0]]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tString ntk = a[i[0]];\n\t\t\tString[] sa = getTokens(ntk, a, i);\n\t\t\tString[] sb = getTokens(ntk, b, j);\n\t\t\t\n\t\t\tif(sa.length == 0 && sb.length == 0){\n\t\t\t\tfor(; i[0] < a.length && a[i[0]] == ntk; i[0]++){\n\t\t\t\t\tanswer.append(a[i[0]]);\n\t\t\t\t}\n\t\t\t\tfor(; j[0] < b.length && b[j[0]] == ntk; j[0]++){\n\t\t\t\t\tanswer.append(b[i[0]]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmergetokens(ntk, sa, sb, answer);\n\t\t}\n\t}" ]
[ "0.72499084", "0.70892084", "0.6915315", "0.64215857", "0.6398129", "0.63890606", "0.63769627", "0.6353219", "0.6240823", "0.6146127", "0.60203505", "0.5995772", "0.59721214", "0.5924198", "0.58468103", "0.58380705", "0.58160114", "0.58153003", "0.5803609", "0.5792599", "0.57751423", "0.57715774", "0.57165956", "0.5686589", "0.5681613", "0.5665636", "0.56059146", "0.5595726", "0.55595595", "0.5547814", "0.551646", "0.550201", "0.5501201", "0.5488804", "0.5488592", "0.54727113", "0.54613006", "0.5454694", "0.54171026", "0.5404736", "0.5396625", "0.53837943", "0.5370507", "0.5368662", "0.5363864", "0.53433657", "0.5326069", "0.5323044", "0.53160715", "0.5310869", "0.53051734", "0.52984995", "0.5281634", "0.5262077", "0.52516425", "0.5245765", "0.5243896", "0.52235025", "0.52104926", "0.5209558", "0.51992446", "0.5194124", "0.51815015", "0.5174987", "0.51685846", "0.51638865", "0.51532006", "0.5146441", "0.51390016", "0.5131208", "0.51281726", "0.51260173", "0.5122837", "0.5120838", "0.51178867", "0.5113763", "0.5113761", "0.5106931", "0.51053685", "0.5102708", "0.5097557", "0.50972754", "0.5094448", "0.50939155", "0.5091204", "0.5089005", "0.50870955", "0.5085705", "0.50743204", "0.5073185", "0.506451", "0.50635743", "0.5061478", "0.5053225", "0.50527984", "0.50507385", "0.5049409", "0.5044773", "0.50392187", "0.50387746" ]
0.5803037
19
Enable raw json data storing to database.
@SuppressWarnings({"SleepWhileInLoop", "LoggerStringConcat"}) public static void main(String[] args) throws TwitterException, InterruptedException { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setJSONStoreEnabled(true); TwitterFactory twitterFactory = new TwitterFactory(cb.build()); // The factory instance is re-useable and thread safe. Twitter twitter = twitterFactory.getInstance(); // Set Twitter API keys. Properties twitterApiKeysProp = getProperties(Constants.AppConstants.TWITTER_PROP_FILE_NAME); AccessToken accessToken = new AccessToken( twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_KEY), twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.ACCESS_TOKEN_SECRET)); twitter.setOAuthConsumer( twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_KEY), twitterApiKeysProp.getProperty(Constants.TwitterAPIConstants.CONSUMER_SECRET)); twitter.setOAuthAccessToken(accessToken); // Connect Database Properties appProp = getProperties(Constants.AppConstants.APPLICATION_PROP_FILE_NAME); MongoClient mongo = new MongoClient( appProp.getProperty(Constants.AppConstants.HOST), Integer.parseInt(appProp.getProperty(Constants.AppConstants.PORT))); MongoDatabase db = mongo.getDatabase(appProp.getProperty(Constants.AppConstants.DATABASE)); MongoCollection<Document> collection = db.getCollection( appProp.getProperty(Constants.AppConstants.COLLECTION)); // Set query properties to pass it to Twitter Search API Query query = new Query(appProp.getProperty(Constants.AppConstants.QUERY)); query.setLang(Constants.AppConstants.LANG); query.setSince(appProp.getProperty(Constants.AppConstants.SINCE)); query.setUntil(appProp.getProperty(Constants.AppConstants.UNTIL)); Long maxId = Long.parseLong(appProp.getProperty(Constants.AppConstants.MAX_ID)) - 1; if (maxId > 0) { query.setMaxId(maxId); LOGGER.log(Level.INFO, "Max Id set: " + maxId); } LOGGER.log(Level.INFO, "Query: {0}", query.getQuery()); QueryResult result = twitter.search(query); // In one try, only limited number of tweets are retrieved. So // keep retrying until all tweets are received. while (!result.getTweets().isEmpty()) { Long minId = Long.MAX_VALUE; Document document; for (Status status : result.getTweets()) { document = Document.parse(TwitterObjectFactory.getRawJSON(status)); collection.insertOne(document); if (status.getId() < minId) { minId = status.getId(); } LOGGER.log(Level.INFO, "Id: " + status.getId()); } query.setMaxId(minId - 1); try { result = searchWithRetry(twitter, query); } catch (TwitterException ex) { LOGGER.log(Level.SEVERE, ex.getErrorMessage(), ex); LOGGER.log(Level.INFO, "Thread is sleeping for 15 minutes. " + "Application will retry to make an API call after 15 minutes."); Thread.sleep(15 * 60 * 1000); // sleep for 15 minutes result = searchWithRetry(twitter, query); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lite() {\n\t\t\r\n\t\tthis.setJson(\"[]\");\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public boolean insertjsonobject(ModelPerson person) {\n return false;\n }", "@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public boolean save(Object o) {\n if (o instanceof String) {\n\n JsonParser parser = new JsonParser();\n\n JsonElement jsonElement = null;\n String jsonString = (String) o;\n\n try{\n while(!jsonString.startsWith(\"{\")){\n jsonString = jsonString.substring(1, jsonString.length()-2);\n }\n\n jsonElement = parser.parse(jsonString);\n dbClient.save(jsonElement.getAsJsonObject());\n return true;\n\n }catch(Exception e){\n e.printStackTrace();\n return false;\n }\n\n }\n\n return false;\n }", "public JSONObject save();", "void storeEditorData(int userid,String name,Object bodyContent){\n dbConnection();\n try{\n PGobject editorData = new PGobject();\n editorData.setType(\"json\");\n editorData.setValue(bodyContent.toString());\n\n stmt = con.prepareStatement(\"INSERT INTO editorData(name,bodyContent,userid)VALUES(?,?,?)\");\n stmt.setString(1,name);\n stmt.setObject(2,editorData);\n stmt.setInt(3,userid);\n\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n \n }", "public boolean supportsJsonType() {\n return false;\n }", "void setSaveHandlerEnabled(boolean enabled);", "JsonObject raw();", "private JSON() {\n\t}", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n }", "public interface SavedDataInterface {\n void setAttributes (JSONObject jsonString) throws JSONException;\n Object getJSONObject();\n}", "@JsonSetter(\"persistent\")\r\n public void setPersistent (boolean value) { \r\n this.persistent = value;\r\n }", "public void save(String json, Map<String,Object> properties);", "@Override\n public PubSaveData buildPubSaveDataByJson(String json) {\n return null;\n }", "@Override\n public synchronized boolean configure(StaplerRequest req, JSONObject json) {\n this.client = null;\n this.listSecrets = null;\n this.transformations = null;\n\n req.bindJSON(this, json);\n save();\n return true;\n }", "public interface JStorable {\n\t/**\n\t * Return the Object as an JSONObject\n\t */\n\tpublic JSONObject save();\n\t/**\n\t * Load the Object from a JSONObject\n\t * @param obj\n\t * \t\tThe JSONObject\n\t */\n\tpublic void load(JSONObject obj);\n}", "private synchronized void zzlx() {\n try {\n JSONObject jSONObject = new JSONObject();\n jSONObject.put(\"castSessionId\", this.zzTp);\n jSONObject.put(\"playerTokenMap\", new JSONObject(this.zzTn));\n this.zztB.edit().putString(\"save_data\", jSONObject.toString()).commit();\n } catch (JSONException e) {\n zzQW.zzf(\"Error while saving data: %s\", e.getMessage());\n }\n return;\n }", "public void setRawObject(final ISerializer serializer, final JsonObject json) {\n this.serializer = serializer;\n rawObject = json;\n\n }", "private void storeJsonInObject(JsonObject dataJson, JsonObject metaJson,\n\t\t\t\t\t\t\t\t String oid) throws HarvesterException {\n\t\t// Does the object already exist?\n\t\tDigitalObject object = null;\n\t\ttry {\n\t\t\tobject = getStorage().getObject(oid);\n\t\t\tstoreJsonInPayload(dataJson, metaJson, object);\n\n\t\t} catch (StorageException ex) {\n\t\t\t// This is going to be brand new\n\t\t\ttry {\n\t\t\t\tobject = StorageUtils.getDigitalObject(getStorage(), oid);\n\t\t\t\tstoreJsonInPayload(dataJson, metaJson, object);\n\t\t\t} catch (StorageException ex2) {\n\t\t\t\tthrow new HarvesterException(\n\t\t\t\t\t\t\"Error creating new digital object: \", ex2);\n\t\t\t}\n\t\t}\n\n\t\t// Set the pending flag\n\t\tif (object != null) {\n\t\t\ttry {\n\t\t\t\tobject.getMetadata().setProperty(\"render-pending\", \"true\");\n\t\t\t\tobject.close();\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlog.error(\"Error setting 'render-pending' flag: \", ex);\n\t\t\t}\n\t\t}\n\t}", "private void storeJsonInObject(JsonObject dataJson, JsonObject metaJson,\r\n String oid) throws HarvesterException {\r\n // Does the object already exist?\r\n DigitalObject object = null;\r\n try {\r\n object = getStorage().getObject(oid);\r\n storeJsonInPayload(dataJson, metaJson, object);\r\n \r\n } catch (StorageException ex) {\r\n // This is going to be brand new\r\n try {\r\n object = StorageUtils.getDigitalObject(getStorage(), oid);\r\n storeJsonInPayload(dataJson, metaJson, object);\r\n } catch (StorageException ex2) {\r\n throw new HarvesterException(\r\n \"Error creating new digital object: \", ex2);\r\n }\r\n }\r\n \r\n // Set the pending flag\r\n if (object != null) {\r\n try {\r\n object.getMetadata().setProperty(\"render-pending\", \"true\");\r\n object.close();\r\n } catch (Exception ex) {\r\n log.error(\"Error setting 'render-pending' flag: \", ex);\r\n }\r\n }\r\n }", "void saveData() throws SerializerException;", "@Override\n public boolean insertjsonarray(List<ModelPerson> persons) {\n return false;\n }", "public void saveExtraData() {}", "@JsonIgnore\n\tpublic static WFSLayerPermissionsStore setJSON(String json)\n\t\t\tthrows IOException {\n\t\treturn TransportService.mapper.readValue(json,\n\t\t\t\tWFSLayerPermissionsStore.class);\n\t}", "@Override\n public boolean isMaybeStrJSON() {\n checkNotPolymorphicOrUnknown();\n return (flags & STR_JSON) != 0;\n }", "private DatasetJsonConversion() {}", "public void saveData() {\n throw new UnsupportedOperationException(\"Not yet supported\");\n }", "private void setBasketRepository() {\n ObjectMapper mapper = new ObjectMapper();\n TypeReference<List<Basket>> typeReference = new TypeReference<>() {\n };\n InputStream inputStream = TypeReference.class.getResourceAsStream(\"/json/data_demo.json\");\n try {\n List<Basket> invoices = mapper.readValue(inputStream, typeReference);\n basketRepository.saveAll(invoices);\n log.info(\"Saved in database successfully!\");\n } catch (IOException e) {\n log.error(\"Unable to save in database: {}\", e.getMessage());\n }\n }", "@Override\n public RavenJObject getAdditionalData() {\n return additionalData;\n }", "private void setupJsonAdapter(RestAdapter.Builder builder) {\n Gson gson = new GsonBuilder()\n .setExclusionStrategies(new ExclusionStrategy() {\n @Override\n public boolean shouldSkipField(FieldAttributes f) {\n return false;\n }\n\n @Override\n public boolean shouldSkipClass(Class<?> clazz) {\n return false;\n }\n })\n .excludeFieldsWithoutExposeAnnotation()\n .registerTypeAdapterFactory(new ItemTypeAdapterFactory())\n .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)\n .create();\n\n builder.setConverter(new GsonConverter(gson));\n }", "public Database(JsonObject data){\n this.obj = data;\n rest = (JsonArray) obj.get(\"restaurants\");\n /* TODO \nset the memebr variable declared above.*/\n }", "@Override\r\n\tpublic boolean supportsDb(String type) {\r\n \treturn true;\r\n }", "public boolean addData(String data){\r\n\r\n\t\t// the data parameter should be a json string with the following format:\r\n\t\t// \"Transmit ID\":\"Device ID\",\r\n \t\t//\t \"RSSI\":\"Decibels\",\r\n \t\t//\t \"Receive ID\":\"Device ID\"\r\n \t\t//\t \"GPS\":\"Location\",\r\n \t\t//\t \"IMU\":\"Orientation\",\r\n \t\t//\t \"Timestamp\":\"<UNIX time>\"\r\n \t\t//\tthis string will be parsed and its contents will be saved in the database \r\n \t\t\r\n\r\n\t}", "@Override\n public void setAdditionalData(RavenJObject additionalData) {\n this.additionalData = additionalData;\n }", "@JsonInclude(JsonInclude.Include.NON_NULL)\n\npublic interface LikesDAO {\n public Likes createLikes(String userid, String revid, Boolean likes) throws SQLException;\n public Likes getLikesById(String revid) throws SQLException;\n}", "private void saveData() {\n }", "void setDataFromDBContent() {\n\n }", "private boolean savingData(Track track){\n return sqLiteController.SAVE_TRACK_DATA(track);\n }", "void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}", "public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void saveValues() {\n \n }", "@Override\n public boolean save()\n {\n return false;\n }", "public abstract String toJson();", "@Override\r\n\tpublic void dataStore(Event event, String flag) {\n\t\tDocument doc = new Document();\r\n\t\tdoc.append(\"test\", new String(event.getBody()));\r\n\t\tmongoCollection.insertOne(doc);\r\n\t}", "private void setUserDataFromJson(JSONObject jsonObject) { \n\t\tlogger.debug(\"creating UserData Object from json file \" + fileName);\n\t\t/* \n\t\t * JSON Structure\n\t\t * {\n\t\t * \t\"objectStatus\":\"fail\",\n\t\t * \t\"domain\":\"null\",\n\t\t * \t\"customer\":\"null\",\n\t\t * \t\"sn_id\":\"CC\",\n\t\t * \t\"user_id\":\"9\",\n\t\t * \t\"userName\":\"Cortal_Consors\",\n\t\t * \t\"nickName\":\"Cortal_Consors\",\n\t\t * \t\"postingsCount\":\"0\",\n\t\t * \t\"favoritesCount\":\"0\",\n\t\t * \t\"friends\":\"0\",\n\t\t * \t\"follower\":\"0\",\n\t\t * \t\"userLang\":null,\n\t\t * \t\"listsAndGroupsCount\":\"0\",\n\t\t * \t\"geoLocation\":\"\"\n\t\t * }\n\t\t */\n\t\tif (jsonObject.get(\"domain\") != null) {\n\t\t\tlogger.trace(\" domain\\t\"+jsonObject.get(\"domain\").toString());\n\t\t\tuData.setDomain((String) jsonObject.get(\"domain\"));\n\t\t}\n\t\tif (jsonObject.get(\"customer\") != null) {\n\t\t\tlogger.trace(\" customer\\t\"+jsonObject.get(\"customer\").toString());\n\t\t\tuData.setCustomer((String) jsonObject.get(\"customer\"));\n\t\t}\n\t\tif (jsonObject.get(\"objectStatus\") != null) {\n\t\t\tlogger.trace(\" objectStatus\\t\"+jsonObject.get(\"objectStatus\").toString());\n\t\t\tuData.setObjectStatus((String) jsonObject.get(\"objectStatus\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"sn_id\") != null) {\n\t\t\tlogger.trace(\" sn_id\\t\"+jsonObject.get(\"sn_id\").toString());\n\t\t\tuData.setSnId((String) jsonObject.get(\"sn_id\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"id\") == null) {\n\t\t\tlogger.trace(\" user_id\\t\"+jsonObject.get(\"user_id\").toString());\n\t\t\tuData.setId((String) jsonObject.get(\"user_id\"));\n\t\t} else {\n\t\t\tlogger.trace(\" id\\t\"+jsonObject.get(\"id\").toString());\n\t\t\tuData.setId((String) jsonObject.get(\"id\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"userName\") != null) {\n\t\t\tlogger.trace(\" userName\\t\"+jsonObject.get(\"userName\").toString());\n\t\t\tuData.setUserName((String) jsonObject.get(\"userName\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"nickName\") != null) {\n\t\t\tlogger.trace(\" nickName\\t\"+jsonObject.get(\"nickName\").toString());\n\t\t\tuData.setScreenName((String) jsonObject.get(\"nickName\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"userLang\") != null) {\n\t\t\tlogger.trace(\" userLang\\t\"+jsonObject.get(\"userLang\").hashCode());\n\t\t\tuData.setLang((String) jsonObject.get(\"userLang\"));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"follower\") != null) {\n\t\t\tlogger.trace(\" follower\\t\"+Long.parseLong(jsonObject.get(\"follower\").toString()));\n\t\t\tuData.setFollowersCount(Long.parseLong(jsonObject.get(\"follower\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"friends\") != null) {\n\t\t\tlogger.trace(\" friends\\t\"+Long.parseLong(jsonObject.get(\"friends\").toString()));\n\t\t\tuData.setFriendsCount(Long.parseLong(jsonObject.get(\"friends\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"postingsCount\") != null) {\n\t\t\tlogger.trace(\" postingsCount\\t\"+Long.parseLong(jsonObject.get(\"postingsCount\").toString()));\n\t\t\tuData.setPostingsCount(Long.parseLong(jsonObject.get(\"postingsCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"favoritesCount\") != null) {\n\t\t\tlogger.trace(\" favoritesCount\\t\"+Long.parseLong(jsonObject.get(\"favoritesCount\").toString()));\n\t\t\tuData.setFavoritesCount(Long.parseLong(jsonObject.get(\"favoritesCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"listsAndGroupsCount\") != null) {\n\t\t\tlogger.trace(\" listsAndGroupsCount\\t\"+Long.parseLong(jsonObject.get(\"listsAndGroupsCount\").toString()));\n\t\t\tuData.setListsAndGroupsCount(Long.parseLong(jsonObject.get(\"listsAndGroupsCount\").toString()));\n\t\t}\n\t\t\n\t\tif (jsonObject.get(\"geoLocation\") != null) {\n\t\t\tlogger.trace(\" geoLocation\\t\"+jsonObject.get(\"geoLocation\"));\n\t\t\tuData.setGeoLocation((String) jsonObject.get(\"geoLocation\"));\n\t\t}\n\t}", "public JSONObject toJSON(boolean strict) {\n JSONObject data = new JSONObject()\n .put(\"_type\", \"TemplateDataSource\");\n this.forEach( (key, path) -> {\n data.put(key, path.toJSON());\n });\n return data;\n }", "@Override\n public void updateServiceJson(){\n synchronized (lockUpdateServiceJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Movies.json\")) {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"movies\", writer.toJsonTree(movieList));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "public boolean isData() {return true; }", "protected boolean initLocalData() {\n return true;\n }", "@Override\n\tpublic boolean isSanitizeKeys() {\n\t\treturn false;\n\t}", "public abstract Object toJson();", "@Override\n public void save() {\n \n }", "public static void storeJsonData(JSONObject json) throws JSONException{\n Iterator<String> keys = json.keys();\n while(keys.hasNext()){\n String key = keys.next();\n String val = json.getString(key);\n \n if(val != null){\n map.put(key,val);\n try {\n \t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(file,true));\n \t\t\tout.write(key + \" : \" + val);\n \t\t\tout.newLine();\n \t\t\tout.close();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n }\n }\n}", "@Override\r\n\t\tpublic Object setUserData(String key, Object data, UserDataHandler handler)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public int addOrUpdateInterface(JSONObject data);", "@Override\n\tprotected byte[] prepare_data() {\n\t\tbyte[] ret_byte = null;\n\t\tJSONObject json_object = new JSONObject();\n\t\ttry {\n\t\t\tjson_object.put(Jsonkey.string_transitionid_key, \"\");\n\t\t\tjson_object.put(Jsonkey.string_magicid_key, \"\");\n\t\t\tJSONObject json_content = new JSONObject();\n\t\t\tjson_object.put(Jsonkey.string_content_key, json_content);\n\t\t\tjson_content.put(Jsonkey.string_ctype_key, \"verify_login_request\");\n\t\t\tJSONObject json_cvalue = new JSONObject();\n\t\t\tjson_content.put(Jsonkey.string_cvalue_key, json_cvalue);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_name_key, user_name);\n\t\t\tjson_cvalue.put(Jsonkey.string_user_password_key, user_password);\n\t\t\t\n\t\t\tString json_string = json_object.toString();\n\t\t\tret_byte = json_string.getBytes();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn ret_byte;\n\t}", "@Override\n protected JsonUtil getJsonUtil() {\n return super.getJsonUtil();\n }", "@Override\n public void save()\n {\n \n }", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "public JSONObject addOrUpdateCustomDevice(JSONObject data);", "private boolean saveRate(TSDBData rateObj) {\n InfluxDBClient dbClient = new InfluxDBClient();\n\n ObjectMapper mapper = new ObjectMapper();\n String jsonData = null;\n boolean result;\n try {\n jsonData = mapper.writeValueAsString(rateObj);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n result = dbClient.saveData(jsonData);\n return result;\n }", "JsonNode updateData(String data);", "private void initialiseFromJson(){\n try {\n\t\t\t// The type adapter is only needed if you have a CharSequence in your model. If you're just using strings\n \t// you can just use Gson gson = new Gson();\n Gson gson = new GsonBuilder().registerTypeAdapter(CharSequence.class, new CharSequenceDeserializer()).create();\n Reader reader = new InputStreamReader(getAssets().open(VARIANTS_FILE));\n BaseVariants baseVariants = gson.fromJson(reader, BaseVariants.class);\n Neanderthal.initialise(this, baseVariants.variants, baseVariants.defaultVariant);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic Bundle saveData() {\n\t\t\n\t\treturn null;\n\t}", "@PostConstruct\n void insertData() {\n\t\ttry {\n\t\t\tinsertDataFromJsonToDb.insertIntoDatabase();\n\t\t\tlogger.info(\"The database is filled by data\");\n\n\t\t} catch (Throwable throwable) {\n\t\t\tthrowable.printStackTrace();\n\t\t}\n\t}", "public String getJson();", "static String getStringJsonEscaped(String str) {\n JsonStringEncoder e = JsonStringEncoder.getInstance();\n StringBuilder sb = new StringBuilder();\n e.quoteAsString(str, sb);\n return sb.toString();\n }", "private JSONHelper() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic String[] updateJsonProperties() {\n\t\treturn null;\r\n\t}", "void writeFile(PasswordDatabase passwordDatabase) throws JsonConversionException;", "public static void main(String[] args) throws IOException{ \n\t\tJsonReader reader = Json.createReader(new FileReader(\"testjson/abcde.json\")); \n\t\tJsonObject jsonob = reader.readObject();\n\t\tSystem.out.println(jsonob.toString());\n\t\tRowColStore parser= new RowColStore(10*1000*1000,\"testjson/abcde.layout\");\n\t\tint objid = 1;\n\t\tparser.insertObject(objid,jsonob,null);\n\t\tparser.insertObject(2,jsonob,null);\n\t\tparser.insertObject(3,jsonob,null);\n\t\t// populate the table \n\n\t\tSystem.out.println(\"get the result out \\n\");\n\t\t// objid, keystr,valstr,valnum,valbool - 5 bytes \n\t\t// read it out \n\t//\tparser.getObject(2);\n\t}", "public JsonField() {\n }", "protected void onBeforeStoreProperties() throws IOException {\n }", "@Override\n\tpublic void setObjectFromJSON(JSONObject j) throws JSONException{\n\t\tsetID(Integer.parseInt(j.getString(KEY_ID)));\n\t\tsetVehicleID(Integer.parseInt(j.getString(KEY_VEHICLE_IDVEHICLE)));\n\t\tsetItemID(Integer.parseInt(j.getString(KEY_ITEMS_IDITEMS)));\n\t\tsetReceiptID(Integer.parseInt(j.getString(KEY_RECEIPT_IDRECEIPT)));\n\t\tsetMileage(Integer.parseInt(j.getString(KEY_WORKMILEAGE)));\n\t\tsetNotes(j.getString(KEY_WORKNOTES));\n\t\t\n\t}", "public abstract void setCustomData(Object data);", "public abstract String toJsonString();", "public String toJsonData() {\n\t\treturn new Gson().toJson(this);\n\t}", "public interface JsonSerializable<Any> {\r\n\t/**\r\n\t * <p>Load object state from JSON</p>\r\n\t * @param parser to load state from. Can't be null\r\n\t * @throws SyntaxException on any JSON errors\r\n\t * @throws IOException on any I/O errors\r\n\t */\r\n\tvoid fromJson(JsonStaxParser parser) throws SyntaxException, IOException;\r\n\t\r\n\t/**\r\n\t * <p>Store object state into JSON</p>\r\n\t * @param printer printer to store state to. Can't be null\r\n\t * @throws PrintingException on any JSON errors\r\n\t * @throws IOException on any I/O errors\r\n\t */\r\n\tvoid toJson(JsonStaxPrinter printer) throws PrintingException, IOException;\r\n\t\r\n\t/**\r\n\t * <p>Assign inner content from other entity</p>\r\n\t * @param other other entity. Can't be null.\r\n\t */\r\n\tdefault void assignFrom(Any other) {}\r\n}", "@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}", "@Override\n public void readAdditionalSaveData(@Nonnull CompoundTag compound) {\n super.readAdditionalSaveData(compound);\n this.setSheared(compound.getBoolean(\"Sheared\"));\n this.setMushroomType(MushroomType.byId(compound.getInt(\"Mushroom\")));\n }", "@JsonGetter(\"persistent\")\r\n public boolean getPersistent ( ) { \r\n return this.persistent;\r\n }", "@Override\n\tpublic void setSanitizeKeys(boolean arg0) {\n\n\t}", "@Override\n\tpublic String onData() {\n\t\tMap<String, Object> mapObj = new HashMap<String, Object>();\n\t\tfor (BasicNameValuePair pair : pairs) {\n\t\t\tmapObj.put(pair.getName(), pair.getValue());\n\t\t}\n\t\tGson gson = new Gson();\n\t\tString json = gson.toJson(mapObj);\n\t\treturn json;\n\t}", "public void insertIntoDb(JSONObject data) {\n shortlistedSuppliersData.clear();\r\n shortlistedInventoryDetailsData.clear();\r\n basicSupplierData.clear();\r\n inventoryActivityAssignmentData.clear();\r\n inventoryActivityData.clear();\r\n\r\n if ( data == null)\r\n return;\r\n\r\n try {\r\n // handling shortlisted suppliers here\r\n JSONObject shortlistedSuppliers = data.getJSONObject(\"shortlisted_suppliers\");\r\n Iterator<?> shortlistedSupplierKeys = shortlistedSuppliers.keys();\r\n\r\n while ( shortlistedSupplierKeys.hasNext() ) {\r\n\r\n String shortlistedSupplierId = (String)shortlistedSupplierKeys.next();\r\n if ( shortlistedSuppliers.get(shortlistedSupplierId) instanceof JSONObject ) {\r\n\r\n JSONObject shortlistedSupplier = (JSONObject)shortlistedSuppliers.get(shortlistedSupplierId);\r\n String supplierContentType = shortlistedSupplier.getString(\"content_type_id\");\r\n\r\n ShortlistedSuppliersTable shortlistedSupplierObject =\r\n getShortlistedSupplierData(shortlistedSupplier, shortlistedSupplierId);\r\n\r\n if (shortlistedSupplierObject == null)\r\n continue;\r\n\r\n // work for BasicSupplier Data\r\n JSONObject supplierDetail = shortlistedSupplier.getJSONObject(\"supplier_detail\");\r\n BasicSupplierTable instance = getBasicSupplierData(supplierDetail, supplierContentType);\r\n if ( instance != null ) {\r\n basicSupplierData.add(instance);\r\n }\r\n\r\n //Log.e(\"In assigned Frag\",supplierDetail.toString());\r\n contactTableEntryList = ContactsTable.getContactDetails(supplierDetail);\r\n\r\n shortlistedSuppliersData.add(shortlistedSupplierObject);\r\n }\r\n }\r\n\r\n // handling shortlisted inventories here\r\n JSONObject shortlistedInventories = data.getJSONObject(\"shortlisted_inventories\");\r\n Iterator<?> shortlistedInventoryKeys = shortlistedInventories.keys();\r\n\r\n while ( shortlistedInventoryKeys.hasNext() ) {\r\n\r\n String shortlistedInventoryId = (String)shortlistedInventoryKeys.next();\r\n JSONObject shortlistedInventory = (JSONObject)shortlistedInventories.get(shortlistedInventoryId);\r\n\r\n ShortlistedInventoryDetailsTable instance = getShortlistedInventoryDetailsTableInstance(shortlistedInventory, shortlistedInventoryId);\r\n if ( instance == null)\r\n continue;\r\n shortlistedInventoryDetailsData.add(instance);\r\n }\r\n\r\n // handle inventory activities\r\n JSONObject inventoryActivities = data.getJSONObject(\"inventory_activities\");\r\n Iterator<?> inventoryActivityKeys = inventoryActivities.keys();\r\n\r\n while ( inventoryActivityKeys.hasNext() ) {\r\n\r\n String inventoryActivityId = (String)inventoryActivityKeys.next();\r\n JSONObject inventoryActivity = (JSONObject)inventoryActivities.get(inventoryActivityId);\r\n\r\n InventoryActivityTable inventoryActivityTable = getInventoryActivityInstance(inventoryActivity, inventoryActivityId);\r\n if (inventoryActivityTable == null)\r\n continue;\r\n inventoryActivityData.add(inventoryActivityTable);\r\n }\r\n\r\n // handling inventory activity assignment here\r\n\r\n JSONObject inventoryActivityAssignment = data.getJSONObject(\"inventory_activity_assignment\");\r\n Iterator<?> inventoryActivityAssignmentKeys = inventoryActivityAssignment.keys();\r\n\r\n while( inventoryActivityAssignmentKeys.hasNext() ) {\r\n\r\n String inventoryActivityAssignmentId = (String)inventoryActivityAssignmentKeys.next();\r\n JSONObject inventoryActivityAssignmentObject = (JSONObject)inventoryActivityAssignment.get(inventoryActivityAssignmentId);\r\n\r\n InventoryActivityAssignmentTable instance = getInventoryActivityAssignmentInstance(inventoryActivityAssignmentObject, inventoryActivityAssignmentId);\r\n if ( instance == null)\r\n continue;\r\n inventoryActivityAssignmentData.add(instance);\r\n\r\n }\r\n }\r\n catch (Exception e) {\r\n Log.d(\"insertIntoDb\", e.getMessage());\r\n }\r\n\r\n DataBaseHandler db = DataBaseHandler.getInstance(getContext());\r\n try {\r\n // bulk insert them all.\r\n\r\n ShortlistedSuppliersTable.insertBulk(db, shortlistedSuppliersData);\r\n ShortlistedInventoryDetailsTable.insertBulk(db, shortlistedInventoryDetailsData);\r\n BasicSupplierTable.insertBulk(db, basicSupplierData);\r\n InventoryActivityTable.insertBulk(db, inventoryActivityData);\r\n InventoryActivityAssignmentTable.insertBulk(db, inventoryActivityAssignmentData);\r\n ContactsTable.insertBulk(db,contactTableEntryList);\r\n\r\n Log.d(\"ShortlistedSuppTable\", Integer.toString( db.getTotalCount(ShortlistedSuppliersTable.getTableName())));\r\n Log.d(\"shortInvDetail\", Integer.toString( db.getTotalCount(ShortlistedInventoryDetailsTable.getTableName()))) ;\r\n Log.d(\"BasicSuppData\", Integer.toString(db.getTotalCount(BasicSupplierTable.getTableName()))) ;\r\n Log.d(\"InvActivity\", Integer.toString(db.getTotalCount(InventoryActivityTable.getTableName()))) ;\r\n Log.d(\"InvActivityAssignment\", Integer.toString(db.getTotalCount(InventoryActivityAssignmentTable.getTableName()))) ;\r\n\r\n }\r\n catch (Exception e) {\r\n Log.d(\"insertIntoDb\", e.getMessage());\r\n }\r\n finally {\r\n\r\n }\r\n }", "private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "@Override\r\n\tpublic void OC_setPropsJSON(JSONObject jo)\r\n\t{\n\t\t\r\n\t}", "public boolean insertByNotificationsJson(String json){\n\t\tboolean status = false;\n\t\ttry{\n\t\t\tSession session = CassandraCluster.getKeyspaceSession(Constants.CASSANDRA_KEYSPACE, Constants.CASSANDRA_PORT, Constants.CASSANDRA_HOSTS);\n\t\t\tString insertJsonQuery = \"insert into notifications json '\"+json+\"'\";\n\t\t\tsession.execute(insertJsonQuery);\n\t\t\tstatus = true;\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception Occured while performing insert by json String Notifications Object\", e);\n\t\t}\n\t\treturn status;\n\t}", "@Override\n public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {\n save();\n return super.configure(req, formData);\n }", "@Override\n public void DataIsInserted() {\n }", "public void setInDatabase(boolean b) {\n \n }" ]
[ "0.56573266", "0.5586808", "0.556882", "0.5447983", "0.5409312", "0.53773004", "0.53400093", "0.5323487", "0.5283114", "0.52659684", "0.5264367", "0.5247684", "0.5247684", "0.5247684", "0.5247684", "0.5247684", "0.5247684", "0.5247684", "0.5247684", "0.5247684", "0.5182121", "0.51664704", "0.5142995", "0.5139626", "0.51359975", "0.5078956", "0.5010555", "0.49969834", "0.4976866", "0.49723685", "0.49507883", "0.48872134", "0.48869228", "0.48717153", "0.48687053", "0.4846433", "0.48284274", "0.48194927", "0.4813535", "0.47856325", "0.47698933", "0.47673637", "0.47643235", "0.4754936", "0.47388875", "0.47324157", "0.4720118", "0.47148833", "0.47069615", "0.4699205", "0.469473", "0.46808785", "0.467398", "0.4668003", "0.4662534", "0.4635952", "0.46337533", "0.46174213", "0.46121106", "0.46061614", "0.4605431", "0.4602215", "0.46016216", "0.45926213", "0.4587212", "0.45861292", "0.45845863", "0.45779762", "0.45722562", "0.4569384", "0.45666042", "0.4552663", "0.45521286", "0.45499197", "0.4549466", "0.45362127", "0.45281968", "0.4523065", "0.45226803", "0.45183334", "0.45125562", "0.45088488", "0.45073175", "0.45033252", "0.44982305", "0.44977137", "0.4495634", "0.44884792", "0.44883043", "0.4486982", "0.44865838", "0.44862482", "0.44858626", "0.44834942", "0.44828737", "0.4475621", "0.4473824", "0.44672063", "0.446695", "0.44660753", "0.44593364" ]
0.0
-1
Try sending request again to Twitter API
private static QueryResult searchWithRetry(Twitter twitter, Query query) throws TwitterException { return twitter.search(query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void tweet() {\r\n try {\r\n\r\n String twet = JOptionPane.showInputDialog(\"Tweett:\");\r\n Status status = twitter.updateStatus(twet);\r\n System.out.println(\"Successfully updated the status to [\" + status.getText() + \"].\");\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void loginToTwitter() \n\t{\n\t\t// Check if already logged in\n\t\tif (!isTwitterLoggedInAlready())\n\t\t{\n\t\t\tConfigurationBuilder builder = new ConfigurationBuilder();\n\t\t\tbuilder.setOAuthConsumerKey(TWITTER_CONSUMER_KEY);\n\t\t\tbuilder.setOAuthConsumerSecret(TWITTER_CONSUMER_SECRET);\n\t\t\tConfiguration configuration = builder.build();\n\n\t\t\tTwitterFactory factory = new TwitterFactory(configuration);\n\t\t\ttwitter = factory.getInstance();\n\n\t\t\ttry {\n\t\t\t\trequestToken = twitter.getOAuthRequestToken(TWITTER_CALLBACK_URL);\n\t\t\t\tRuntime.getRuntime().gc();\n\t\t\t\tSystem.gc();\n\t\t\t\tfinish();\n\t\t\t\tIntent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(requestToken.getAuthenticationURL()));\n\t\t\t\tbrowserIntent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n\t\t\t\tthis.startActivity(browserIntent);\n\t\t\t} \n\t\t\tcatch (TwitterException e) \n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} \n\t\telse\n\t\t{\n\t\t\t// user already logged into twitter\n//\t\t\tToast.makeText(getApplicationContext(), \"Already Logged into twitter\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n public void failure(TwitterException e) {\n }", "@Override\n public void failure(TwitterException exception) {\n }", "public void failure(TwitterException exception) {\n }", "public static boolean sendTweet(String tweet) {\n \t\tif (!isEnabled) {\n \t\t\tlogger.debug(\"Twitter client is disabled > execution aborted!\");\n \t\t\treturn false;\n \t\t}\n \n \t\ttry {\n \t\t\tStatus status = client.updateStatus(tweet);\n\t\t\tlogger.debug(\"Successfully sent Tweet '{}'\", status.getText());\n \t\t\treturn true;\n \t\t} catch (TwitterException e) {\n \t\t\tlogger.error(\"Failed to send Tweet '\" + tweet + \"' because of: \" + e.getLocalizedMessage());\n \t\t\treturn false;\n \t\t}\n \t}", "@Override\n public void failure(TwitterException exception) {\n }", "@Override\n protected String doInBackground(String... params) {\n if(isFirstRead ||\n SessionObject.getTweetList() == null ||\n SessionObject.getTweetList().size() == 0){\n //Get last 20 MSG\n\n //Quick and dirty\n String url = MESSAGE_URL+\"?username=\"+SessionObject.getUsername()+\"&token=\"+SessionObject.getToken();\n\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"Begin SignUp HTTP call \"+ url);\n String result = connect(url,MESSAGE_READ_METHOD, null);\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"End SignUp HTTP call, result: \"+result);\n isFirstRead = false;\n SessionObject.setTweetList(JsonParser.parseJsonFromGetMsgs(result));\n return result;\n }\n //Find new messages from last message\n //Quick and dirty\n String url = MESSAGE_TS_URL+\"?timestamp=\"+SessionObject.getTweetList().get(0).getTimestamp();\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"Begin SignUp HTTP call \"+url);\n String result = connect(url,MESSAGE_READ_METHOD, null);\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"End SignUp HTTP call, result: \"+result);\n SessionObject.addTwettToList(JsonParser.parseJsonFromGetMsgs(result));\n return result;\n }", "private static void reply(Status status){\n String tweetedAtMe = \"@\" + status.getUser().getScreenName(); //retrieve username\n String completeReply = tweetedAtMe + \" \" + replyStatus + tweetedAtMe + \"?”\"; //message to tweet\n long inReply = status.getId(); //get id of status for reply\n StatusUpdate statusUpdate = new StatusUpdate(completeReply).inReplyToStatusId(inReply); //Status update is indicated as a reply\n\n Twitter twitter = TwitterInstantiator.instantiateTwitter(); //authorize to tweet on my behalf\n\n try{\n twitter.updateStatus(statusUpdate); //send tweet\n } catch (TwitterException te) {\n System.out.println(\"Ran into twitter exception: \" + te); //this tells me if I've sent too many tweets in a short time\n }\n }", "public static Twitter wakeupForAuthCallback() \n {\n Twitter twitter = twitterLoggingIn;\n twitterLoggingIn = null;\n return twitter;\n }", "public static void waitForAuthCallback(Twitter t)\n {\n twitterLoggingIn = t;\n }", "public void onTweetSuccess(Tweet tweet);", "private void loginToTwitter() {\n if (!isTwitterLoggedInAlready()) {\n ConfigurationBuilder builder = new ConfigurationBuilder();\n builder.setOAuthConsumerKey(TWITTER_CONSUMER_KEY);\n builder.setOAuthConsumerSecret(TWITTER_CONSUMER_SECRET);\n Configuration configuration = builder.build();\n\n TwitterFactory factory = new TwitterFactory(configuration);\n twitter = factory.getInstance();\n\n try {\n requestToken = twitter\n .getOAuthRequestToken(TWITTER_CALLBACK_URL);\n this.startActivity(new Intent(Intent.ACTION_VIEW, Uri\n .parse(requestToken.getAuthenticationURL())));\n } catch (TwitterException e) {\n e.printStackTrace();\n }\n } else {\n // user already logged into twitter\n Toast.makeText(getApplicationContext(),\n R.string.account_logged_twitter, Toast.LENGTH_LONG).show();\n btnLogoutTwitter.setVisibility(View.VISIBLE);\n btnLoginTwitter.setVisibility(View.GONE);\n }\n }", "@Override\n public void failure(TwitterException exception) {\n Toast.makeText(MainActivity.this, \"Authentication Failed!\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void failure(TwitterException e) {\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void failure(TwitterException exception) {\n Log.d(\"TwitterKit\", \"Login with Twitter failure\", exception);\n }", "private void composeTweet() {\n if(NetworkUtils.isConnectedToNetwork((ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE)) == false) {\n Toast.makeText(this.getApplicationContext(), \"Please check your network connection!\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent i = new Intent(this, ComposeActivity.class);\n startActivityForResult(i, REQ_CODE_COMPOSE_TWEET);\n }", "public void update(final String tweet) throws IOException {\n\t\ttry {\n\t\t\tif( _twitter.updateStatus(tweet) == null ) {\n\t\t\t\tthrow new IOException(\"Could not post tweet\");\n\t\t\t}\n\t\t}\n\t\tcatch( TwitterException e) {\n\t\t\tthrow new IOException(e.toString());\n\t\t}\n\t}", "private void checkForSavedLogin() {\n\t\taccessToken = getAccessToken();\n\t\tif (accessToken==null) return;\t//if there are no credentials stored then return to usual activity\n\n\t\t// initialize Twitter4J\n\t\ttwitter.setOAuthAccessToken(accessToken);\n\t}", "protected Boolean doInBackground(String... urls) {\n emyTwitter = new TwitterFactory().getInstance();\n\n //pass developer key and secret\n emyTwitter.setOAuthConsumer(TWIT_KEY, TWIT_SECRET);\n\n //try to get request token\n try {\n //get authentication request token\n emyRequestToken = emyTwitter.getOAuthRequestToken(TWIT_URL);\n Log.e(LOG_TAG, \"TE \" + \"request succ\");\n } catch (TwitterException te) {\n Log.e(LOG_TAG, \"TE \" + te.getMessage());\n }\n return true;\n }", "@Override\n public void failure(TwitterException exception) {\n Toast.makeText(getApplicationContext(), \"Fail Logged.....ٍ\", Toast.LENGTH_LONG).show();\n\n }", "@Override\n\tpublic void tweet(String message) throws Exception {\n\t\t\n\t}", "private TwitterAPI(){\n\t\t\n\t}", "public void customLoginTwitter() {\n //check if user is already authenticated or not\n if (getTwitterSession() == null) {\n\n //if user is not authenticated start authenticating\n client.authorize(this, new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n\n // Do something with result, which provides a TwitterSession for making API calls\n TwitterSession twitterSession = result.data;\n fetchTwitterEmail(twitterSession);\n }\n\n @Override\n public void failure(TwitterException e) {\n // Do something on failure\n Toast.makeText(SignInActivity.this, \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n //if user is already authenticated direct call fetch twitter email api\n Toast.makeText(this, \"User already authenticated\", Toast.LENGTH_SHORT).show();\n// fetchTwitterEmail(getTwitterSession());\n }\n }", "private void yahooWeather() {\n\t\tSystem.out.println(\"Sending weather information via Twitter.\");\n\t\ttry {\n\t\t\tTwitterComm.sendDirectMessage(Constants.AUTH_USER, Alfred\n\t\t\t\t\t.getWeatherService().getTwitterWeather());\n\t\t} catch (JAXBException | IOException e) {\n\t\t\tTwitterComm\n\t\t\t\t\t.sendDirectMessage(\n\t\t\t\t\t\t\tConstants.AUTH_USER,\n\t\t\t\t\t\t\t\"I was unable to retrieve weather information from Yahoo. Check out: \"\n\t\t\t\t\t\t\t\t\t+ \"\\nhttp://www.yr.no/sted/Norge/Sør-Trøndelag/Trondheim/Trondheim/\");\n\t\t}\n\t}", "public void unSetRetweet(Tweet tweet, AsyncHttpResponseHandler handler) {\n String apiUrl = getApiUrl(\"statuses/unretweet/\" + tweet.getTid() + \".json\");\n\n // Execute the request\n getClient().post(apiUrl, handler);\n }", "public static void runScript() throws twitter4j.TwitterException, java\n\t\t\t .lang.InterruptedException\n\t{\n\t\tint currentIteration = 0;\n\n\t\twhile (currentIteration < REFRESH_ITERATIONS)\n\t\t{\n\n\t\t\tArrayList<Status> searches = getSearch(searchTerm);\n\n\t\t\tif (searches.size() == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"No tweets found with current search term \" +\n\t\t\t\t\t\t searchTerm);\n\t\t\t}\n\n\t\t\tfor (Status status : searches)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\tPrints out the search\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"@\" + status.getUser().getScreenName() + \":\" +\n\t\t\t\t\t\t status.getText());\n\n\t\t\t\tStatusUtils sU = new StatusUtils(status);\n\t\t\t\tboolean follow = sU.checkToFollow();\n\t\t\t\tboolean retweet = sU.checkToRetweet();\n\n\t\t\t\tif ((!follow && !retweet) || status.isRetweetedByMe())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"IGNORE\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (status.isRetweet())\n\t\t\t\t{\n\t\t\t\t\tstatus = status.getRetweetedStatus();\n\t\t\t\t}\n\n\t\t\t\tif (follow)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\ttwitter.createFriendship(sU.getPersonToFollow());\n\t\t\t\t\t\tSystem.out.println(\"FOLLOWED\");\n\t\t\t\t\t\tfixFollowers();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Threw error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (retweet)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\ttwitter.retweetStatus(status.getId());\n\t\t\t\t\t\tSystem.out.println(\"RETWEETED\");\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Threw error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcurrentIteration++;\n\n\t\t\t\tif (currentIteration == REFRESH_ITERATIONS)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"sleeping\");\n\t\t\t\t\tThread.sleep(SLEEP_TIME);\n\t\t\t\t\tcurrentIteration = 0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }", "public void onmethod()\n {\n Log.e(\"onmethod\",\"log\");\n\n TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);\n /* Fabric.with(getApplicationContext(), new com.twitter.sdk.android.Twitter(authConfig));*/\n mTwitterAuthClient= new TwitterAuthClient();\n\n setContentView(R.layout.activity_otp);\n // Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n// setSupportActionBar(toolbar);\n ivLoginTwitter=(ImageView) findViewById(R.id.ivLoginTwitter);\n ivLoginTwitter.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v)\n {\n Log.e(\"onclick\",\"log\");\n\n mTwitterAuthClient.authorize(OTPActivity.this, new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n Log.e(\"TwitterKit\", \"Login Sucess\");\n\n session = com.twitter.sdk.android.Twitter.getSessionManager().getActiveSession();\n\n com.twitter.sdk.android.Twitter.getApiClient(session).getAccountService()\n .verifyCredentials(true, false, new Callback<User>() {\n\n @Override\n public void success(Result<User> userResult) {\n Log.e(\"TwitterKit\", \"twitter on Sucess\");\n\n User user = userResult.data;\n\n twitterImage = user.profileImageUrl;\n Log.e(\"TwitterKit\",\"\"+twitterImage);\n screenname = user.screenName;\n Log.e(\"TwitterKit\",\"\"+screenname);\n username = user.name;\n Log.e(\"TwitterKit\",\"\"+username);\n location = user.location;\n Log.e(\"TwitterKit\",\"\"+location);\n timeZone = user.timeZone;\n Log.e(\"TwitterKit\",\"\"+timeZone);\n description = user.description;\n Log.e(\"TwitterKit\",\"\"+description);\n usm.editor.putString(usm.KEY_NAME, username);\n usm.editor.putString(usm.KEY_EMAIL, screenname);\n usm.editor.putString(usm.KEY_URL,twitterImage);\n usm.editor.putBoolean(usm.KEY_TWITTER_LOGIN, true);\n Conditionclass conditionclass=new Conditionclass(3);\n\n usm.editor.commit();\n\n\n gotoProfileActivity();\n\n\n\n\n }\n\n @Override\n public void failure(TwitterException e) {\n\n }\n\n });\n\n // loginButton.setVisibility(View.GONE);\n\n }\n\n @Override\n public void failure(TwitterException exception)\n {\n Log.e(\"TwitterKit\", \"Login with Twitter failure\", exception);\n\n }\n });\n\n\n\n\n }\n });\n\n\n\n }", "private ArrayList<TweetData> query(QueryTargetInfo info) {\n String url;\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n InputStream is = null;\n\n // lastSeenId should have been set earlier.\n // However, if it is still null, just use \"0\".\n if (info.lastSeenId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=0\",\n URL_BASE, info.query, RPP);\n } else if (info.smallestId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId);\n } else {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s&max_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId, info.smallestId);\n }\n\n try {\n do {\n URL searchURL = new URL(url);\n HttpsURLConnection searchConnection = (HttpsURLConnection)searchURL.openConnection();\n\n searchConnection.setRequestProperty(\"Host\", \"api.twitter.com\");\n searchConnection.setRequestProperty(\"User-Agent\", \"BirdCatcher\");\n searchConnection.setRequestProperty(\"Authorization\", \"Bearer \" + kBearerToken);\n\n is = searchConnection.getInputStream();\n\n JSONTokener jsonTokener = new JSONTokener(is);\n\n JSONObject json = new JSONObject(jsonTokener);\n\n is.close();\n\n url = getNextLink(json, url, info);\n\n tweets.addAll(getTweets(json, info));\n\n Thread.sleep(1000);\n\n is = null;\n } while (url != null);\n } catch (Exception e) {\n Logger.logError(\"Error performing query\", e);\n\n if (is != null) {\n try {\n java.io.BufferedReader in =\n new java.io.BufferedReader(new java.io.InputStreamReader(is));\n\n String response = \"Response from Twitter:\\n\";\n String temp;\n\n while ((temp = in.readLine()) != null) {\n response += (temp + \"\\n\");\n }\n\n Logger.logDebug(response);\n\n response = null;\n temp = null;\n } catch (Exception ex) {\n }\n }\n\n return tweets;\n }\n\n return tweets;\n }", "public void onRequestMore() {\n buildTimeline(getLastTweetId() - 1, NO_SINCE_ID);\n }", "protected void responseFail(){\n\t\tqueue.clear();\n\t}", "public void setRetweet(Tweet tweet, AsyncHttpResponseHandler handler) {\n String apiUrl = getApiUrl(\"statuses/retweet/\" + tweet.getTid() + \".json\");\n\n // Execute the request\n getClient().post(apiUrl, handler);\n }", "@Override\n public void failure(TwitterException e) {\n Toast.makeText(getActivity().getApplicationContext(), \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }", "Status updateStatus(String status) throws TwitterException;", "public void tweet() {\n ReusableActionsPageObjects.clickOnElement(driver, tweet, logger, \"tweet.\");\n }", "@Override\n public void success(Result<TwitterSession> result) {\n TwitterSession twitterSession = result.data;\n fetchTwitterAccount();\n dismiss();\n }", "private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }", "Status retweetStatus(long statusId) throws TwitterException;", "void getTweets(long lastUid) {\n client.getMentionsTimeline(lastUid, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG\", response.toString());\n addAll(Tweet.fromJsonArray(response));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n });\n }", "public void getTweets() {\r\n\t\t\r\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\r\n\t\tcb.setDebugEnabled(true);\r\n\t\t\r\n\t\t//provide your own keys\r\n\t cb.setOAuthConsumerKey(\"ConsumerKey\");\r\n\t cb.setOAuthConsumerSecret(\"ConsumerSecret\");\r\n\t cb.setOAuthAccessToken(\"AccessToken\");\r\n\t cb.setOAuthAccessTokenSecret(\"TokenSecret\");\r\n\r\n TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); \r\n \r\n //Check for live status updates\r\n StatusListener listener = new StatusListener() {\r\n\r\n @Override\r\n public void onException(Exception arg0) {\r\n \tSystem.out.println(\"Exception!! Data Not Inserted Into Database\");\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\r\n \tSystem.out.println(\"Got a status deletion notice id:\" + arg0.getStatusId());\r\n }\r\n \r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n \r\n @Override\r\n public void onStatus(Status status) {\r\n \t\r\n \t User user = status.getUser();\r\n \t \r\n String username = status.getUser().getScreenName();\r\n String profileLocation = user.getLocation();\r\n long tweetId = status.getId(); \r\n String content = status.getText();\r\n \r\n \r\n //Create a model for the live data\r\n TweetModel memoryData = new TweetModel(username, profileLocation, tweetId, content);\r\n \r\n //store to MongoDB if data is correct\r\n System.out.println(++counter + \") username: \" + username + \" location: \" + profileLocation + \" tweetId \" + tweetId + \" Text: \" + content );\r\n data.save(memoryData);\r\n }\r\n \r\n\t\t\t@Override\r\n public void onTrackLimitationNotice(int arg0) {\r\n\t System.out.println(\"Got track limitation notice:\" + arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onStallWarning(StallWarning warning) {}\r\n };\r\n \r\n //Filter the live tweet results\r\n FilterQuery filterQuery = new FilterQuery();\r\n //Search for tweets with specific keywords\r\n String keywords[] = {\"Java\", \"Python\", \"PHP\"};\r\n //Restrict the language to English\r\n String[] lang = {\"en\"}; \r\n //Add the Filters\r\n filterQuery.language(lang);\r\n filterQuery.track(keywords);\r\n //Listen for Live Tweets\r\n twitterStream.addListener(listener);\r\n twitterStream.filter(filterQuery);\r\n\t}", "public void onTweetClicked(View v) {\n String tweetText = tweetInput.getText().toString();\n RestClient client = TwitterClientApp.getRestClient();\n client.postTweet(tweetText, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(JSONObject jsonObject) {\n // Parse tweet and finish activity\n Tweet twt = new Tweet(jsonObject);\n twt.save();\n Intent result = new Intent();\n result.putExtra(EXTRA_TWEET, twt);\n setResult(RESULT_OK, result);\n finish();\n }\n\n @Override\n public void onFailure(Throwable throwable, JSONObject jsonObject) {\n super.onFailure(throwable, jsonObject);\n Log.e(\"ComposeTweetActivity\", \"Error occurred\");\n finish();\n }\n\n });\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\ttwitter.setSource(\"keyrani\");\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\ttwitter.updateStatus(status.getText().toString());\n\t\t\t\t\t\t\n\t\t\t\t\t}catch (Repetition e) {\n\t\t\t\t\t\t Toast.makeText(TwitUpdate.this, \"status tdk boleh sama\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@RequestMapping(value = \"/twitterUpdateUsername/\", method = RequestMethod.POST)\n\tpublic String twitterUpdateUsername(HttpServletRequest req,\n\t\t\t@RequestParam(value = \"t_username\", defaultValue = \"null\") String t_username) {\n\n\t\tSystem.out.println(\"Updating twitter data!\");\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"Here twitter Update Username: \" + username);\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\tDate date = new Date();\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\trestTemplate.setErrorHandler(new DefaultResponseErrorHandler() {\n\t\t\tprotected boolean hasError(HttpStatus statusCode) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tSocialMediaAccess smaNewCreate = new SocialMediaAccess(username, \"twitter\", \"twitter_username\", t_username,\n\t\t\t\t\"long_live\", dateFormat.format(date));\n\t\tResponseEntity<SocialMediaAccess> smaTwitter = restTemplate.getForEntity(uriReadSM + username + \"/twitter/\",\n\t\t\t\tSocialMediaAccess.class);\n\n\t\tSystem.out.println(\"--------------------------START check in smaTwitter. username: \" + username);\n\t\tif (smaTwitter.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***START. There is smaTwitter in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaTwitter.getBody().getSma_id());\n\t\t\tsmaNewCreate.setSma_id(smaTwitter.getBody().getSma_id());\n\t\t\trestTemplate.put(uriUpdateSMA, smaNewCreate);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***END. There is smaTwitter in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaTwitter.getBody().getSma_id());\n\t\t} else {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******START. There is NO smaTwitter in database. need to CREATE.\");\n\t\t\tResponseEntity<SocialMediaAccess> resmaCreated = restTemplate.postForEntity(uriCreateSMA, smaNewCreate,\n\t\t\t\t\tSocialMediaAccess.class);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******END. There is NO smaTwitter in database. need to CREATE.\");\n\t\t}\n\t\tSystem.out.println(\"--------------------------END check in smaTwitter\");\n\n\t\t// START getting twitter data\n\t\tSystem.out.println(\"Getting twitter data\");\n\n\t\tResponseEntity<SocialMediaData[]> smDataArr = restTemplate.postForEntity(uriGetTwitterDataWeb, smaNewCreate,\n\t\t\t\tSocialMediaData[].class);\n\t\tSystem.out.println(\"+++START Twitter update data. smdLength: \" + smDataArr.getBody().length);\n\t\t// START storing of twitter data to database\n\t\tfor (SocialMediaData smData : smDataArr.getBody()) {\n\t\t\tResponseEntity<SocialMediaData> oldsmd = restTemplate\n\t\t\t\t\t.getForEntity(uriGetSMDataByID + smData.getData_id() + \"/\", SocialMediaData.class);\n\t\t\tif (oldsmd.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\tSystem.out.println(\"Social Media Data Id = \" + smData.getData_id() + \" exists already\");\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Social Media Data id = \" + smData.getData_id() + \" doesn't exists. Need to create..\");\n\t\t\t\tResponseEntity<SocialMediaData> smD = restTemplate.postForEntity(uriSocialMediaDataCreate, smData,\n\t\t\t\t\t\tSocialMediaData.class);\n\t\t\t}\n\t\t\t/*\n\t\t\t * System.out.println(\"Printing: \" + smData.getData());\n\t\t\t * ResponseEntity<SocialMediaData> smD =\n\t\t\t * restTemplate.postForEntity(uriSocialMediaDataCreate, smData,\n\t\t\t * SocialMediaData.class);\n\t\t\t */\n\t\t}\n\t\tSystem.out.println(\"+++END Updating twitter data+++\");\n\n\t\t// END storing of twitter data to database\n\t\t// END getting twitter data\n\t\tdoAsyncProcessCharacter(username);\n\t\t//\n\t\t// HttpSession session = req.getSession();\n\t\t// String username = (String) session.getAttribute(\"username\");\n\t\t// doAsyncProcessCharacter(username);\n\t\treturn \"redirect:../home\";\n\t}", "protected void makeClientMissed() {\n\t\tArrayList<String> key = new ArrayList<String>();\r\n\r\n\t\tkey.add(\"id\");\r\n\r\n\t\tArrayList<String> value = new ArrayList<String>();\r\n\r\n\t\tvalue.add(GlobalVariable.TrainerSessionId);\r\n\r\n\t\tSystem.out.println(\"se\" + GlobalVariable.TrainerSessionId);\r\n\r\n\t\td.showCustomSpinProgress(TrainerHomeActivity.this);\r\n\r\n\t\tString url = Constants.WEBSERVICE_URL+\"/webservice/missed\";\r\n\r\n\t\tcallWebService = new AsyncTaskCall(\r\n\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\t1,\r\n\t\t\t\turl,\r\n\t\t\t\tkey, value);\r\n\t\tcallWebService.execute();\r\n\r\n\t\tDialogView.customSpinProgress\r\n\t\t\t\t.setOnCancelListener(new OnCancelListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tcallWebService.cancel(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}", "@Override\n\tpublic void expectTwitterMessage(String username) {\n\t}", "private RetryQuery timeTweets(int n, Query lastQuery, String search, Configuration auth) {\r\n /*while (!DBStore.getInstance().isEmpty()) {\r\n try {\r\n Thread.sleep(10000);\r\n } catch (InterruptedException ex) {\r\n }\r\n }*/\r\n TwitterFactory tf = new TwitterFactory(auth);\r\n Twitter twitter = tf.getInstance();\r\n Query query = new Query(search);\r\n /*query.setGeoCode(new twitter4j.GeoLocation(geocode[0], geocode[1]), \r\n geocode[2], Query.Unit.km);*/\r\n query.setLang(\"nl\");\r\n query.count(1000);\r\n \r\n if (lastQuery != null) {\r\n query = lastQuery;\r\n }\r\n \r\n QueryResult result;\r\n \r\n if (Abort.getInstance().abort()) {\r\n return new RetryQuery(-1, query);\r\n }\r\n\r\n try {\r\n result = twitter.search(query);\r\n while (result.nextQuery() != null) {\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n query = result.nextQuery();\r\n result = twitter.search(query);\r\n }\r\n\r\n synchronized (lock) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n\r\n } catch (TwitterException te) {\r\n System.out.println(\"Failed to search tweets: \" + te);\r\n System.out.println(\"\\nRetry at n = \" + n + \": \" + \r\n (new Date(te.getRateLimitStatus()\r\n .getResetTimeInSeconds() * 1000L)));\r\n return new RetryQuery(\r\n te.getRateLimitStatus().getResetTimeInSeconds() * 1000L,\r\n query);\r\n }\r\n return new RetryQuery(0, null);\r\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\thandlHttpRequest(url, trackerinfo.get_info_hash(), Settings.PEER_DEFAULT_ID);\n\t\t\t\t\t}", "private void mtd_refresh_token() {\n RxClient.get(FeedActivity.this).Login(new loginreq(sharedpreferences.\n getString(SharedPrefUtils.SpEmail, \"\"),\n sharedpreferences.getString(SharedPrefUtils.SpPassword, \"\")), new Callback<loginresp>() {\n @Override\n public void success(loginresp loginresp, Response response) {\n\n if (loginresp.getStatus().equals(\"200\")){\n\n editor.putString(SharedPrefUtils.SpRememberToken,loginresp.getToken().toString());\n editor.commit();\n\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n wbService(tmpansList);\n progressBar.setVisibility(View.INVISIBLE);\n }\n };\n handler.postDelayed(runnable, 500);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n progressBar.setVisibility(View.INVISIBLE);\n Log.d(\"refresh token\", \"refresh token error\");\n Toast.makeText(FeedActivity.this, \"Service not response\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n });\n\n }", "Status updateStatus(StatusUpdate latestStatus) throws TwitterException;", "public void run()\n\t{\n\t\twhile (!this.isFinished)\n\t\t{\n\t\t\tMessage request = this.mBuff.get(); // get request from own mailbox\n\n\t\t\t// how many times has the follower danced with the requester.\n\t\t\t// might be faster with an array of timesDanced values for each leader known\n\t\t\tint count = 0;\n\t\t\tfor (int i=0; i<mDanceCard.length; i++)\n\t\t\t{\n\t\t\t\tif (mDanceCard[i] == request.dancer.getDancerID())\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(mNumber + \" Being asked to dance: \" + request.dance_number + \" by \" \n\t\t\t//\t\t\t\t\t+ request.dancer.getDancerID());\n\n\t\t\tLeader leader = (Leader)request.dancer;\n\t\t\tif (mDanceCard[request.dance_number] != 0 || count >= 2) // nope.\n\t\t\t{\n\t\t\t\trequest.dance_number = -1;\n\t\t\t\tthis.put(request, leader); \t// send back request with -1 for dance_number\n\t\t\t}\n\t\t\telse // say yes! mark card and see if you're done\n\t\t\t{\n\t\t\t\tthis.markCard(request.dance_number, request.dancer.getDancerID());\n\t\t\t\trequest.dancer = this;\n\t\t\t\tthis.put(request, leader);\t// send back request, but with the follower's own number\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"Follower \" + mNumber + \" is finished.\");\n\t\t\n\t\t// still check requests, but refuse them all.\n\t\twhile (this.isFinished)\n\t\t{\n\t\t\tMessage request = this.mBuff.get();\n\n\t\t\tLeader leader = (Leader)request.dancer;\n\t\t\trequest.dance_number = -1;\n\t\t\tthis.put(request, leader);\n\t\t}\n\t}", "public void cancelGetResponse() {\n impl.cancelGetResponse();\n }", "private void doAgainAnaswer() {\n\t\tfinal int answerToId = getIntent().getIntExtra(BUNDLE_PARAM_ANSWERTOUSERID, 0);\n\t\t// final String senderId =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERID);\n\t\t// final String senderName =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERNAME);\n\t\t// final String sendSource =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDSOURCE);\n\n\t\tUserInfo info = UserInfo.getInstance();\n\t\tif (!info.isLogin()) {\n\t\t\tLogger.error(\"replyanswer\", \"not login\");\n\t\t\treturn;\n\t\t}\n\t\tString content = etContent.getText().toString();\n\t\tcontent = mIAskListPresenter.handleInsertStock(content);\n\t\t// content = addImageToContent(content);\n\t\tif (StringUtils.isEmpty(content)) {\n\t\t\tshowToast(\"请输入回答内容\");\n\t\t\treturn;\n\t\t}\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"userId\", info.getUserId());\n\t\tparams.put(\"username\", info.getUserName());\n\t\tparams.put(\"againAskId\", String.valueOf(answerToId));\n\t\tparams.put(\"source\", \"爱投顾手机客户端\");\n\t\tparams.put(\"content\", content);\n\t\tif (!StringUtils.isEmpty(imageUrl)) {\n\t\t\tparams.put(\"images\", NetUrlLoginAndRegist.UPLOAD_PREFIX + imageUrl);\n\t\t}\n\t\t// etContent.setHint(\"输入您的提问。。。\");\n\t\t// doReply.setText(\"追问\");\n\n\t\tJsonRequest<TouguBaseResult> request = new JsonRequest<TouguBaseResult>(Method.POST, NetUrlMyInfo.AGAINASK, params, new RequestHandlerListener<TouguBaseResult>(getContext()) {\n\n\t\t\t@Override\n\t\t\tpublic void onStart(Request request) {\n\t\t\t\tsuper.onStart(request);\n\t\t\t\tshowDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onEnd(Request request) {\n\t\t\t\tsuper.onEnd(request);\n\t\t\t\thideDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String id, TouguBaseResult data) {\n\t\t\t\t// Toast.makeText(ReplyActivity.this, \"赞成功\",\n\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\tif (data.getRetCode() == 0) {\n\t\t\t\t\tsendBroadcast(new Intent(IAskListPresenter.ACTION_ASK_REFRESH));\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\tToast.makeText(ReplyActivity.this, data.getMsg(), Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}, TouguBaseResult.class);\n\n\t\tsend(request);\n\t}", "public void postTweet(int userId, int tweetId) {\n\n }", "Twitter geTwitterInstance();", "private void loadTwitterData(){\n showLoadingDialog();\n TwitterController.getInstance().loadTwitters(getTwitterCallback);\n }", "@Override\n public void onPostLook(JSONObject response) {\n stopProgressBar();\n }", "@Override\r\n\tpublic void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\r\n\t\tOAuthConsumer consumer = null;\r\n\t\t//log.info(\" MineTwitterConsumer START\");\r\n\t\tthis.setRedirectUrl(request.getParameter(JpSocialSystemConstants.TW_REDIRECT_URL));\r\n\t\tConfigInterface configInterface = (ConfigInterface) ApsWebApplicationUtils.getBean(\"BaseConfigManager\", request);\r\n\t\tString devMode = configInterface.getParam(JpSocialSystemConstants.DEV_MODE_PARAM_NAME);\r\n\t\tString loginrequest = request.getParameter(\"loginrequest\");\r\n\t\tif (\"true\".equalsIgnoreCase(devMode)) {\r\n\t\t\t_logger.info(\" DEV MODE :: {} - auth url {}\", devMode, this.getDevLoginUrl());\r\n\t\t\tthis.setRedirectUrl(this.getDevLoginUrl());\r\n\t\t\tif (this.getDomain().equals(loginrequest)) {\r\n\t\t\t\tUserDetails userDetails = this.getFakeUser();\r\n\t\t\t\trequest.getSession().setAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER, userDetails);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tITwitterCookieConsumer twitterConsumerManager =\r\n\t\t\t\t\t(ITwitterCookieConsumer) ApsWebApplicationUtils.getBean(JpSocialSystemConstants.TWITTER_CONSUMER_MANAGER, request);\r\n\t\t\ttry {\r\n\t\t\t\tconsumer = twitterConsumerManager.getTwitterConsumer(request);\r\n\t\t\t\tOAuthAccessor accessor = twitterConsumerManager.getAccessor(request, response, consumer);\r\n\t\t\t\tOAuthClient client = new OAuthClient(new TwitterHttpClient());\r\n\t\t\t\tOAuthResponseMessage result = client.access(accessor.newRequestMessage(OAuthMessage.GET,\r\n\t\t\t\t\t\t\"https://api.twitter.com/1.1/account/verify_credentials.json\", null), ParameterStyle.AUTHORIZATION_HEADER);\r\n\t\t\t\tint status = result.getHttpResponse().getStatusCode();\r\n\t\t\t\tif (status != HttpResponseMessage.STATUS_OK) {\r\n\t\t\t\t\tOAuthProblemException problem = result.toOAuthProblemException();\r\n\t\t\t\t\tif (problem.getProblem() != null) {\r\n\t\t\t\t\t\tthrow problem;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tMap<String, Object> dump = problem.getParameters();\r\n\t\t\t\t\tresponse.setContentType(\"text/plain\");\r\n\t\t\t\t\tPrintWriter out = response.getWriter();\r\n\t\t\t\t\tout.println(dump.get(HttpMessage.REQUEST));\r\n\t\t\t\t\tout.println(\"----------------------\");\r\n\t\t\t\t\tout.println(dump.get(HttpMessage.RESPONSE));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Simply pass the data through to the browser:\r\n\t\t\t\t\tString json = twitterConsumerManager.copyResponse(result);\r\n//\t\t\t\tSystem.out.println(\"****************************************\");\r\n//\t\t\t\tSystem.out.println(json);\r\n//\t\t\t\tSystem.out.println(\"****************************************\");\r\n\t\t\t\t\tJSONObject jsonObject = new JSONObject(json);\r\n\t\t\t\t\tString id = jsonObject.getString(\"id\");\r\n\t\t\t\t\t//String id_str = jsonObject.getString(\"id_str\");\t\t\t\t\r\n\t\t\t\t\tString name = jsonObject.getString(\"name\");\r\n\t\t\t\t\t//log.info(\" id \" + jsonObject.getString(\"id\"));\r\n\t\t\t\t\t//log.info(\" id_str \" + jsonObject.getString(\"id_str\"));\r\n// log.info(\" name \" + jsonObject.getString(\"name\"));\r\n\t\t\t\t\tITwitterManager twitterManager = (ITwitterManager) ApsWebApplicationUtils.getBean(JpSocialSystemConstants.TWITTER_CLIENT_MANAGER, request);\r\n\t\t\t\t\tTwitterCredentials credentials = (TwitterCredentials) twitterManager.createSocialCredentials(accessor.accessToken, accessor.tokenSecret);\r\n//\t\t\t\t\t((HttpServletRequest) request).getSession().setAttribute(JpSocialSystemConstants.SESSION_PARAM_TWITTER, credentials);\r\n\t\t\t\t\tString currentAction = getAndRemoveNoLoginAction(request);\r\n\t\t\t\t\tURI uri = new URI(this.getRedirectUrl());\r\n\t\t\t\t\tList<NameValuePair> urlMap = URLEncodedUtils.parse(uri, \"UTF-8\");\r\n\t\t\t\t\tboolean login = true;\r\n\t\t\t\t\tfor (int i = 0; i < urlMap.size(); i++) {\r\n\t\t\t\t\t\tNameValuePair nameValuePair = urlMap.get(i);\r\n\t\t\t\t\t\tString namePair = nameValuePair.getName();\r\n\t\t\t\t\t\tif(null != namePair && namePair.endsWith(\"login\")){\r\n\t\t\t\t\t\t\tlogin = Boolean.parseBoolean(nameValuePair.getValue());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!JpSocialSystemConstants.NO_LOGIN.equals(currentAction) && login){\r\n\t\t\t\t\t\tUserDetails userDetails = new TwitterUser(id + this.getDomain(), name);\r\n\t\t\t\t\t\trequest.getSession().setAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER, userDetails);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJpSocialSystemUtils.saveTwitterCredentialsCookie(credentials, response, request);\r\n\t\t\t\t\t//log.info(\" MineTwitterConsumer REDIRECT URL \" + redirectUrl);\r\n\t\t\t\t\tif (null != this.getRedirectUrl() && this.getRedirectUrl().length() > 0) {\r\n\t\t\t\t\t\t//log.info(\" MineTwitterConsumer REDIRECT\");\r\n\t\t\t\t\t\tresponse.sendRedirect(this.getRedirectUrl());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//log.info(\" MineTwitterConsumer END \");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\ttwitterConsumerManager.handleException(e, request, response, consumer);\r\n\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t}", "private void doAgainAsk() {\n\t\tfinal int answerId = getIntent().getIntExtra(BUNDLE_PARAM_ANSWERID, -1);\n\t\tfinal String askToId = getIntent().getStringExtra(BUNDLE_PARAM_ASKTOUSERID);\n\t\tfinal int appItemid = getIntent().getIntExtra(BUNDLE_PARAM_APPITEMID, 0);\n\t\t// final String senderId =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERID);\n\t\t// final String senderName =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERNAME);\n\t\t// final String sendSource =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDSOURCE);\n\t\tUserInfo info = UserInfo.getInstance();\n\t\tif (!info.isLogin()) {\n\t\t\tLogger.error(\"replyanswer\", \"not login\");\n\t\t\treturn;\n\t\t}\n\t\tString content = etContent.getText().toString();\n\t\tif (StringUtils.isEmpty(content)) {\n\t\t\tshowToast(\"请输入提问内容\");\n\t\t\treturn;\n\t\t}\n\t\tcontent = mIAskListPresenter.handleInsertStock(content);\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"againaskUserid\", info.getUserId());\n\t\tparams.put(\"anwserId\", String.valueOf(answerId));\n\t\tparams.put(\"asktouserid\", askToId);\n\t\tparams.put(\"againaskUsername\", info.getUserName());\n\t\tparams.put(\"askid\", String.valueOf(appItemid));\n\t\tparams.put(\"source\", \"爱投顾手机客户端\");\n\t\tparams.put(\"content\", content);\n\t\t// etContent.setHint(\"输入您的提问。。。\");\n\t\t// doReply.setText(\"追问\");\n\n\t\tJsonRequest<TouguBaseResult> request = new JsonRequest<TouguBaseResult>(Method.POST, NetUrlMyInfo.AGAINASK, params, new RequestHandlerListener<TouguBaseResult>(getContext()) {\n\n\t\t\t@Override\n\t\t\tpublic void onStart(Request request) {\n\t\t\t\tsuper.onStart(request);\n\t\t\t\tshowDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onEnd(Request request) {\n\t\t\t\tsuper.onEnd(request);\n\t\t\t\thideDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String id, TouguBaseResult data) {\n\t\t\t\t// Toast.makeText(ReplyActivity.this, \"赞成功\",\n\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\tif (data.getRetCode() == 0) {\n\t\t\t\t\tIntent intent = new Intent(IAskListPresenter.ACTION_ASK_REFRESH);\n\t\t\t\t\tintent.putExtra(IAskListPresenter.BUNDLE_ASKID, appItemid);\n\t\t\t\t\tintent.putExtra(IAskListPresenter.BUNDLE_STATUS, IAskListPresenter.ANSWER_STATU_REASK);\n\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\tshowToast(\"追问成功\");\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\t// Toast.makeText(ReplyActivity.this, data.getMsg(),\n\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}, TouguBaseResult.class);\n\n\t\tsend(request);\n\t}", "public void onClickTwitt() {\n// if (isNetworkAvailable()) {\n// Twitt_Sharing twitt = new Twitt_Sharing(MainActivity.this,\n// StaticConstants.consumer_key, StaticConstants.secret_key);\n// //string_img_url = \"http://3.bp.blogspot.com/_Y8u09A7q7DU/S-o0pf4EqwI/AAAAAAAAFHI/PdRKv8iaq70/s1600/id-do-anything-logo.jpg\";\n// string_msg = \"\";\n// // here we have web url image so we have to make it as file to\n// // upload\n// //String_to_File(string_img_url);\n// // Now share both message & image to sharing activity\n// new Twitter_Handler(MainActivity.this, StaticConstants.consumer_key, StaticConstants.secret_key).resetAccessToken();\n// //twitt.shareToTwitter(string_msg, casted_image);\n// twitt.authenticateAndSaveAccessToken();\n//\n// } else {\n// showToast(\"No Network Connection Available ...\");\n// }\n final Context context = MainActivity.this;\n AlertDialog.Builder alert = new AlertDialog.Builder(context);\n\n alert.setTitle(\"Authenticate\");\n alert.setMessage(\"Enter you twitter account credentials.\");\n\n // Set an EditText view to get user input\n final EditText username = new EditText(context);\n username.setHint(\"Username\");\n username.setText(sharedPreferences.getString(StaticConstants.TWITTER_USERNAME_KEY, \"\"));\n final EditText password = new EditText(context);\n password.setInputType(129);\n password.setHint(\"Password\");\n password.setText(sharedPreferences.getString(StaticConstants.TWITTER_PASSWORD_KEY, \"\"));\n final TextView usernameLabel = new TextView(context);\n usernameLabel.setTextColor(Color.WHITE);\n usernameLabel.setText(\"Enter Twitter Username:\");\n final TextView passwordLabel = new TextView(context);\n passwordLabel.setTextColor(Color.WHITE);\n passwordLabel.setText(\"Enter Twitter Password:\");\n final TextView errmsgLabel = new TextView(context);\n errormsglabel = errmsgLabel;\n LinearLayout layout = new LinearLayout(context);\n layout.setOrientation(LinearLayout.VERTICAL);\n\n\n layout.addView(usernameLabel);\n layout.addView(username);\n layout.addView(passwordLabel);\n layout.addView(password);\n layout.addView(errmsgLabel);\n alert.setView(layout);\n\n alert.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n errmsgLabel.setText(\"\");\n String uname = username.getText().toString();\n String pwd = password.getText().toString();\n if(!isNetworkAvailable()){\n new ToastMessageTask().execute(\"Network not available. Please try again!\");\n onClickTwitt();\n return;\n }\n if(uname!=null && uname.length()!=0 &&pwd!=null && pwd.length()!=0){\n new OnClickTwittClass().execute(uname,pwd);\n }\n else{\n new ToastMessageTask().execute(\"Invalid username/password.Please add again.\");\n }\n }\n });\n\n alert.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n // Canceled.\n dialog.cancel();\n }\n });\n\n alert.show();\n }", "@Override\n public void run() {\n while (!tweets.empty()) {\n synchronized (tweets) {\n synchronized (status) {\n synchronized (tweetLog) {\n\n final String mention = tweets.pop();\n try {\n account.updateStatus(mention);\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n //To change body of implemented methods use File | Settings | File Templates.\n tweetLog.setText(tweetLog.getText() + tweets.size() + \" [\" + mention\n + \"] sent successfully from account @\" + account.screenName + \"\\n\");\n// frame.validate();\n// frame.pack();\n }\n });\n\n } catch (final TwitterException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n int inde = 0;\n String idArray[] = id.getText().split(\"\\\\r?\\\\n\");\n for (String el : idArray) {\n System.out.println(\"idarray: \" + el);\n if (el.compareTo(account.screenName) == 0)\n break;\n else\n inde++;\n }\n final int inde2 = inde;\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n\n AddFormWin.updateStateOfAccount(id, status, e.getErrorMessage(), account);\n //To change body of implemented methods use File | Settings | File Templates.\n tweetLog.setText(tweetLog.getText() + \"failed to send tweet '\" + mention +\n \"' From Account \" + account.screenName + \"due to error:[\" + e.getErrorMessage() + \"]\\n\");\n tweets.push(mention);\n }\n });\n AddFormWin.nThreads--;\n //if this was the last thread then show error message and the remaining tweets\n if (AddFormWin.nThreads == 0 && tweets.size() > 0)\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n //To change body of implemented methods use File | Settings | File Templates.\n String finalString = \"\";\n String str;\n while (true) {\n try {\n str = tweets.pop();\n finalString += (str + \"\\n\");\n } catch (Exception e) {\n break;\n }\n }\n AddFormWin.clearTweetStack();\n tweetLog.setText(tweetLog.getText() +\n \"\\nFailed to send the following tweets:\\n\" + finalString);\n JOptionPane.showMessageDialog(null, \"Tweet Sending Failed!\"\n , \"Failure!!\", JOptionPane.WARNING_MESSAGE);\n\n }\n });\n return;\n }\n\n }\n }\n }\n try {\n long sleepTime= (long)(sleepInterval + Math.random()*(sleepIntervalMax-sleepInterval));\n Thread.sleep(sleepTime);\n } catch (InterruptedException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n }\n AddFormWin.nThreads--;\n if (tweets.isEmpty())\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n //To change body of implemented methods use File | Settings | File Templates.\n String finalString = \"\";\n String str;\n while (true) {\n try {\n str = tweets.pop();\n finalString += (str + \"\\n\");\n } catch (Exception e) {\n break;\n }\n }\n tweetLog.setText(tweetLog.getText() + \"\\nFailed to send the following tweets:\\n\" + finalString);\n JOptionPane.showMessageDialog(null, \"All Tweets Sent Successfully!\", \"Success!!\", JOptionPane.WARNING_MESSAGE);\n }\n });\n\n }", "public void resumeRequests() {\n requestTracker.resumeRequests();\n }", "synchronized void flushQueueOnError(TwitterException error) {\n awaitingSession.set(false);\n\n while (!queue.isEmpty()) {\n final Callback request = queue.poll();\n request.failure(error);\n }\n }", "public void onConnectSpamDone() {\n loggingIn = false;\n }", "public void requestDone(Request request, boolean isSuccessful);", "private void hackStartTimeline() {\n\t\t\tIntent i = new Intent(TwitterService.SYNCH_ACTION);\n\t\t\ti.putExtra(\"synch_request\", TwitterService.SYNCH_LOGIN);\n\t\t\tregisterLoginReceiver();\n\t\t\tstartService(i);\n\t\t\tstartTimeline(getApplicationContext());\n\t\t}", "private void forgotPassword(final String usertext){\n\n // Tag used to cancel the request\n String cancel_req_tag = \"register\";\n progressbar.setVisibility(View.VISIBLE);\n\n\n StringRequest strReq = new StringRequest(Request.Method.POST, APIURLS.FORGOT_PASSWORD, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.e(\"TAG\", \"forgotpassword Response: \" + response.toString());\n //hideDialog();\n progressbar.setVisibility(View.GONE);\n try {\n JSONObject jObj = new JSONObject(response);\n Log.e(\"TAG\", \"json objec is \" + jObj);\n boolean error = jObj.getBoolean(\"error\");\n\n if (!error) {\n String mesage = jObj.getString(\"msg\");\n if (mesage.contains(\"Verification Code\")){\n final String code = jObj.getString(\"code\");\n final Dialog dialog = new Dialog(LoginActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.forgot_password_code);\n final EditText et_verification_code = (EditText) dialog.findViewById(R.id.et_verification_code);\n final Button bt_submit_for_forgot_pass = (Button) dialog.findViewById(R.id.bt_submit_for_forgot_pass);\n bt_submit_for_forgot_pass.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n String mCode = et_verification_code.getText().toString();\n\n Log.e(\"Tag\", \"the code is here \" + mCode);\n\n if (mCode.length()==0)\n {\n et_verification_code.setError(\"Should not be empty\");\n }\n else if (!mCode.matches(code))\n {\n et_verification_code.setError(\"Code Not Match\");\n }\n else {\n dialog.dismiss();\n dialogSettingNewPassword(usertext);\n }\n }\n });\n\n dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimationTooDouen;\n dialog.show();\n }\n\n } else {\n String errorMsg = jObj.getString(\"msg\");\n Toast.makeText(getApplicationContext(), errorMsg, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"TAG\", \"Registration Error: \" + error.getMessage());\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n //hideDialog();\n progressbar.setVisibility(View.GONE);\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting params to register url\n\n Map<String, String> params = new HashMap<String, String>();\n\n params.put(\"usercredentials\", usertext);\n\n return params;\n }\n };\n\n strReq.setRetryPolicy(new DefaultRetryPolicy(\n 20000,\n DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n // Adding request to request queue\n AppSingleton.getInstance(getApplicationContext()).addToRequestQueue(strReq, cancel_req_tag);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(!loggedIn){\n\t\t\t\t\tLog.d(\"POST FAILED\",\"NOT LOGGED IN\");\n\t\t\t\t}\n\t\t\t\tTweet tweet = new Tweet(text);\n\t\t\t\tTweetER ter = TweetER.getInstance(accntMgr);\n\t\t\t\ttry {\n\t\t\t\t\ttweet = ter.post(tweet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (LimitExceededException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "private void logout(){\n showLoadingDialog();\n TwitterController.getInstance().logout(logoutCallback);\n }", "private void cancelFetch() {\n cancelOperation(QUERY_NEW_CALLS_TOKEN);\n cancelOperation(QUERY_OLD_CALLS_TOKEN);\n }", "public void customLoginTwitter(View view) {\n if (getTwitterSession() == null) {\n\n //if user is not authenticated start authenticating\n client.authorize(getActivity(), new Callback<TwitterSession>() {\n @Override\n public void success(Result<TwitterSession> result) {\n // Do something with result, which provides a TwitterSession for making API calls\n TwitterSession twitterSession = result.data;\n fetchTwitterAccount();\n dismiss();\n }\n\n @Override\n public void failure(TwitterException e) {\n // Do something on failure\n Toast.makeText(getActivity().getApplicationContext(), \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n //if user is already authenticated direct call fetch twitter email api\n Toast.makeText(getActivity().getApplicationContext(), \"User already authenticated\", Toast.LENGTH_SHORT).show();\n }\n }", "private void logoutFromTwitter() {\n // Clear the shared preferences\n Editor e = mSharedPreferences.edit();\n e.remove(PREF_KEY_OAUTH_TOKEN);\n e.remove(PREF_KEY_OAUTH_SECRET);\n e.remove(PREF_KEY_TWITTER_LOGIN);\n e.commit();\n\n // After this take the appropriate action\n // I am showing the hiding/showing buttons again\n // You might not needed this code\n btnLogoutTwitter.setVisibility(View.GONE);\n btnSaveUser.setVisibility(View.GONE);\n txtUserEmail.setVisibility(View.GONE);\n txtUserDataBorn.setVisibility(View.GONE);\n txtUserGender.setVisibility(View.GONE);\n lblUserName.setText(\"\");\n lblGender.setVisibility(View.GONE);\n lblEmail.setVisibility(View.GONE);\n lblBorn.setVisibility(View.GONE);\n lblUserName.setVisibility(View.GONE);\n lblUserDescription.setVisibility(View.GONE);\n\n\n btnLoginTwitter.setVisibility(View.VISIBLE);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n SharedPreferences settings = getSharedPreferences(\"twit\", 0);\n String key = settings.getString(\"accesstoken0\", null);\n String secret = settings.getString(\"accesstoken1\", null);\n final Button btnsetpin = (Button)findViewById(R.id.btnpin);\n final Button btnupdate = (Button)findViewById(R.id.btnupdate);\n final EditText status = (EditText)findViewById(R.id.status);\n \n \n if(key==null)\n { \n\t oauthClient = new OAuthSignpostClient(JTWITTER_OAUTH_KEY, jTWITTER_OAUTH_SECRET, \"oob\");\n\t URI uri = oauthClient.authorizeUrl();\n\t status.setVisibility(View.INVISIBLE);\n\t btnupdate.setVisibility(View.INVISIBLE);\n\t \n\t final Dialog dialog = new Dialog(this);\n\t dialog.setContentView(R.layout.twdialog);\n\t WebView wv = (WebView)dialog.findViewById(R.id.webtweet);\n\t wv.loadUrl(uri.toString());\n\t btnsetpin.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n });\n\n\t\t\tfinal EditText nilaipin = (EditText)dialog.findViewById(R.id.pin);\n\t\t\tnilaipin.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tnilaipin.setText(\"\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t\tButton btnok = (Button)dialog.findViewById(R.id.btntweet);\n\t\t\tbtnok.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tpin=nilaipin.getText().toString();\n\t\t\t\t\tsetpin=true;\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\tstatus.setVisibility(View.VISIBLE);\n\t\t\t \tbtnsetpin.setVisibility(View.INVISIBLE);\n\t\t\t \tbtnupdate.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\n });\n\n }\n else\n {\n \t oauthClient = new OAuthSignpostClient(JTWITTER_OAUTH_KEY, jTWITTER_OAUTH_SECRET, key, secret);\n \t twitter = new Twitter(\"nuraini\", oauthClient);\n \t setpin = false;\n \t status.setVisibility(View.VISIBLE);\n \t btnsetpin.setVisibility(View.INVISIBLE);\n \t btnupdate.setVisibility(View.VISIBLE);\n \t btnupdate.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\ttwitter.setSource(\"keyrani\");\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\ttwitter.updateStatus(status.getText().toString());\n\t\t\t\t\t\t\n\t\t\t\t\t}catch (Repetition e) {\n\t\t\t\t\t\t Toast.makeText(TwitUpdate.this, \"status tdk boleh sama\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\n });\n \t \n }\n \n \n \n \n }", "@Test\n\t\tpublic void createTweet() {\n\t\t\t\n\t\t\tRestAssured.baseURI=\"https://api.twitter.com/1.1/statuses\";\n\t\t\tResponse res=given().auth().oauth(ConsumerKey,ConsumerSecret,Token,TokenSecret).\n\t\t\tqueryParam(\"status\",\"I am learning API testing using RestAssured Java #Qualitest\").\n\t\t\twhen().post(\"/update.json\").then().extract().response();\n\t\t\t\n\t\t\tString responseString=res.asString();\n\t\t\t//System.out.println(responseString);\n\t\t\tlog.info(responseString);\n\t\t \n\t\t\tJsonPath js=new JsonPath(responseString);\n\t\t\tString id=js.get(\"id\").toString();\n\t\t\tlog.info(id);\n\t\t\tString text=js.get(\"text\").toString();\n\t\t\tlog.info(text);\n\t\t \n\t\t\t\n//\t\t\tString responseString=res.asString();\n//\t\t\tlog.info(responseString);\n//\t\t \n//\t\t\tJsonPath js=new JsonPath(responseString);\n//\t\t\tString id=js.get(\"id\").toString();\n//\t\t\tlog.info(id);\n//\t\t\tString text=js.get(\"text\").toString();\n//\t\t\tlog.info(text);\n//\t\t \n\t\t}", "public void tweetButton() {\n ReusableActionsPageObjects.clickOnElement(driver, tweetButton, logger, \"tweet.\");\n }", "synchronized public void requestDone(Request request, boolean isSuccessful)\n {\n runningRequest = null;\n runNextRequest();\n }", "@Path(\"clear\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Response clearTweets()\r\n {\r\n log.debug(\"GET: clearTweets\");\r\n if (store == null)\r\n {\r\n initializeStore();\r\n }\r\n store.empty();\r\n return Response.ok().build();\r\n }", "private void twitterStream(ServerAccess sa, String search, String geocode, \r\n int max) throws IOException {\r\n final TwitterStream twitterStream = \r\n new TwitterStreamFactory(getAuth()).getInstance();\r\n final Count count = new Count(max);\r\n \r\n final StatusListener listener = new StatusListener() {\r\n @Override\r\n public void onStatus(Status status) {\r\n count.increment();\r\n try {\r\n sa.addTweet(new TweetEntity(status, search));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n try {\r\n sa.addUser(new UserEntity(status.getUser()));\r\n } catch (UnsupportedEncodingException ex) {\r\n }\r\n \r\n if (Abort.getInstance().abort() || count.isMax()) {\r\n Abort.getInstance().setAbort(false);\r\n twitterStream.shutdown();\r\n }\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\r\n //System.out.println(\"Got a status deletion notice id:\" + statusDeletionNotice.getStatusId());\r\n }\r\n\r\n @Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\r\n //System.out.println(\"Got track limitation notice:\" + numberOfLimitedStatuses);\r\n }\r\n\r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n //System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n\r\n @Override\r\n public void onStallWarning(StallWarning warning) {\r\n //System.out.println(\"Got stall warning:\" + warning);\r\n }\r\n\r\n @Override\r\n public void onException(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n };\r\n twitterStream.addListener(listener);\r\n FilterQuery filterquery = new FilterQuery();\r\n //filterquery.count(500);\r\n //String[] searchwords = {\"voetbal\", \"tennis\", \"basketbal\"};\r\n //filterquery.track(searchwords);\r\n final List<String> alts = relations.get(search);\r\n final String[] altsGeo = new String[alts.size()];\r\n for (int i = 0; i < alts.size(); i++) {\r\n altsGeo[i] = alts.get(i) + \" \" + geocode;\r\n }\r\n filterquery.track(altsGeo);\r\n twitterStream.filter(filterquery);\r\n twitterStream.sample();\r\n }", "@Override\n public void success(Result<TwitterSession> result) {\n String username=result.data.getUserName();\n\n Toast.makeText(MainActivity.this,\"Hi.. \"+username,Toast.LENGTH_LONG).show();\n\n\n TwitterSession session = TwitterCore.getInstance().getSessionManager()\n .getActiveSession();\n\n Intent intent = new Intent(MainActivity.this,ComposeTweetActivity.class);\n\n startActivity(intent);\n\n /* TwitterSession session = TwitterCore.getInstance().getSessionManager()\n .getActiveSession();\n\n Intent intent = new ComposerActivity.Builder(MainActivity.this)\n .session(session)\n .createIntent();\n startActivity(intent); */\n\n\n\n\n }", "public void updateRequest() {\n isProcessing = true;\n // prepare the Request\n JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n isConnected = true;\n try {\n\n JSONObject variables = response.getJSONObject(\"variables\");\n int tuneMode = variables.getInt(\"tune_mode\");\n int gear = variables.getInt(\"gear\");\n String deviceName = response.getString(\"name\");\n deviceName += \" \";\n deviceName += response.getString(\"id\");\n device = deviceName;\n char pos = (char) gear;\n String serial = variables.getString(\"sn\");\n\n if (tuneMode == 255) {\n tvTune.setText(\"TUNE: E\");\n } else {\n tvTune.setText(\"TUNE: \" + tuneMode);\n }\n tvGear.setText(\"GEAR: \" + pos);\n\n proVersion.setText(deviceName);\n serialNum.setText(serial);\n\n\n } catch (JSONException mE) {\n mE.printStackTrace();\n }\n isProcessing = false;\n }\n },\n new Response.ErrorListener()\n\n {\n @Override\n public void onErrorResponse(VolleyError error) {\n isConnected = false;\n\n new SweetAlertDialog(SettingsActivity.this, SweetAlertDialog.WARNING_TYPE)\n .setTitleText(\"No Connection\")\n .setContentText(\"Your are not connected to a GDP device. Retry by \" +\n \"tapping 'Retry' or check your wifi settings by tapping \" +\n \"'Connect'.\")\n .setCancelText(\"Retry\")\n .setConfirmText(\"Connect\")\n .showCancelButton(true)\n .setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() {\n @Override\n public void onClick(SweetAlertDialog sDialog) {\n sendRequest();\n sDialog.dismiss();\n }\n })\n .setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {\n @Override\n public void onClick(SweetAlertDialog sDialog) {\n startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));\n }\n })\n .show();\n\n isProcessing = false;\n }\n }\n );\n // add it to the RequestQueue\n queue.add(getRequest);\n }", "@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}", "protected void checkForFirstRequest() throws IOException {\n if(firstRequest) {\n while (!connected || (serveResponse = in.readLine()).isEmpty());\n firstRequest = false;\n }\n }", "public void postTweet(int userId, int tweetId) {\n tweets.put(tweetId, idx++);\n LinkedList<Integer> tweets = userToTwitter.computeIfAbsent(userId, e -> new LinkedList<>());\n tweets.addLast(tweetId);\n while (tweets.size() > 10) {\n tweets.removeFirst();\n }\n }", "public void finishedAllRequests() {\n hasMoreRequests = false;\n }", "private void expectTweetsIgnored() {\n tweetDAO.save(anyObject());\n }", "public void sendYo(final SuccessCallback callback, final String username, final String url) throws NoApiKeyException {\n if (app.getApiKey() == null) {\n throw new NoApiKeyException();\n }\n new Thread(new Runnable() {\n @Override\n public void run() {\n sendGenericApiRequest(\"https://api.justyo.co/yo/\", app.getApiKey(), username, url, callback);\n }\n }).start();\n }", "public JsonHttpResponseHandler getComposeTweetHandler(final Context context, final List<Tweet> tweets, final TweetAdapter adapter, final RecyclerView rvTweets) {\n JsonHttpResponseHandler handler = new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Log.d(\"TwitterClient\", response.toString());\n\n // Get the tweet id from the response.\n try {\n Tweet tweet = Tweet.fromJson(response);\n tweets.add(0, tweet);\n adapter.notifyItemInserted(0);\n rvTweets.scrollToPosition(0);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"TwitterClient\", response.toString());\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"TwitterClient\", responseString);\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n }\n };\n\n return handler;\n }", "void makeTweet(OnTweetPostListener onTweetPostListener);", "public void fetchTwitterAccount() {\n //check if user is already authenticated or not\n if (getTwitterSession() != null) {\n\n Log.d(TAG, \"Testing5\");\n\n //fetch twitter image with other information if user is already authenticated\n\n //initialize twitter api client\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n\n //Link for Help : https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials\n\n //pass includeEmail : true if you want to fetch Email as well\n Call<User> call = twitterApiClient.getAccountService().verifyCredentials(true, false, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> result) {\n User user = result.data;\n\n Log.d(TAG, \"Testing6 \" + user.toString());\n\n String imageProfileUrl = user.profileImageUrl;\n\n //NOTE : User profile provided by twitter is very small in size i.e 48*48\n //Link : https://developer.twitter.com/en/docs/accounts-and-users/user-profile-images-and-banners\n //so if you want to get bigger size image then do the following:\n imageProfileUrl = imageProfileUrl.replace(\"_normal\", \"\");\n\n String twitter_username, twitter_email, twitter_image;\n\n twitter_username = user.name;\n twitter_email = user.email;\n twitter_image = imageProfileUrl;\n\n Log.d(\"Twitter user data\", \"Data : \" + twitter_image + \", \" + twitter_username + \", \" + twitter_email);\n }\n\n @Override\n public void failure(TwitterException exception) {\n Log.d(TAG, \"Testing7\");\n\n Toast.makeText(getContext(), \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n Log.d(TAG, \"Testing8\");\n\n //if user is not authenticated first ask user to do authentication\n Toast.makeText(getContext(), \"First to Twitter auth to Verify Credentials.\", Toast.LENGTH_SHORT).show();\n }\n\n }", "private long getTweets(String search, String geocode, Configuration auth) {\r\n TwitterFactory tf = new TwitterFactory(auth);\r\n Twitter twitter = tf.getInstance();\r\n \r\n try {\r\n Query query = new Query(search + \" \" + geocode);\r\n query.setSinceId(starttime);\r\n QueryResult result;\r\n \r\n for (int i = 0; i < blocks; i++) {\r\n if (Abort.getInstance().abort()) {\r\n return -1;\r\n }\r\n \r\n result = twitter.search(query);\r\n \r\n synchronized (this) {\r\n if (!tweets.containsKey(search)) {\r\n tweets.put(search, new HashSet());\r\n }\r\n tweets.get(search).addAll(result.getTweets());\r\n }\r\n \r\n //updateCommon(result.getTweets());\r\n //searched.add(search.toLowerCase());\r\n query.setSinceId(starttime + i * blocks15);\r\n }\r\n } catch (TwitterException te) {\r\n System.out.println(\"Failed to search tweets: \" + te);\r\n System.out.println(\"\\nRetry at: \" + \r\n (new Date(te.getRateLimitStatus()\r\n .getResetTimeInSeconds() * 1000L)));\r\n return te.getRateLimitStatus().getSecondsUntilReset() * 1000L;\r\n }\r\n return 0;\r\n }", "@Override\n public void onTweetsFetched(List<Tweet> tweets) {\n finalTweetID = tweets.get(tweets.size() - 1).getId();\n twitterCallback.onTweetsFetched(tweets); //Return tweets\n }", "public void pauseRequests() {\n requestTracker.pauseRequests();\n }", "private void retryCall() {\n MyViewModel factory = new MyViewModel(this.getApplication(), Integer.toString(ids));\n weatherViewModel = new ViewModelProvider(this, factory).get(WeatherViewModel.class);\n weatherViewModel.init();\n weatherViewModel.getWeatherRepo().observe(this, this::getResponsFromLiveData);\n }", "public void quitter() {\n\t\ttry {\n\t\t\tthis.clientSocket.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"erreur lors de la déconnexion R\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void weather() {\n\t\t// System.out.println(\"Sending weather information via Twitter.\");\n\t\t// TwitterComm.sendDirectMessage(Constants.AUTH_USER,\n\t\t// Alfred.getYrParser()\n\t\t// .getWeatherReport().twitterForecastToString());\n\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\tStaticString.information = null;// 判断回复信息之间清空之前信息\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\tSocketConnet.getInstance().communication(888,new String[]{mLogsIndexNumber});\r\n\t\t\t\tif (ReplyParser.waitReply()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "private void resendWorkaround() {\r\n synchronized(waiters) {\r\n if(waiters.size() > 0 && lastResponseNumber == responseNumber && System.currentTimeMillis() - lastProcessedMillis > 450) {\r\n // Resend last request(s)\r\n for(Integer i : waiters.keySet()) {\r\n System.err.println(Thread.currentThread() + \": Resending: $\" + i + \"-\" + waiters.get(i));\r\n writer.println(\"$\" + i + \"-\" + waiters.get(i));\r\n writer.flush();\r\n lastProcessedMillis = System.currentTimeMillis();\r\n }\r\n }\r\n }\r\n }", "@Override\n public void failure(RetrofitError error) {\n Log.d(TAG, String.valueOf(error));\n WearSocket.getInstance().sendMessage(Values.MESSAGE_PATH, \"Error: \" + phrase + \" didn't work\");\n }", "@Override\n\t\tpublic boolean isRetry() { return false; }", "public Twitter() {\n\t\t\tuserMap = new HashMap<>();\n\t\t\tmaxFeed = 10;\n\t\t}" ]
[ "0.6385953", "0.5947599", "0.587999", "0.58203465", "0.5809082", "0.5757113", "0.5711573", "0.5705922", "0.5684679", "0.5682896", "0.5678947", "0.5651881", "0.5633971", "0.56210035", "0.5614251", "0.5602212", "0.55962974", "0.5589657", "0.5565748", "0.55511814", "0.5541246", "0.55239314", "0.54788274", "0.5476592", "0.5470502", "0.5463273", "0.54481685", "0.54079723", "0.5407823", "0.54028785", "0.5394826", "0.53784555", "0.5366408", "0.53574646", "0.5330904", "0.53155243", "0.5289379", "0.527495", "0.52723986", "0.52507305", "0.52420056", "0.5241264", "0.52392954", "0.5234404", "0.52253276", "0.5221994", "0.5216482", "0.5201994", "0.51965547", "0.5183893", "0.51805264", "0.5164104", "0.5162527", "0.5138054", "0.51343787", "0.5109191", "0.5109029", "0.51037556", "0.5102808", "0.5094985", "0.5089212", "0.50842935", "0.5077884", "0.50769395", "0.50680286", "0.5063236", "0.5060745", "0.50473255", "0.5036716", "0.5032514", "0.50199014", "0.5013723", "0.5007224", "0.5001762", "0.5000414", "0.49995512", "0.49895886", "0.49827862", "0.49804407", "0.49708006", "0.4968905", "0.49607393", "0.4958942", "0.49539182", "0.49531114", "0.49525392", "0.4947965", "0.49437737", "0.49407634", "0.49283227", "0.4923154", "0.49134618", "0.4913207", "0.49063733", "0.49059078", "0.49032542", "0.4900224", "0.4898693", "0.48969424", "0.48954022" ]
0.5337423
34
creert de 'blok' objecten die later aan het doolhof worden toegevoegd
private void createBlocks(){ for (int row=0; row < grid.length; row++) { for (int column=0; column < grid[row].length; column++) { boolean player = false; boolean walkable; switch (grid[row][column]){ case(0) : returnImage = wall; walkable = false; break; case(2) : returnImage = start; walkable = true; player = true; break; case(4) : returnImage = finish; walkable = true; break; default : returnImage = pad; walkable = false; } Block blok; try { if(player==true) { blok = new Block(returnImage, blockSize, true); blok.setTopImage(held); }else { blok = new Block(returnImage, blockSize, false); } blocks.add(blok); } catch (Exception e) { } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boleta(){\r\n\t\tsuper();\r\n\t}", "BOp createBOp();", "public Billfold()\n {\n \n }", "public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "private static Bala tipoBala(int idPj, Vector2 posicionRelativaRecibido, int tamanoBala) {\n Bala bala;\n Array<TextureRegion> arrayTexturas = Util.ficherosEnDirectorio(Gdx.files.internal(\"Balas/\" + idPj));\n switch (idPj) {\n //Balas con forma rectangular\n case 1:\n case 4:\n case 7:\n bala = new BalaRect(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n //Balas con forma circular\n case 2:\n bala = new BalaCirc(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n //Balas con forma poligonal\n case 3:\n case 5:\n case 6:\n case 8:\n case 9:\n case 10:\n bala = new BalaPol(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n default:\n arrayTexturas = Util.ficherosEnDirectorio(Gdx.files.internal(\"Balas/1\"));\n bala = new BalaRect(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n }\n return bala;\n }", "public void createBike() {\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "@Test\n public void bateauAtBateau() {\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 Grille g = new Grille(10, 10, j, p);\n\n Bateaux ba = new ContreTorpilleur(new Place[]{new Place(\"A5\")}, j, p, true);\n g.setListBateaux(Collections.singletonList(ba));\n\n Bateaux b = j.bateauAt(new Place(\"A5\"), g);\n\n assertEquals(\"Il n'y a pas de bateau ici\", ba, b);\n }", "private void insertBoger() {\r\n\t\tEmne emne;\r\n\t\tBog bog;\r\n\t\tForfatter forfatter;\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-1\", emne, 2001,2);\r\n\t\tforfatter = _database.getForfatter().get(0);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-2\", emne, 2002,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(1);\r\n\t\tbog = new BogEksemplar(\"Titel-3\", emne, 2003,1);\r\n\t\tforfatter = _database.getForfatter().get(1);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t\temne = _database.getEmne().get(0);\r\n\t\tbog = new BogEksemplar(\"Titel-4\", emne, 2001,1);\r\n\t\tforfatter = _database.getForfatter().get(2);\r\n\t\tbog.addForfatter(forfatter);\r\n\t\t_database.addBog(bog);\r\n\t\t\r\n\t}", "private void initBoutons() {\n bMonterDomaine.setText(null);\n bMonterCompte.setText(null);\n bDescendreDomaine.setText(null);\n bDescendreCompte.setText(null);\n bMonterDomaineMax.setText(null);\n bMonterCompteMax.setText(null);\n bDescendreDomaineMax.setText(null);\n bDescendreCompteMax.setText(null);\n bAjoutDomaine.setText(null);\n bAjoutCompte.setText(null);\n bModificationDomaine.setText(null);\n bModificationCompte.setText(null);\n bSuppressionDomaine.setText(null);\n bSuppressionCompte.setText(null);\n\n // Tootips\n bMonterDomaine.setTooltip(new Tooltip(\"Monter le domaine sélectionné d'une place\"));\n bMonterCompte.setTooltip(new Tooltip(\"Monter le compte sélectionné d'une place\"));\n bDescendreDomaine.setTooltip(new Tooltip(\"Descendre le domaine sélectionné d'une place\"));\n bDescendreCompte.setTooltip(new Tooltip(\"Descendre le compte sélectionné d'une place\"));\n bMonterDomaineMax.setTooltip(new Tooltip(\"Monter le domaine sélectionné jusqu'en première place\"));\n bMonterCompteMax.setTooltip(new Tooltip(\"Monter le compte sélectionné jusqu'en première place\"));\n bDescendreDomaineMax.setTooltip(new Tooltip(\"Descendre le domaine sélectionné jusqu'en dernière place\"));\n bDescendreCompteMax.setTooltip(new Tooltip(\"Descendre le compte sélectionné jusqu'en dernière place\"));\n bAjoutDomaine.setTooltip(new Tooltip(\"Ajouter un nouveau domaine\"));\n bAjoutCompte.setTooltip(new Tooltip(\"Ajouter un nouveau compte\"));\n bModificationDomaine.setTooltip(new Tooltip(\"Modifier le domaine sélectionné\"));\n bModificationCompte.setTooltip(new Tooltip(\"Modifier le compte sélectionné\"));\n bSuppressionDomaine.setTooltip(new Tooltip(\"Supprimer le domaine sélectionné\"));\n bSuppressionCompte.setTooltip(new Tooltip(\"Supprimer le compte sélectionné\"));\n\n // Gestion des activations de boutons\n bMonterDomaine.setDisable(true);\n bMonterCompte.setDisable(true);\n bDescendreDomaine.setDisable(true);\n bDescendreCompte.setDisable(true);\n bMonterDomaineMax.setDisable(true);\n bMonterCompteMax.setDisable(true);\n bDescendreDomaineMax.setDisable(true);\n bDescendreCompteMax.setDisable(true);\n bAjoutCompte.setDisable(true);\n bModificationDomaine.setDisable(true);\n bModificationCompte.setDisable(true);\n bSuppressionDomaine.setDisable(true);\n bSuppressionCompte.setDisable(true);\n\n // Setup les images\n bMonterDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_UP, 16, 16, true));\n bMonterCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_UP, 16, 16, true));\n bDescendreDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOWN, 16, 16, true));\n bDescendreCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOWN, 16, 16, true));\n bMonterDomaineMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_UP, 16, 16, true));\n bMonterCompteMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_UP, 16, 16, true));\n bDescendreDomaineMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_DOWN, 16, 16, true));\n bDescendreCompteMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_DOWN, 16, 16, true));\n bAjoutDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_ADD, 16, 16, true));\n bAjoutCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_ADD, 16, 16, true));\n bModificationDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_INFO, 16, 16, true));\n bModificationCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_INFO, 16, 16, true));\n bSuppressionDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n bSuppressionCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n\n // Cas particulier: ecraserFiltre\n bEcraserFiltre.setText(null);\n bEcraserFiltre.setTooltip(new Tooltip(\"Retirer le filtre\"));\n bEcraserFiltre.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n }", "public Boop() {\n\t\tsuper();\n\t}", "protected GuiTestObject bungalow() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"bungalow\"));\n\t}", "public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}", "public void bajarBloque() {\n\t\tif (piezaActual != null) {\n\t\t\tif (Mapa.getInstance().estaLibre(piezaActual.getBloque3().getX(),\n\t\t\t\t\tpiezaActual.getBloque3().getY() + 1)) {\n\t\t\t\tpiezaActual.getBloque3().bajar(); // Dejar en ese orden\n\t\t\t\tpiezaActual.getBloque2().bajar();\n\t\t\t\tpiezaActual.getBloque1().bajar();\n\t\t\t} else {\n\t\t\t\tthis.piezaNueva();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic Bloco0 criarBloco(MovimentoMensalIcmsIpi movimentoMensalIcmsIpi) {\n\t\tLOG.log(Level.INFO, \"Montando o BLOCO 0, com INICIO em: {0} e TERMINO: {1} \", movimentoMensalIcmsIpi.getDataInicio());\r\n\t\tBloco0 bloco0 = new Bloco0();\r\n\t\t\r\n\t\t/**\r\n\t\t * TODO (Para ver/pensar melhor)\r\n\t\t * Ver se eu tenho que fazer alguma validação aqui. Ex.: irá preecher registro X para aquele Mês?\r\n\t\t * Tentar capturar possiveis erros.: Ex o famosão -> @NullPointerException\r\n\t\t */\r\n\t\t\r\n\t\tbloco0.setReg0000(reg0000Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0001(reg0001Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0005(reg0005Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0100(reg0100Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0150(reg0150Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0190(reg0190Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0200(reg0200Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0400(reg0400Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0450(reg0450Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0460(reg0460Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0990(montarEncerramentoDoBloco0(bloco0));\r\n\t\t\r\n\t\tLOG.log(Level.INFO, \"Montagem do BLOCO 0, TEMINADA! {0} \" ,bloco0);\r\n\t\treturn bloco0;\r\n\t}", "private void inizializzaBatteri(Vector<Class> classi) {\n batteri = new LinkedList<>();\n Random r = new Random();\n numeroBatteri = new HashMap<>();\n coloreBatteri = new HashMap<>();\n nomiBatteri = new ArrayList<>();\n\n int count = 0;\n for (Class batterio : classi) {\n nomiBatteri.add(batterio.getSimpleName());\n\n for (int i = 0; i < NUM_BATTERI; i++)\n try {\n batteri.add((Batterio) batterio.getConstructors()[0].newInstance(r.nextInt(food.getWidth()),\n r.nextInt(food.getHeight()),\n COLORS[count], food));\n\n numeroBatteri.put(batterio.getSimpleName(), NUM_BATTERI);\n coloreBatteri.put(batterio.getSimpleName(), COLORS[count]);\n } catch (Exception e) {\n System.err.println(\"Non e' stato possibile istanziare il batterio \" + batterio.getSimpleName());\n }\n\n count++;\n }\n }", "public void agregarBodega(String nombre_bodega){\n Nodo_Bodega Nueva_bodega = new Nodo_Bodega(Size,nombre_bodega);\n if(Nodo_bodega_inicial==null){\n Nodo_bodega_inicial = Nueva_bodega;\n Nodo_bodega_final = Nueva_bodega;\n Nodo_bodega_actual = Nueva_bodega;\n }else{\n Nueva_bodega.definirAnterior(Nodo_bodega_final);\n Nodo_bodega_final.definirSiguiente(Nueva_bodega);\n Nodo_bodega_final = Nueva_bodega;\n }\n Size++;\n }", "public CTematicaBienestar() {\r\n\t}", "public Vrachtwagen(String merk, int bouwjaar, String kleur, double lading) {\r\n//\t\thaalt de variabelen op van de class voertuig\r\n\t\tsuper(merk, bouwjaar, kleur);\r\n//\t\tgeeft de lading een waarde \r\n\t\tthis.lading = lading;\r\n\t}", "public TotalBayar()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n \n List list = new List();\n addObject(list, 300, 60);\n \n List1 list1 = new List1();\n addObject(list1, 300, 120);\n \n /*List2 list2 = new List2();\n addObject(list2, 300, 170);\n \n List3 list3 = new List3();\n addObject(list3, 300, 220);\n \n List4 list4 = new List4();\n addObject(list4, 300, 270);\n */\n Kembali kembali = new Kembali();\n addObject(kembali, 300, 350);\n }", "public Bike(){\n\t}", "public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }", "public Utleievindu(Boligregister br, Bolig blg, Resultatbolk rb)\n {\n super(\"Utleie\");\n setSize(700,400);\n register = br;\n resultatbolken = rb;\n boligen = blg;\n\n /********* DEFINERING AV KOMPONENTER START *********/\n Lytter lytter = new Lytter();\n leiut = new JButton(\"Lei ut\");\n leiut.addActionListener(lytter);\n avbryt = new JButton(\"Avbryt\");\n avbryt.addActionListener(lytter);\n JLabel lstartDato = new JLabel(\"Start dato: \");\n lsluttDato = new JLabel(\"Slutt dato: \");\n JLabel ldato = new JLabel(\"<html>Dato format: dd/MM/yyyy<br>eks: 21/06/2010</html>\");\n JTextField startDato = new JTextField(9);\n startDato.setEditable(false);\n startDato.setText(tilStandardDatostreng(Calendar.getInstance()));\n sluttDato = new JTextField(9);\n /********* DEFINERING AV KOMPONENTER SLUTT *********/\n\n /********* POPULERING AV LISTER START *********/\n bModel = new DefaultListModel<>();\n bList = new JList<>(bModel);\n Font IKKEFET = new Font(Font.SANS_SERIF, Font.PLAIN, 12);\n bList.setFont(IKKEFET);\n oppdaterJliste();\n /********* POPULERING AV LISTER SLUTT *********/\n\n\n /********* LAYOUT START *********/\n JScrollPane bScrollPane = new JScrollPane();\n bScrollPane.setBorder(BorderFactory.createTitledBorder(\"<html>BOLIGS&Oslash;KERE</html>\"));\n bScrollPane.setViewportView(bList);\n bScrollPane.setPreferredSize(new Dimension(450, 200));\n\n\n JPanel sokere = new JPanel(new BorderLayout());\n sokere.add(bScrollPane, BorderLayout.CENTER);\n JPanel sokerknapper = new JPanel(new BorderLayout());\n JPanel innerknappepanel = new JPanel(new GridBagLayout());\n GridBagConstraints gc666 = new GridBagConstraints();\n gc666.fill = GridBagConstraints.HORIZONTAL;\n gc666.gridy = 0;\n gc666.insets.bottom = 5;\n gc666.insets.left = 2;\n ny = new JButton(\"Ny...\");\n ny.addActionListener(lytter);\n ny.setPreferredSize(new Dimension(ny.getWidth(), 18));\n detaljer = new JButton(\"Detaljer\");\n detaljer.addActionListener(lytter);\n innerknappepanel.add(ny, gc666);\n gc666.gridy = 1;\n innerknappepanel.add(detaljer, gc666);\n sokerknapper.add(innerknappepanel, BorderLayout.NORTH);\n sokere.add(sokerknapper, BorderLayout.EAST);\n\n setLayout(new GridBagLayout());\n\n GridBagConstraints gc = new GridBagConstraints();\n gc.anchor = GridBagConstraints.NORTHWEST;\n\n gc.gridx = 0;\n gc.gridy = 0;\n\n gc.insets.left = 2;\n add(sokere, gc);\n\n gc.anchor = GridBagConstraints.CENTER;\n gc.gridy = 1;\n add(ldato,gc);\n JPanel pDato = new JPanel();\n pDato.add(lstartDato);\n pDato.add(startDato);\n\n pDato.add(lsluttDato);\n pDato.add(sluttDato);\n gc.anchor = GridBagConstraints.CENTER;\n gc.gridy = 2;\n add(pDato,gc);\n\n JPanel knappepanel = new JPanel();\n knappepanel.add(leiut);\n knappepanel.add(avbryt);\n\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets.top = 10;\n gc.gridy = 3;\n add(knappepanel, gc);\n setLocationRelativeTo(null);\n setVisible(true);\n /********* LAYOUT SLUTT *********/\n }", "private static List<Billetes> generarBilletes(String fecha, Pasajero p){\n\t\tList<Billetes> billetes = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tBilletes billete = new Billetes();\n\t\t\tbillete.setId(i);\n\t\t\tbillete.setFecha(fecha);\n\t\t\t\n\t\t\tchar c1 = (char)new Random().nextInt(50);\n\t\t\tchar c2 = (char)new Random().nextInt(50);\n\t\t\t\n\t\t\t/*\n\t\t\t * \n\t\t\t */\n\t\t\tbillete.setAsiento(\"\" + c1 + c2 + new Random().nextInt(100) + new Random().nextInt(50));\n\t\t\tbillete.setPasajero(p); \n\t\t\tbillete.setVuelo(p.getVuelos().get(new Random().nextInt(p.getVuelos().size())));\n\t\t\t\n\t\t\tbilletes.add(billete);\n\t\t}\n\t\t\n\t\treturn billetes;\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}", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public void reestablecerFullStock() { \n bodega Bodega = new bodega();\n Bodega.setProductosList(this.bodegaDefault());\n }", "public Kullanici() {}", "@Override\n public void create_building(ArrayList bulding){\n House house = new House(Adress.RUE_DE_LA_PAIX);\n System.out.println(\"Vous venez de créer une maison\");\n bulding.add(house);\n }", "private void createObstacole()\n {\n //Create Obstacole\n Obstacole topObstacole = new Obstacole(\"top\");\n Obstacole botObstacole = new Obstacole(\"bottom\");\n Obstacole midObstacole = new Obstacole(\"mid\");\n //amount of space between obstacole\n int ObstacoleSpacing = 150;\n \n //get object image\n GreenfootImage image = botObstacole.getImage();\n \n //random number to vary\n int numOfObstacoles = Greenfoot.getRandomNumber(40) + 15;\n \n //counter increment to 50\n ObstacoleCounter++;\n if (ObstacoleCounter == 50)\n {\n if (getObjects(Obstacole.class).size() < numOfObstacoles)\n {\n addObject(botObstacole, getWidth(), getHeight() / 2 + image.getHeight() - Greenfoot.getRandomNumber(100) - 10);\n addObject(topObstacole, getWidth(), botObstacole.getY() - image.getHeight() - ObstacoleSpacing);\n addObject(midObstacole, getWidth(), botObstacole.getY() + image.getHeight() / 3 + ObstacoleSpacing);\n }\n ObstacoleCounter = 0;\n }\n }", "public SubTipoBancaBD(SubTipoBanca stb) {\n this.stb = stb;\n }", "biker(int n,String ss)\r\n\t{\r\n\t\tbikeid=n;\r\n\t\tbikename=ss;\r\n\t\t\r\n\t}", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "@Test\n public void bateauAtNoBateau() {\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 Grille g = new Grille(10, 10, j, p);\n\n Bateaux ba = new ContreTorpilleur(new Place[]{new Place(\"A5\")}, j, p, true);\n g.setListBateaux(Collections.singletonList(ba));\n\n Bateaux b = j.bateauAt(new Place(\"A6\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }", "public EditorBambino() {\n /* rimanda al costruttore della superclasse */\n super(new JCheckBox());\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n }// fine del blocco try-catch\n }", "public List<MLocoBoggie> getboogie() {\n\t\t\t\tList<MLocoBoggie> getboogies = new ArrayList<>();\n\t\t\t\tobj_boogierepo.findAll()\n\t\t\t\t.forEach(getboogies::add);\n\n\t\t\t\treturn getboogies;\t\t\t\t\n\t\t\t\t\t\t}", "private void criaBlocos() {\n\t\tif (fase == 1) {\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\tint x = (i % 10) * 25 + 2;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.GRAY);\n\t\t\t\tlinhaUm[i].setPosition(new Point(x, 27));\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaDois[i].setPosition(new Point(x, 36));\n\t\t\t\tlinhaTres[i] = new Bloco(Color.BLUE);\n\t\t\t\tlinhaTres[i].setPosition(new Point(x, 45));\n\t\t\t\tlinhaQuatro[i] = new Bloco(Color.YELLOW);\n\t\t\t\tlinhaQuatro[i].setPosition(new Point(x, 54));\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.MAGENTA);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(x, 63));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.GREEN);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(x, 72));\n\n\t\t\t}\n\t\t} else if (fase == 2) {\n\t\t\tint y = 8;\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\ty += 9;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.GRAY);\n\t\t\t\tlinhaUm[i].setPosition(new Point(2, y));\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaDois[i].setPosition(new Point(46, y));\n\t\t\t\tlinhaTres[i] = new Bloco(Color.BLUE);\n\t\t\t\tlinhaTres[i].setPosition(new Point(92, y));\n\t\t\t\tlinhaQuatro[i] = new Bloco(Color.YELLOW);\n\t\t\t\tlinhaQuatro[i].setPosition(new Point(138, y));\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.MAGENTA);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(184, y));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.GREEN);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(230, y));\n\t\t\t}\n\t\t}else{\n\t\t\tint contFalPon = 0;\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\tint x = (i % 10) * 25 + 2;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.RED);\n\t\t\t\tif(i >= 2 && i <= 7){\n\t\t\t\t\tlinhaUm[i].setPosition(new Point(x, 20));\n\t\t\t\t}else{linhaUm[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tif(i >= 2 && i <= 7){\n\t\t\t\t\tlinhaDois[i].setPosition(new Point(x, 29));\n\t\t\t\t}else{linhaDois[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tif(i == 3 || i == 6){\n\t\t\t\t\tlinhaTres[i] = new Bloco(Color.BLACK);\n\t\t\t\t}else{linhaTres[i] = new Bloco(Color.RED);}\n\t\t\t\tif(i >= 1 && i <= 8){\n\t\t\t\t\tlinhaTres[i].setPosition(new Point(x, 38));\n\t\t\t\t}else{linhaTres[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tif(i == 3 || i == 6){\n\t\t\t\t\tlinhaQuatro[i] = new Bloco(Color.BLACK);\n\t\t\t\t}else{linhaQuatro[i] = new Bloco(Color.RED);}\n\t\t\t\tif(i >= 1 && i <= 8){\n\t\t\t\t\tlinhaQuatro[i].setPosition(new Point(x, 47));\n\t\t\t\t}else{linhaQuatro[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(x, 56));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(x, 65));\n\n\t\t\t}\n\t\t\tmudaFase -= contFalPon * 100;\n\t\t}//fecha else para formar a fase 3\n\n\t}", "public static void dodavanjeBicikl() {\n\t\tString vrstaVozila = \"Bicikl\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = Main.nista;\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = 0;\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 700;\n\t\tdouble cenaServisa = 5000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tint brSedist = 1;\n\t\tint brVrata = 0;\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tBicikl vozilo = new Bicikl(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public Boat() {\n }", "public biletSayfasi() throws SQLException {\n initComponents();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width/2 - getWidth()/2,size.height/2 - getHeight()/2);\n \n veritabani_baglanti vb = new veritabani_baglanti();\n vb.baglan();\n updateCombo();\n \n }", "public GameBis() { \t\n\t\t\n\t\t// initialization of the size of the game\n\t\tthis.width = 12; // ATTENTION : dimensions of the map (can be changed)\n\t\tthis.height = 12;\n\t\tthis.widthRoad = width * 2 + 1;\n\t\tthis.heightRoad = height * 2 + 1;\n\t\tthis.pxWidth = (width * 50) + ((width + 1) * 20); // ATTENTION TAILLE DES IMAGES : 50*50px (constructions), 20px (roads) (can be changed)\n\t\tthis.pxHeight = (width * 50) + ((width + 1) * 20);\n this.onTheRoadAgain= new LinkedList<Inhabitant>();\n\t\t\n\t\t// initialization of the boards of roads and constructions\n\t\tboardRoad = new BoardRoad(widthRoad, heightRoad); \n\t\tboardBuilding = new BoardBuilding(width, height);\n\t\t\n\t\t/*\n\t\t// initialization of 50 inhabitants ready to moving in at the beginning of the game\n\t\tfor (int i=0 ; i<50 ; i++) {\n\t\t\tpopulation.add(new Inhabitant(\"Inhabitant\"+i));\n\t\t}\n\t\t*/\n //initialistation du timer\n\t\ttimer = new Timer (100, new TimerClass());\n\t\ttimer.start();\n\t\t\n\t\t// display of the game\n\t\twindow = new Window(pxWidth, pxHeight, boardBuilding, boardRoad);\n\t\t\n\t}", "public Bo_barang(database db, loadAllData lad){\n initComponents();\n this.lad=lad;\n this.db=db;\n mvb=new Model_view_bo_barang(t_Bo_barang.getModel(), db, lad, mbd);\n setNamaPegawai();\n setNamaPegawaiAcc();\n setNamaBarang();\n reset();\n }", "public Cobra()\r\n {\r\n super();\r\n corpo = new ArrayList<CorpoCobra>();\r\n\r\n porCrescer = 0;\r\n ovosComidos = 0;\r\n vidas = 3;\r\n tonta = 0;\r\n }", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "public BancaBD(Banca b, int idCurriculoLattes){\n this.b = b;\n this.idCurriculoLattes = idCurriculoLattes;\n }", "public void colocarBomba() \r\n {\r\n \tBomba bom;\r\n \tCelda c= miJuego.getNivel(0).getCelda(this.posX, this.posY);\r\n \tif(!dios)\r\n \t{\r\n \t\tif(misBombas.size()>0)\r\n \t\t{\r\n \t\t\tif(c.getBomba()==null){\r\n \t\t\t\tbom=misBombas.remove(misBombas.size()-1);\r\n \t\t\t\tbom.setUbicacion(c);\r\n \t\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\t\t\tbom.getGrafico().setPos(posX, posY);\r\n \t\t\t\tc.colocarBomba(bom);\r\n \t\t\t\tbom=null;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tbom=new Bomba(this);\r\n \t\tbom.setUbicacion(c);\r\n\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\tbom.getGrafico().setPos(posX, posY);\r\n \t\tc.colocarBomba(bom);\r\n \t\tbom=null;\r\n \t}\r\n \r\n }", "public Bodega(@JsonProperty(value=\"id\") int id, @JsonProperty(value=\"estado\") char estado, @JsonProperty(value=\"tipo\") char tipo,@JsonProperty(value=\"ancho\") double ancho\r\n\t\t\t,@JsonProperty(value=\"largo\") double largo,@JsonProperty(value=\"plataformaExterna\") boolean plataformaExterna\r\n\t\t\t,@JsonProperty(value=\"tipoDeCarga\")TipoDeCarga tipoDeCarga,@JsonProperty(value=\"separacion\") double separacion\r\n\t\t\t, @JsonProperty(value=\"cuartosFrios\") List<CuartoFrio> cuartosFrios,@JsonProperty(value=\"entradas\") List<Operacion>entradas, @JsonProperty(value=\"salidas\") List<Operacion>salidas)\r\n\t{\r\n\t\tsuper(id,estado,tipo,entradas,salidas);\r\n\t\t\r\n\t\tthis.ancho=ancho;\r\n\t\tthis.largo=largo;\r\n\t\tthis.plataformaExterna=plataformaExterna;\r\n\t\tthis.tipoDeCarga=tipoDeCarga;\r\n\t\tthis.separacion=separacion;\r\n\t\tthis.setCuartosFrios(cuartosFrios);\r\n\t}", "public JogoBatalhaNaval() {\n initComponents();\n batalhaNaval = new BatalhaNaval();\n batalhaNaval.sortearNavios();\n batalhaNaval.dica();\n }", "Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }", "Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }", "public Raportet(String roli) {\n this.roli = roli;\n\n initComponents();\n validorolin();\n\n//mbushi kombot me shenime nga DB \n try {\n lidhja = new LidhjaMeDb();\n mbushekombon(lidhja.aktivitetet(), \"aktiviteti\", kmbaktiviteti);\n mbushekombon(lidhja.komunat(), \"komuna\", kmbkomunat);\n mbushekombon(lidhja.pergjigjjet(), \"pergjigjja\", kmbpergjigjja);\n \n LidhjaMeDb.mbyllelidhjen();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public ContaBancaria() {\n }", "public Bout()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n CreaBoutique();\n\n }", "public void addNewborn(Object anObj) { _newBorns.add(anObj); }", "public MangKaib(Main game){\n super(game);\n taust = new Taust(0,0,600,400);\n taust.checkLevel();// checkime, mis areaga tegu on peale uue tausta loomist\n mobSpawner.lisaMobInfo(); // laeme mob info.\n //game, width height draw x draw y, elud, damage, nimi, exp\n mangija = new Player(game, 97,174,50,370,100,10);\n mspawner = new mobSpawner(game, Mobid[13].getWidth(), Mobid[13].getHeight(), 450, 370, km[13].elud, km[13].dpsMin, km[13].dpsMax, km[13].mobSpeed, km[13].nimi, km[13].mobXp, km[13].mobGold,km[13].mobGold);\n magicAttack = new magicAttack(game,(mangija.x+mangija.width-15),(mangija.y-(mangija.height/2)),40,20,1,mangija.damage);\n kLiides = new uiBox(0,400,600,200);\n kLiides2 = new uiSide(600,0,200,600);\n uusRida = new Tekstid(0,420);//420 v 590\n }", "public ZafCon34(ZafParSis obj) {\n try{\n initComponents();\n //Inicializar objetos.\n this.objParSis=obj;\n jfrThis = this;\n objParSis=(ZafParSis)obj.clone();\n objUti=new ZafUtil();\n objTooBar=new MiToolBar(this);\n panTooBar.add(objTooBar);//llama a la barra de botones\n\n if (!configurarFrm())\n exitForm();\n }\n catch (CloneNotSupportedException e)\n {\n this.setTitle(this.getTitle() + \" [ERROR]\");\n }\n }", "public BetalingKontant() {\n initComponents();\n }", "public abstract B zzjo();", "public Boite(String path, int x_de_base, int y_de_base, int id) {\r\n \tRandom r = new Random();\r\n \tint valeur = 1 + r.nextInt(3 - 1);\r\n \tthis.value = valeur;\r\n \tthis.s= new Sprite(path);\r\n\tImageIcon im_mun = new ImageIcon(s.getImage().getScaledInstance(50,50,Image.SCALE_DEFAULT));\r\n\ts.setImageIcon(im_mun);\r\n\ts.setImage(im_mun);\r\n \tthis.coordonneX= x_de_base;\r\n \tthis.coordonneY= y_de_base;\r\n \tthis.hb = new Hitbox(this);\r\n \tthis.id = id; // Numero du perso tue dans l'arraylist AfficherPersonnage\r\n \tafficher = 0;\r\n }", "private void buildBoats() {\n\t\tboats.add(new Boat(\"red\"));\n\t\tboats.add(new Boat(\"pink\"));\n\t\tboats.add(new Boat(\"blue\"));\n\t\tboats.add(new Boat(\"yellow\"));\n\t\tboats.add(new Boat(\"orange\"));\n\t\tboats.add(new Boat(\"green\"));\n\t\tboats.add(new Boat(\"purple\"));\n\t}", "public GrupoBodegaLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.grupobodegaDataAccess = new GrupoBodegaDataAccess();\r\n\t\t\t\r\n\t\t\tthis.grupobodegas= new ArrayList<GrupoBodega>();\r\n\t\t\tthis.grupobodega= new GrupoBodega();\r\n\t\t\t\r\n\t\t\tthis.grupobodegaObject=new Object();\r\n\t\t\tthis.grupobodegasObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.grupobodegaDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.grupobodegaDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "public void billeBarre() { \t\t\t\t\t\t\t\t\t\t\t\n\t\tint contact = 0;\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Étude des contacts avec les 8 points de la bille\n\t\t// Contact GaucheHaut de la bille\n\n\t\t// Contact haut de la bille\n\t\tint[] p = billeEnCours.MH();\n\t\tif (p[1] <= barreEnCours.bas() && p[1] >= barreEnCours.haut() && p[0] <= barreEnCours.droite() && p[0] >= barreEnCours.gauche()) {\n\t\t\tcontact = 3;\n\t\t}\n\n\t\t// Contact bas de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.MB();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 7;\n\t\t\t}\n\t\t}\n\n\t\t// Contact droite de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.DM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact gauche de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.GM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 1;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 4;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 8;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 6;\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse \n\n\t\t// Rencontre d'un coin\n\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\tbilleEnCours.demiTour();\n\t\t}\n\n\t\t// Contact Classique\n\t\t// Gauche - Droite\n\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\t// Haut - Bas : Déviation de la balle\n\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\tint[] nv = new int[] {1,1};\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4 && billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] - 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] + 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\t\t\t\n\n\n\t}", "public v_pembelian() {\n initComponents();\n disable_info();\n setTabel();\n initFaktur();\n }", "protected GuiTestObject bungalow(TestObject anchor, long flags) \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"bungalow\"), anchor, flags);\n\t}", "private void BScreate() {\n\n\t\tint sum=0;//全枝数のカウント\n\t\tfor(int i=0;i<banknode;i++) sum+=Bank.get(i).deg;\n\n\t\t//e,d,nの決定\n\t\tif(NW==\"BA\"){\n\t\tfor(int i=0;i<banknode;i++) {\n\t\t\tBank.get(i).totalassets=E*((double)Bank.get(i).deg/(double)sum);\n\t\t\tBank.get(i).n=Bank.get(i).totalassets*Bank.get(i).CAR;\n\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t}\n\t\t}\n\n\t\tif(NW==\"CM\"){\n\t\t\tfor(int i=0;i<banknode;i++){\n\t\t\t\tBank.get(i).totalassets=E/banknode;\n\t\t\t\tBank.get(i).n=Bank.get(i).totalassets*asyCAR;\n\t\t\t\tBank.get(i).forcelev=megaCAR;\n\t\t\t\tBank.get(i).d=Bank.get(i).totalassets-Bank.get(i).n;\n\t\t\t\tBank.get(i).buffer=Bank.get(i).totalassets;\n\t\t\t}\n\n\t\t}\n\n\t}", "public mbvBoletinPeriodo() {\r\n }", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "protected BusinessObject getNewBusinessObjInstance()\n {\n return BUSINESS_OBJ ;\n }", "public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\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\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\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\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\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\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\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\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}\n\t}", "public static void main(String[] args) {\n Mahasiswa Mahasiswa1 = new Mahasiswa();\r\n Mahasiswa1.nama = \"Lukman\";\r\n Mahasiswa1.nim = \"2015069001\";\r\n Mahasiswa1.jurusan = \"Teknik Mendengkur\";\r\n Mahasiswa1.Fakultas = \"Fakultas Tidur\";\r\n Mahasiswa1.angkatan = 2015;\r\n Mahasiswa1.univ = \"Universitas Rebahan\";\r\n Mahasiswa1.ipk = 3.69;\r\n Mahasiswa1.umur = 24;\r\n\r\n System.out.println(Mahasiswa1.nama);\r\n System.out.println(Mahasiswa1.nim);\r\n System.out.println(Mahasiswa1.jurusan);\r\n System.out.println(Mahasiswa1.Fakultas);\r\n System.out.println(Mahasiswa1.angkatan);\r\n System.out.println(Mahasiswa1.univ);\r\n System.out.println(Mahasiswa1.ipk);\r\n System.out.println(Mahasiswa1.umur);\r\n\r\n //bikin objek baru\r\n Mahasiswa Mahasiswa2 = new Mahasiswa();\r\n\r\n Mahasiswa2.nama = \"Budi\";\r\n Mahasiswa2.nim = \"2020069001\";\r\n Mahasiswa2.jurusan = \"Teknik Mendengkur\";\r\n Mahasiswa2.Fakultas = \"Fakultas Tidur\";\r\n Mahasiswa2.univ = \"Universitas Rebahan\";\r\n Mahasiswa2.ipk = 2.69;\r\n Mahasiswa2.umur = 17;\r\n\r\n System.out.println(Mahasiswa1.nama);\r\n System.out.println(Mahasiswa1.nim);\r\n System.out.println(Mahasiswa1.jurusan);\r\n System.out.println(Mahasiswa1.Fakultas);\r\n System.out.println(Mahasiswa1.angkatan);\r\n System.out.println(Mahasiswa1.univ);\r\n System.out.println(Mahasiswa1.ipk);\r\n System.out.println(Mahasiswa1.umur);\r\n\r\n }", "public Billete(Usuario usuario, LocalDate fechaIda, LocalDate fechaVuelta, float precio_billete) {\r\n\t\t\r\n\t\tthis.nombrePasajero=usuario.getNombre();\r\n\t\tthis.apellido1_pasajero=usuario.getApellido1();\r\n\t\tthis.apellido2_pasajero=usuario.getApellido2();\r\n\t\tthis.pasaporte= usuario.getPasaporte();\r\n\t\tthis.idPasajero= usuario.getIdUsuario();\r\n\t\tthis.numeroBillete= idBillete++;\r\n\t\tthis.fechaIda = fechaIda;\r\n\t\tthis.fechaVuelta= fechaVuelta;\r\n\t\tthis.precioBillete = precio_billete;\r\n\t}", "public void addBomba() \r\n {\r\n misBombas.add(new Bomba(this));\r\n }", "public MeldingBeheer(List<Melding> meldingen) {\n\n this.meldingen = meldingen;\n }", "public void billeObstacles() {\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Parcours des briques pour vérifier les contacts\n\t\tListIterator <Obstacle> iter = niveauEnCours.grilleObstacles.listIterator(0);\n\t\tint contact = 0;\n\n\t\twhile (iter.hasNext() && contact == 0) {\n\t\t\tObstacle b = iter.next();\n\n\t\t\t// Étude des contacts avec les 8 points de la bille\n\t\t\t// Contact GaucheHaut de la bille\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\n\t\t\t// Contact DroiteHaut de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tq = billeEnCours.DH();\n\t\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t // Contact GaucheBas de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tq = billeEnCours.GB();\n\t\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 8;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact DroiteBas de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tq = billeEnCours.DB();\n\t\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 6;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact haut de la bille\n\t\t\tint[] p = billeEnCours.MH();\n\t\t\tif (contact == 0) {\n\t\t\t\tif (p[1] <= b.bas && p[1] >= b.haut && p[0] <= b.droite && p[0] >= b.gauche) {\n\t\t\t\t\tcontact = 3;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact bas de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tp = billeEnCours.MB();\n\t\t\t\tif (((p[1] <= b.bas) && (p[1] >= b.haut)) && ((p[0] <= b.droite) && (p[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 7;\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact droite de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tp = billeEnCours.DM();\n\t\t\t\tif (((p[1] <= b.bas) && (p[1] >= b.haut)) && ((p[0] <= b.droite) && (p[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 5;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact gauche de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tp = billeEnCours.GM();\n\t\t\t\tif (((p[1] <= b.bas) && (p[1] >= b.haut)) && ((p[0] <= b.droite) && (p[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 1;\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// Mise à jour de la vitesse \n\n\t\t\t// Rencontre d'un coin\n\t\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\t\tbilleEnCours.demiTour();\n\t\t\t}\n\n\t\t\t// Contact Classique\n\t\t\t// Gauche - Droite\n\t\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t\t}\n\n\t\t\t// Haut - Bas\n\t\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\t\tint[] nv = {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t\t}\t\t\t\n\t}", "public Bolsa(int tope) {\r\n\t\tthis.tope = tope;\r\n\t}", "public QwirkleSpiel()\n {\n beutel=new Beutel(3); //erzeuge Beutel mit 3 Steinfamilien\n spielfeld=new List<Stein>();\n\n rote=new ArrayList<Stein>(); //Unterlisten, die zum leichteren Durchsuchen des Spielfelds angelegt werden\n blaue=new ArrayList<Stein>();\n gruene=new ArrayList<Stein>();\n gelbe=new ArrayList<Stein>();\n violette=new ArrayList<Stein>();\n orangene=new ArrayList<Stein>();\n kreise=new ArrayList<Stein>();\n kleeblaetter=new ArrayList<Stein>();\n quadrate=new ArrayList<Stein>();\n karos=new ArrayList<Stein>();\n kreuze=new ArrayList<Stein>();\n sterne=new ArrayList<Stein>();\n\n erstelleListenMap();\n }", "public void maakDambord() {\t\r\n\tbord.addSpeelBord(dambord.getSpeelbord());\r\n\tframe.pack();\r\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public BArbol(NodoArbol primero) {\n this.primero = primero;\n }", "public DobbeltLenketListe() {\n this.hode= null;\n this.hale= null;\n antall=0; }", "public void oppdaterJliste()\n {\n bModel.clear();\n\n Iterator<Boligsoker> iterator = register.getBoligsokere().iterator();\n\n while(iterator.hasNext())\n bModel.addElement(iterator.next());\n }", "public ModelBolting(int boltingID, String bolting){\r\n\t\tthis.boltingID = boltingID;\r\n\t\tthis.bolting = bolting;\r\n\t}", "public Banco(){}", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "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}", "private CoeurAStockageImpl()\n\t{\n\t\tmonnayeur = new Monnayeur();\n\t\timprimante = new Imprimante(this);\n\t\tcomposantEnMarche = new HashMap<Composant,Boolean>();\n\t\tfor(Composant composant : Composant.values())\n\t\t{\n\t\t\tcomposantEnMarche.put(composant, true);\n\t\t}\n\t}", "public bebedor(String nombre)\n {\n // initialise instance variables\n this.nombre = nombre;\n alcoholimetro = 0;\n }", "private void renderObjetos()\n {\n for (int i=0;i<NCONSUMIBLES;i++)\n {\n //EDIT:Ruta de Inventario\n Consumible consumible=(Consumible)VenganzaBelial.atributoGestion.getInv().getItems().get(i);\n if(eleccionJugador==i)\n {\n opcionesJugadorTTF.drawString(10,i*20+400,consumible.getNombre()+\" \"+consumible.getNumero()+\"/10\");\n }\n else{\n opcionesJugadorTTF.drawString(10, i * 20 + 400, consumible.getNombre()+\" \"+consumible.getNumero()+\"/10\", notChosen);\n }\n }\n }", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}", "public Drakkar(){\r\n\t\tanguilas=m;\r\n\t}", "public void initPlateau() {\r\n\t\t// On place les obstacles\r\n\t\tint epaisseur = 20;\r\n\t\tint delta = 50;\r\n\t\tint espace = 150;\r\n\t\tobstacles.add(new Obstacle(0,0,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,height - epaisseur,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,0,epaisseur,height));\r\n\t\tobstacles.add(new Obstacle(width - epaisseur,0,epaisseur,height));\r\n\t\t\r\n\t\tobstacles.add(new Obstacle(0,100,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,200,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,300,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,400,width-espace,epaisseur));\r\n\t\t\r\n\t\t// On place les objectifs\r\n\t\t\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(150,50));\r\n\t\tobjectifs.add(new Objectif(300,50));\r\n\t\tobjectifs.add(new Objectif(50,50));\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(600,50));\r\n\t\tobjectifs.add(new Objectif(700,70));\r\n\t\tobjectifs.add(new Objectif(730,100));\r\n\t\tobjectifs.add(new Objectif(730,130));\r\n\t\tobjectifs.add(new Objectif(100,150));\r\n\t\tobjectifs.add(new Objectif(200,150));\r\n\t\tobjectifs.add(new Objectif(400,150));\r\n\t\tobjectifs.add(new Objectif(500,150));\r\n\t\tobjectifs.add(new Objectif(600,150));\r\n\t\tobjectifs.add(new Objectif(700,150));\r\n\t\tobjectifs.add(new Objectif(70,200));\r\n\t\tobjectifs.add(new Objectif(100,250));\r\n\t\tobjectifs.add(new Objectif(500,250));\r\n\t\tobjectifs.add(new Objectif(300,250));\r\n\t\tobjectifs.add(new Objectif(600,250));\r\n\t\tobjectifs.add(new Objectif(700,270));\r\n\t\tobjectifs.add(new Objectif(730,300));\r\n\t\tobjectifs.add(new Objectif(730,330));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(200,350));\r\n\t\tobjectifs.add(new Objectif(700,350));\r\n\t\tobjectifs.add(new Objectif(500,350));\r\n\t\tobjectifs.add(new Objectif(300,350));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(70,400));\r\n\t\tobjectifs.add(new Objectif(100,450));\r\n\t\tobjectifs.add(new Objectif(500,450));\r\n\t\tobjectifs.add(new Objectif(300,450));\r\n\t\tobjectifs.add(new Objectif(600,450));\r\n\t\t\r\n\t}", "public List<Boek> alleBoekenLijst () {\n return em.createNamedQuery(\"BoekEntity.zoekAllen\", Boek.class).getResultList();\n //return em.createQuery(\"SELECT b FROM Book b\", Book.class).getResultList();\n }", "public ZafRecHum38(Librerias.ZafParSis.ZafParSis obj) {\n try{\n this.objZafParSis = (Librerias.ZafParSis.ZafParSis) obj.clone();\n initComponents();\n objUti = new ZafUtil(); \n \n objTooBar = new mitoolbar(this);\n this.getContentPane().add(objTooBar,\"South\");\n\n this.setTitle(objZafParSis.getNombreMenu()+\" \" + strVersion);\n lblTit.setText(objZafParSis.getNombreMenu()); \n\n }catch(CloneNotSupportedException e) {objUti.mostrarMsgErr_F1(this, e);e.printStackTrace();}\n }", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "public b3(){\n super();\n }", "public LFIBTRBOLogic(Map<String, String> table) throws WTException {\n\n\t\t// fetch and store the table.\n\t\tthis.requesttable = table;\n\n\t\t// get the oid from the request table.\n\t\tif (FormatHelper.hasContent(this.requesttable.get(\"oid\"))) {\n\t\t\t// set the season to the global variable\n\t\t\tthis.season = (LCSSeason) LCSQuery.findObjectById(this.requesttable\n\t\t\t\t\t.get(\"oid\"));\n\t\t\t// set the seasonVersionId global variable\n\t\t\tif (season != null) {\n\t\t\t\tthis.seasonVersionId = FormatHelper\n\t\t\t\t\t\t.getNumericVersionIdFromObject(this.season);\n\t\t\t}\n\t\t}\n\t\tthis.masterRevEntity = this.getSAPMaterialMasterForSeason();\n\t\tif (this.masterRevEntity == null) {\n\t\t\tLCSLog.debug(\"masterRevEntity NOT FOUND. Creating masterRevEntity\");\n\t\t\tthis.masterRevEntity = createMasterRevisableEntity();\n\n\t\t}\n\t}", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "public TipoDocumentoMB() {\n tipoDoc = new TipoDocPersona();\n }" ]
[ "0.70897573", "0.67986727", "0.6484152", "0.64496243", "0.644613", "0.6345494", "0.6315975", "0.63029903", "0.63024807", "0.6299381", "0.6239958", "0.6238264", "0.6236055", "0.6224661", "0.622026", "0.6207508", "0.6180851", "0.61758435", "0.616223", "0.61472565", "0.6120566", "0.6114808", "0.6102855", "0.61010724", "0.61010724", "0.60942507", "0.6088853", "0.6082833", "0.60765374", "0.6068341", "0.6068066", "0.60662436", "0.6059062", "0.6049245", "0.6047998", "0.60434175", "0.6039289", "0.60270494", "0.60214376", "0.59987044", "0.59532714", "0.5943622", "0.5926892", "0.59241897", "0.5921131", "0.5915232", "0.59101933", "0.5893244", "0.5888208", "0.5888208", "0.58781064", "0.5874972", "0.58686095", "0.5867809", "0.5864655", "0.5858086", "0.5857202", "0.585687", "0.5850353", "0.58475757", "0.58427835", "0.5840417", "0.58235097", "0.58223784", "0.5808987", "0.5803286", "0.57986265", "0.57931", "0.5788778", "0.5787896", "0.57878876", "0.5786167", "0.57854366", "0.577841", "0.57745093", "0.57737297", "0.5766211", "0.5750577", "0.5743805", "0.57354087", "0.5735118", "0.57325906", "0.57298756", "0.5726038", "0.5722959", "0.5722403", "0.57163155", "0.57139325", "0.5702194", "0.5700629", "0.5694274", "0.5692856", "0.5690062", "0.568515", "0.5679832", "0.5675417", "0.56694436", "0.5662149", "0.5661813", "0.56593823", "0.5657037" ]
0.0
-1
panel met nieuwe UI inladen
private void constructLevel(int level){ gamePanel.removeAll(); GridLayout layout = new GridLayout(grid.length,grid[0].length); gamePanel.setLayout(layout); gamePanel.setBackground(Color.BLACK); gamePanel.setFocusable(true); gamePanel.requestFocusInWindow(); gamePanel.updateUI(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setupPanel()\n {\n\n }", "@Override\r\n\tpublic void createContents(Panel mainPanel) {\n\t\t\r\n\t\t\r\nsetTitle(\"¿Dónde invierto?\");\r\n\t\t\r\n\t\tmainPanel.setLayout(new VerticalLayout());\r\n\t\tnew Label(mainPanel).setText(\"Menú Principal\").setFontSize(15).setForeground(Color.RED);\r\n\t\tnew Label(mainPanel).setText(\"Seleccionar la opción deseada\").setFontSize(13).setForeground(Color.BLACK);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Carga Correcta de las Empresas!\").setFontSize(9).setForeground(Color.GREEN).bindVisibleToProperty(\"bloq\");\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Mostrar el valor de una cuenta predefinida\");\r\n\t\tButton bot_MostrarCuentas= new Button(mainPanel);\r\n\t\t\r\n\t\tbot_MostrarCuentas.setCaption(\"Mostrar valores de la Empresa\");//.bindEnabledToProperty(\"bloq\");\r\n\t\tbot_MostrarCuentas.onClick(() -> new mostrarValoresDeEmpresas(this,new mostrarValoresDeEmpresasViewModel()).open());\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Crear un nuevo indicador\");\r\n\t\tnew Button(mainPanel).setCaption(\"Escribir formula\").onClick(() -> new crearIndicadores(this,new crearIndicadoresViewModel()).open());\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Menu de Metodologias\");\r\n\t\t\r\n\t\tPanel parte1 =new Panel(mainPanel);\r\n\t\tparte1.setLayout(new ColumnLayout(2));\t\r\n\t\tButton bot_evaluarEmpresas= new Button(parte1);\r\n\t\tbot_evaluarEmpresas.setCaption(\"Evaluar una empresa\");\r\n\t\tbot_evaluarEmpresas.setWidth(125);\r\n\t\tbot_evaluarEmpresas.onClick(() -> new evaluarEmpresas(this, new evaluarEmpresasViewModel()).open());\r\n\t\r\n\t\tButton bot_configurarMetodologia= new Button(parte1);\r\n\t\tbot_configurarMetodologia.setCaption(\"Crear Metodologia\");\r\n\t\tbot_configurarMetodologia.setWidth(125);\r\n\t\tbot_configurarMetodologia.onClick(() ->crearNuevaMetodologia());\t\r\n\t\t\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t/*\tnew Label(mainPanel).setText(\"Importar/Exportar archivos\");\r\n\t\t\r\n\t\tButton bot_impExpArchivos = new Button(mainPanel);\r\n\t\tbot_impExpArchivos.setCaption(\"Importar Archivos o exportar\");\r\n\t\tbot_impExpArchivos.setWidth(125);\r\n\t\tbot_impExpArchivos.onClick(() -> new importarExportarArchivos(this, new importarExportarArchivosViewModel()).open());\r\n\t\t\r\n\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\" \").setFontSize(2);\r\n\t\tnew Label(mainPanel).setText(\"Desde aca abajo vuela todo y va a otra ventana \\\\|/\").setFontSize(8);\r\n\t */\r\n\t\t\r\n\t\tnew Label(mainPanel).setText(\"Cargar un archivo de empresas\");\r\n\t\tPanel panel2 = new Panel(mainPanel);\r\n\t\tpanel2.setLayout(new ColumnLayout(2));\r\n\t\t\r\n\t\tFileSelector fileSelector = new FileSelector(panel2);\r\n\t\tfileSelector.extensions(\"*.txt\");\r\n\t\tfileSelector.setCaption(\"Seleccionar archivo\");\r\n\t\tfileSelector.setWidth(125);\r\n\t\tfileSelector.bindValueToProperty(\"rutaArchivo\");\r\n\t\tfileSelector.onClick(() -> this.cargarArchivo());\r\n\t\t\r\n\t\tnew TextBox(panel2).setWidth(125).bindValueToProperty(\"rutaArchivo\");\r\n\t\t\r\n\t\t\r\n\t\tnew Button(mainPanel).setCaption(\"Procesar archivo\").onClick(() -> this.cargarArchivo());\r\n\r\n\t\tIOs.leerIndicadoresDeArchivo(\"archivoIndicadores.txt\");\r\n\t\t\r\n\t\tRepositorioDeEmpresas.traerEmpresasDeLaDB();\r\n\t}", "public PanelControl() {\r\n initComponents();\r\n VersionEImageIcon versionEImageIcon = new VersionEImageIcon();\r\n versionEImageIcon.newColorFromPanel(panelColor);\r\n jLabel1.setText(INFO_LABEL);\r\n Usuario usuarioTipo = Login.getUsuario();\r\n this.administrador = usuarioTipo.isAdmin();\r\n if (!administrador)\r\n {\r\n rangos.setEnabled(false);\r\n controles.setEnabled(false);\r\n alta_usuarios.setEnabled(false);\r\n verificacion.setEnabled(false);\r\n }\r\n }", "public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}", "public Component getPanelControl() {\n\t\tTableSorter sorterOperaciones = new TableSorter(modeloOperaciones);\n\t\tJTable tablaOperaciones = new JTable(sorterOperaciones);\n\t\tsorterOperaciones.setTableHeader(tablaOperaciones.getTableHeader());\n\t\tJScrollPane panelScrollDerecha = new JScrollPane(tablaOperaciones);\n\t\tpanelScrollDerecha.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tpanelDerecha = new FakeInternalFrame(\"Log de Operaciones\", panelScrollDerecha);\n\n\t\tTableSorter sorterPrecios = new TableSorter(modeloPrecios);\n\t\tJTable tablaPrecios = new JTable(sorterPrecios);\n\t\tsorterPrecios.setTableHeader(tablaPrecios.getTableHeader());\n\t\ttablaPrecios.getColumn(tablaPrecios.getColumnName(1)).setCellRenderer(modeloPrecios.getRenderer());\n\n\t\tJScrollPane panelScrollIzqAbajo = new JScrollPane(tablaPrecios);\n\t\tpanelScrollIzqAbajo.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tpanelIzqAbajo = new FakeInternalFrame(\"Precios en bolsa\", panelScrollIzqAbajo);\n\n\t\t//panelSecundario = new JSplitPane(JSplitPane.VERTICAL_SPLIT, panelIzqAbajo, panelIzqArriba);\n\t\tpanelPrincipal = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panelIzqAbajo, panelDerecha);\n\n\t\tpanelPrincipal.setDividerLocation(300);\n\t\t//panelSecundario.setDividerLocation(300);\n\n\t\tpanelIzqAbajo.setPreferredSize(new Dimension(250, 300));\n\t\tpanelDerecha.setPreferredSize(new Dimension(550, 600));\n\n\t\treturn panelPrincipal;\n\t}", "public ControladorPanel() { }", "public void loadPanel () {\n System.out.println(\"warning: unimplemented loadPanel() in \" + this);\n }", "public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}", "public PanelIniciarSesion() {\n initComponents();\n }", "public PanelAmigo() {\n initComponents();\n \n }", "public void habilitaPanel() {\n\n\t\tthis.panelFondo.setEnabled(true);\n\t\tlabelImagen.setEnabled(true);\n\t\t//comboNombreCarta.setEnabled(true);\n\t\tthis.jScrollPane1.setEnabled(true);\n\t\tthis.jScrollPane1.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(true);\n\t\tthis.jScrollPane2.setEnabled(true);\n\t\tthis.jScrollPane2.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(true);\n\t\tlistaSeleccionadas.setEnabled(true);\n\t\tlistaDisponibles.setEnabled(true);\n\t\tthis.labelFondo.setEnabled(true);\n\t\ttextoNumeroCartas.setEnabled(true);\n\t\ttextoRaza.setEnabled(true);\n\t\tbotCargar.setEnabled(true);\n\t\tbotGuardar.setEnabled(true);\n\t\tbotGuardarComo.setEnabled(true);\n\t\tbotSalir.setEnabled(true);\n\t\tbotAyuda.setEnabled(true);\n\t\tbotNuevaBaraja.setEnabled(true);\n\t\ttextoBarajaCargada.setEnabled(true);\n\t\tthis.setEnabled(true);\n this.NumeroPuntos.setEnabled(true);\n\n\t}", "public void initPanel(){\r\n\t \r\n\t\t//Titre\r\n\t\tlabel.setFont(new Font(\"Verdana\",1,40));\r\n\t label.setForeground(Color.black);\r\n\t label.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label.setBounds(110,0,575,50);\r\n\t\tthis.panel.setLayout(null);\t \r\n\t this.panel.add(label);\r\n\t \r\n\t //dc\r\n\t this.panel.add(label1, BorderLayout.CENTER);\r\n\t label1.setFont(new Font(\"Verdana\",1,40));\r\n\t label1.setForeground(Color.black);\r\n\t label1.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label1.setBounds(150,500,100,50);\r\n\t //ab\r\n\t this.panel.add(label2);\r\n\t label2.setFont(new Font(\"Verdana\",1,40));\r\n\t label2.setForeground(Color.black);\r\n\t label2.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label2.setBounds(550,500,100,50);\r\n\t //Button dc\r\n\t\tdc.setBounds(50,200,300,250);\r\n\t\tthis.panel.add(dc);\r\n\t\tdc.addActionListener(this);\r\n\t\t//Button ab\r\n\t\tab.setBounds(450,200,300,250);\r\n\t\tthis.panel.add(ab);\r\n\t\tab.addActionListener(this);\r\n\t\t\r\n\t\tthis.panel.add(label3);\r\n\t label3.setFont(new Font(\"Verdana\",1,20));\r\n\t label3.setForeground(Color.black);\r\n\t label3.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label3.setBounds(90,575,220,30);\r\n\t \r\n\t this.panel.add(label4);\r\n\t label4.setFont(new Font(\"Verdana\",1,20));\r\n\t label4.setForeground(Color.black);\r\n\t label4.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label4.setBounds(490,575,220,30);\r\n\t}", "public void habilitaPanel() {\n\t\t// contentPane.setEnabled(true);\n\t\tpanelPrincipal.setEnabled(true);\n\t\tpanelBotones.setEnabled(true);\n\t\tboton1Jugador.setEnabled(true);\n\t\tbotonJuegoRed.setEnabled(true);\n\t\tbotonEditar.setEnabled(true);\n\t\tbotonDemo.setEnabled(true);\n\t\tbotonReglas.setEnabled(true);\n\t\tbotonAyuda.setEnabled(true);\n\t\tbotonRecibir.setEnabled(true);\n\t\tbotonEnviar.setEnabled(true);\n\t\tbotonDescargaSobre.setEnabled(true);\n\t\tbotonSalir.setEnabled(true);\n\t\tlabelFondo.setEnabled(true);\n\t\tlabelDibujo.setEnabled(true);\n\n\t}", "public void run() {\n\t\t\t\tVerticalPanel panelCompteRendu = new VerticalPanel();\r\n\t\t\t\thtmlCompteRendu = new HTML();\r\n\t\t\t\tpanelCompteRendu.add(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"compteRendu\").add(panelCompteRendu);\r\n\t\t\t\t\r\n\t\t\t\tVerticalPanel panelLegende = new VerticalPanel();\r\n\t\t\t\thtmlLegende = new HTML();\r\n\t\t\t\tpanelLegende.add(htmlLegende);\r\n\t\t\t\tRootPanel.get(\"legende\").add(htmlLegende);\r\n\t\t\t\t\r\n\t\t\t\t// temps d'intˇgration restant\r\n\t\t\t\tLabel tempsDIntegrationRestant = new Label();\r\n\t\t\t\tRootPanel.get(\"tempsDIntegrationRestant\").add(tempsDIntegrationRestant);\r\n\t\t\t\t\r\n\t\t\t\t// ajout de la carte\r\n\t\t\t\twMap = new MapFaWidget2(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"carte\").add(wMap);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// ajout du bouton reset\r\n\t\t\t\tButton boutonReset = new Button(\"Nettoyer la carte\");\r\n\t\t\t\tboutonReset.addClickHandler(actionBoutonReset());\r\n\t\t\t\tRootPanel.get(\"boutonReset\").add(boutonReset);\r\n\r\n\t\t\t\t// ajout du formulaire d'intˇgration\r\n\t\t\t\tnew FileUploadView(wMap,htmlLegende, htmlCompteRendu,tempsDIntegrationRestant);\r\n\r\n\t\t\t}", "public void preparePanelPoder(){\n\t\tpanelNombrePoder = new JPanel();\n\t\tpanelNombrePoder.setLayout( new GridLayout(3,1,0,0 ));\n\t\t\n\t\tString name = ( game.getCurrentSorpresa() == null )?\" No hay sorpresa\":\" \"+game.getCurrentSorpresa().getClass().getName();\n\t\tn1 = new JLabel(\"Sorpresa actual:\"); \n\t\tn1.setForeground(Color.WHITE);\n\t\t\n\t\tn2 = new JLabel();\n\t\tn2.setText(name.replace(\"aplicacion.\",\"\"));\n\t\tn2.setForeground(Color.WHITE);\n\t\t\n\t\tpanelNombrePoder.add(n1);\n\t\tpanelNombrePoder.add(n2);\n\t\tpanelNombrePoder.setBounds( 34,200 ,110,50);\n\t\tpanelNombrePoder.setOpaque(false);\n\t\tthis.add( panelNombrePoder);\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public vistaPanelPelicula() {\r\n initComponents();\r\n }", "private void crearPanel() {\r\n\t\tJLabel lbl_Empresa = new JLabel(\"Empresa:\");\r\n\t\tlbl_Empresa.setBounds(10, 52, 72, 14);\r\n\t\tadd(lbl_Empresa);\r\n\r\n\t\ttxField_Empresa = new JTextField();\r\n\t\ttxField_Empresa.setBounds(116, 49, 204, 20);\r\n\t\tadd(txField_Empresa);\r\n\t\ttxField_Empresa.setColumns(10);\r\n\r\n\t\tlbl_Oferta = new JLabel(\" \");\r\n\t\tlbl_Oferta.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlbl_Oferta.setBounds(10, 11, 742, 20);\r\n\t\tadd(lbl_Oferta);\r\n\r\n\t\tJLabel lbl_sueldoMin = new JLabel(\"Sueldo Minimo:\");\r\n\t\tlbl_sueldoMin.setBounds(10, 83, 96, 14);\r\n\t\tadd(lbl_sueldoMin);\r\n\r\n\t\ttxField_sueldoMin = new JTextField();\r\n\t\ttxField_sueldoMin.setColumns(10);\r\n\t\ttxField_sueldoMin.setBounds(116, 80, 93, 20);\r\n\t\tadd(txField_sueldoMin);\r\n\r\n\t\tJLabel lbl_sueldoMax = new JLabel(\"Sueldo Maximo:\");\r\n\t\tlbl_sueldoMax.setBounds(10, 115, 96, 14);\r\n\t\tadd(lbl_sueldoMax);\r\n\r\n\t\ttxField_sueldoMax = new JTextField();\r\n\t\ttxField_sueldoMax.setColumns(10);\r\n\t\ttxField_sueldoMax.setBounds(116, 112, 93, 20);\r\n\t\tadd(txField_sueldoMax);\r\n\r\n\t\tJLabel lbl_experiencia = new JLabel(\"A\\u00F1os de experiencia minimos:\");\r\n\t\tlbl_experiencia.setBounds(10, 143, 185, 14);\r\n\t\tadd(lbl_experiencia);\r\n\r\n\t\ttxField_experiencia = new JTextField();\r\n\t\ttxField_experiencia.setColumns(10);\r\n\t\ttxField_experiencia.setBounds(205, 140, 93, 20);\r\n\t\tadd(txField_experiencia);\r\n\r\n\t\tJLabel lbl_aspectosValorar = new JLabel(\"Aspectos a valorar:\");\r\n\t\tlbl_aspectosValorar.setBounds(10, 178, 137, 14);\r\n\t\tadd(lbl_aspectosValorar);\r\n\r\n\t\ttxArea_aspectosValorar = new JTextArea();\r\n\t\ttxArea_aspectosValorar.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosValorar.setBounds(157, 172, 253, 41);\r\n\t\tadd(txArea_aspectosValorar);\r\n\r\n\t\tJLabel lbl_aspectosImpres = new JLabel(\"Aspectos imprescindibles:\");\r\n\t\tlbl_aspectosImpres.setBounds(10, 238, 133, 14);\r\n\t\tadd(lbl_aspectosImpres);\r\n\r\n\t\ttxArea_aspectosImpres = new JTextArea();\r\n\t\ttxArea_aspectosImpres.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosImpres.setBounds(157, 232, 253, 41);\r\n\t\tadd(txArea_aspectosImpres);\r\n\r\n\t\tJLabel lbl_descripcion = new JLabel(\"Descripcion:\");\r\n\t\tlbl_descripcion.setBounds(10, 302, 107, 14);\r\n\t\tadd(lbl_descripcion);\r\n\r\n\t\ttxArea_descripcion = new JTextArea();\r\n\t\ttxArea_descripcion.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_descripcion.setBounds(10, 328, 465, 149);\r\n\t\tadd(txArea_descripcion);\r\n\r\n\t\tJLabel lbl_conocimientos = new JLabel(\"Conocimientos requeridos:\");\r\n\t\tlbl_conocimientos.setBounds(537, 125, 169, 14);\r\n\t\tadd(lbl_conocimientos);\r\n\r\n\t\tpa_conocimientos = new PanelListaDoble(Usuario.getConocimientosTotales(), miOferta.getConocimientos());\r\n\t\tpa_conocimientos.setBounds(537, 174, 215, 180);\r\n\t\tadd(pa_conocimientos);\r\n\r\n\t\ttxField_buscarCono = new JTextField();\r\n\t\ttxField_buscarCono.setBounds(537, 140, 135, 20);\r\n\t\tadd(txField_buscarCono);\r\n\t\ttxField_buscarCono.setColumns(10);\r\n\r\n\t\tJButton btn_buscar = new JButton(\"\");\r\n\t\tbtn_buscar.setBounds(682, 138, 24, 23);\r\n\t\tadd(btn_buscar);\r\n\r\n\t\tbtn_crear = new JButton(\"\");\r\n\t\tbtn_crear.setBounds(716, 138, 24, 23);\r\n\t\tadd(btn_crear);\r\n\r\n\t\ttxField_lugar = new JTextField();\r\n\t\ttxField_lugar.setEditable(false);\r\n\t\ttxField_lugar.setColumns(10);\r\n\t\ttxField_lugar.setBounds(506, 49, 234, 20);\r\n\t\tadd(txField_lugar);\r\n\r\n\t\tJLabel lbl_lugar = new JLabel(\"Lugar de trabajo:\");\r\n\t\tlbl_lugar.setBounds(392, 52, 104, 14);\r\n\t\tadd(lbl_lugar);\r\n\r\n\t\tJLabel lbl_contrato = new JLabel(\"Tipo de contrato:\");\r\n\t\tlbl_contrato.setBounds(392, 83, 104, 14);\r\n\t\tadd(lbl_contrato);\r\n\r\n\t\tcombo_contrato = new JComboBox<Contrato>();\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORAL_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORTAL_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.setBounds(506, 83, 159, 20);\r\n\t\tadd(combo_contrato);\r\n\t\t// d\r\n\t\tinicializar(miOferta);\r\n\t\tdesHabCampos(false);\r\n\t\tif (miOferta.getEmpresa().getNumID().compareToIgnoreCase(Aplicacion.getUsuario().getNumID()) == 0) {\r\n\t\t\tbtnEliminar = new JButton(\"Eliminar\");\r\n\t\t\tbtnEliminar.setToolTipText(\"Eliminar\");\r\n\t\t\tbtnEliminar.setBounds(492, 384, 125, 41);\r\n\t\t\tadd(btnEliminar);\r\n\r\n\t\t\tbtnRetirar = new JButton(\"\\uD83D\\uDC40\");\r\n\t\t\tbtnRetirar.setToolTipText(\"Retirar Oferta\");\r\n\t\t\tbtnRetirar.setBounds(627, 384, 125, 41);\r\n\t\t\tadd(btnRetirar);\r\n\r\n\t\t\tbutton_Editar = new JButton(\"Editar\");\r\n\t\t\tbutton_Editar.setToolTipText(\"Editar\");\r\n\t\t\tbutton_Editar.setBounds(627, 436, 125, 41);\r\n\t\t\tadd(button_Editar);\r\n\r\n\t\t\tbutton_Editar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\tdesHabCampos(true);\r\n\t\t\t\t\tbutton_Editar.setVisible(false);\r\n\t\t\t\t\tbtnEliminar.setVisible(false);\r\n\t\t\t\t\tbtnRetirar.setVisible(false);\r\n\t\t\t\t\tbtn_crear.setVisible(false);\r\n\r\n\t\t\t\t\tbtn_guardar = new JButton(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setToolTipText(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setBounds(627, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_guardar);\r\n\r\n\t\t\t\t\tbtn_cancelar = new JButton(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setToolTipText(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setBounds(492, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_cancelar);\r\n\r\n\t\t\t\t\tbtn_cancelar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tbtn_guardar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.setVisible(false);\r\n\t\t\t\t\t\t\tbtn_guardar.setVisible(false);\r\n\t\t\t\t\t\t\tbtnEliminar.setVisible(true);\r\n\t\t\t\t\t\t\tbutton_Editar.setVisible(true);\r\n\t\t\t\t\t\t\tbtnRetirar.setVisible(true);\r\n\t\t\t\t\t\t\tbtn_crear.setVisible(true);\r\n\t\t\t\t\t\t\tinicializar(miOferta);\r\n\t\t\t\t\t\t\tdesHabCampos(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tbtn_guardar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tEmergenteCambios.createWindow(\"┐Desea guardar los cambios?\", (TieneEmergente) padre);\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}", "public PanelSobre() {\n initComponents();\n }", "public PanelSobre() {\n initComponents();\n }", "private JPanel getMenuPanel() {\n\t\tif (menuPanel == null) {\n\t\t\tjLabel5 = new JLabel();\n\t\t\tjLabel5.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\t\t\tjLabel5.setBounds(new Rectangle(74, 162, 322, 15));\n\t\t\tjLabel5.setText(\"www.riesky.sk/~laco/web/sluchanal\");\n\t\t\tjLabel4 = new JLabel();\n\t\t\tjLabel4.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\t\t\tjLabel4.setBounds(new Rectangle(5, 88, 447, 15));\n\t\t\tjLabel4.setText(\"Ako analyzovať?\");\n\t\t\tjLabel3 = new JLabel();\n\t\t\tjLabel3.setText(\"pozostáva z 10 príkladov, na ktoré musíte odpovedať správne!\");\n\t\t\tjLabel3.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\n\t\t\tjLabel3.setBounds(new Rectangle(65, 55, 413, 15));\n\t\t\tjLabel2 = new JLabel();\n\t\t\tjLabel2.setText(\"Skúška:\");\n\t\t\tjLabel2.setBounds(new Rectangle(6, 38, 329, 15));\n\t\t\tjLabel1 = new JLabel();\n\t\t\tjLabel1.setText(\"Výcvik:\");\n\t\t\tjLabel1.setBounds(new Rectangle(5, 7, 329, 15));\n\t\t\tjLabel = new JLabel();\n\t\t\tjLabel.setText(\"Vyber si úroveň a typ tréningu.\");\n\t\t\tjLabel.setBounds(new Rectangle(16, 140, 226, 15));\n\t\t\tcvicenieText1112 = new JLabel();\n\t\t\tcvicenieText1112.setBounds(new Rectangle(160, 104, 25, 28));\n\t\t\tcvicenieText1112.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tcvicenieText1112.setText(\"\");\n\t\t\tcvicenieText1112.setFont(new Font(\"Dialog\", Font.BOLD, 18));\n\t\t\tcvicenieText1111 = new JLabel();\n\t\t\tcvicenieText1111.setBounds(new Rectangle(95, 108, 64, 20));\n\t\t\tcvicenieText1111.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tcvicenieText1111.setText(\"úroveň\");\n\t\t\tcvicenieText1111.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\t\t\tcvicenieText1111.setVisible(false);\n\t\t\tcvicenieText111 = new JLabel();\n\t\t\tcvicenieText111.setBounds(new Rectangle(4, 110, 92, 17));\n\t\t\tcvicenieText111.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tcvicenieText111.setText(\"\");\n\t\t\tcvicenieText111.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\t\tcvicenieText11 = new JLabel();\n\t\t\tcvicenieText11.setBounds(new Rectangle(10, 72, 128, 25));\n\t\t\tcvicenieText11.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tcvicenieText11.setText(\"Zadaj svoje meno:\");\n\t\t\tcvicenieText11.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\t\t\tcvicenieText4 = new JLabel();\n\t\t\tcvicenieText4.setBounds(new Rectangle(121, 22, 186, 38));\n\t\t\tcvicenieText4.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tcvicenieText4.setText(\"Vitaj, hudobník!\");\n\t\t\tcvicenieText4.setFont(new Font(\"Dialog\", Font.BOLD, 18));\n\t\t\turoven3Text = new JLabel();\n\t\t\turoven3Text.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\turoven3Text.setText(\"Úroveň 3\");\n\t\t\turoven3Text.setSize(new Dimension(102, 23));\n\t\t\turoven3Text.setLocation(new Point(36, 254));\n\t\t\turoven3Text.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\t\turoven2Text = new JLabel();\n\t\t\turoven2Text.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\turoven2Text.setText(\"Úroveň 2\");\n\t\t\turoven2Text.setSize(new Dimension(101, 23));\n\t\t\turoven2Text.setLocation(new Point(36, 211));\n\t\t\turoven2Text.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\t\turoven1Text = new JLabel();\n\t\t\turoven1Text.setBounds(new Rectangle(36, 168, 102, 23));\n\t\t\turoven1Text.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\turoven1Text.setText(\"Úroveň 1\");\n\t\t\turoven1Text.setFont(new Font(\"Dialog\", Font.BOLD, 14));\n\t\t\tmenuPanel = new JPanel();\n\t\t\tmenuPanel.setLayout(null);\n\t\t\tmenuPanel.setEnabled(false);\n\t\t\tmenuPanel.setSize(new Dimension(504, 456));\n\t\t\tmenuPanel.setLocation(new Point(75, 7));\n\t\t\tmenuPanel.add(getVycvik1Button(), null);\n\t\t\tmenuPanel.add(getSkuska1Button(), null);\n\t\t\tmenuPanel.add(getVycvik2Button(), null);\n\t\t\tmenuPanel.add(getSkuska2Button(), null);\n\t\t\tmenuPanel.add(getVycvik3Button(), null);\n\t\t\tmenuPanel.add(getSkuska3Button(), null);\n\t\t\tmenuPanel.add(uroven1Text, null);\n\t\t\tmenuPanel.add(uroven2Text, null);\n\t\t\tmenuPanel.add(uroven3Text, null);\n\t\t\tmenuPanel.add(cvicenieText4, null);\n\t\t\tmenuPanel.add(getJTextArea(), null);\n\t\t\tmenuPanel.add(getJButton(), null);\n\t\t\tmenuPanel.add(cvicenieText11, null);\n\t\t\tmenuPanel.add(cvicenieText111, null);\n\t\t\tmenuPanel.add(cvicenieText1111, null);\n\t\t\tmenuPanel.add(cvicenieText1112, null);\n\t\t\tmenuPanel.add(jLabel, null);\n\t\t\tmenuPanel.add(getJButton1(), null);\n\t\t\tmenuPanel.add(getPrieskumButton(), null);\n\t\t}\n\t\treturn menuPanel;\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n controladorUsuario.getControladorVistaInicial().limpiarPaneles();\n \n //Información del usuario\n if(e.getSource() == panelMenus.jbtnInfoPer){\n //CambiarVisibilidad\n controladorUsuario.getControladorVistaInicial().cambiarVisibilidad(1);\n //Se actualiza el panel\n panelDatosPersonal.actualizarInfo(controladorUsuario.getMiUsuario());\n controladorUsuario.getControladorVistaInicial().getVistaInicial().getJpCentral().add(panelDatosPersonal);\n //Se muestran los cambios\n controladorUsuario.getControladorVistaInicial().actualizarPaneles();\n \n //------------------------------------------------------------------\n //Catálogo de ibros\n }else if(e.getSource()==panelMenus.jbtnCatalogoLibros){\n \n //CambiarVisibilidad\n controladorUsuario.getControladorVistaInicial().cambiarVisibilidad(1);\n controladorUsuario.getControladorVistaInicial().getVistaInicial().getJpCentral().add(controladorUsuario.getPanelLibro());\n controladorUsuario.getControladorVistaInicial().getVistaInicial().getJpDerecha().add(controladorUsuario.getPanelBusqueda());\n //Se muestran los cambios\n controladorUsuario.getControladorVistaInicial().actualizarPaneles();\n //------------------------------------------------------------------\n //Salir del aplicativo\n }else if(e.getSource()==panelMenus.jbtnPrestamos){\n //------------------------------------------------------------------\n //Se obtiene toda la lista de prestamos con base en la consulta sql\n listaPrestamos = bdAcceso.getBdConsulta().consultarPrestamo(controladorUsuario.getMiUsuario().getID_Documento());\n \n //Se limpia las filas de la tabla\n acumulador = 0;\n filas = panelRegistroPrestamoControlador.getModeloTabla().getRowCount();\n while(filas>acumulador){\n panelRegistroPrestamoControlador.getModeloTabla().removeRow(0);\n acumulador++;\n }\n //Se renderiza la tabla para poder agregar botones\n panelRegistroPrestamoControlador.panelRegistroPrestamo.tablaPrestamo.setDefaultRenderer(Object.class, this);\n \n acumulador=0; \n //Se actualiza la información de la tabla\n while(acumulador<listaPrestamos.size()){\n prestamo = listaPrestamos.get(acumulador);\n //Se agregan los elementos a la fila\n if(prestamo.isAmpliarPrestamo()==false){ \n panelRegistroPrestamoControlador.getModeloTabla().addRow(new Object[]{prestamo.getId_Prestamo(),prestamo.getId_Libro(),prestamo.getId_Ejemplar(),prestamo.getTitulo_libro(),\n prestamo.getFecha_prestamo(),prestamo.getFecha_devolucion(),prestamo.isEstado(),prestamo.isAmpliarPrestamo(),panelRegistroPrestamoControlador.retornaJbtn()});\n }else{\n panelRegistroPrestamoControlador.getModeloTabla().addRow(new Object[]{prestamo.getId_Prestamo(),prestamo.getId_Libro(),prestamo.getId_Ejemplar(),prestamo.getTitulo_libro(),\n prestamo.getFecha_prestamo(),prestamo.getFecha_devolucion(),prestamo.isEstado(),prestamo.isAmpliarPrestamo()});\n }\n acumulador++;\n }\n filas = acumulador;\n //CambiarVisibilidad\n controladorUsuario.getControladorVistaInicial().cambiarVisibilidad(2);\n //Se agrega el panel\n controladorUsuario.getControladorVistaInicial().getVistaInicial().getJpCentralGeneral().add(panelRegistroPrestamoControlador.panelRegistroPrestamo);\n //Se muestran los cambios\n controladorUsuario.getControladorVistaInicial().actualizarPaneles();\n \n }else if(e.getSource() == panelMenus.jbtnSalir){\n //CambiarVisibilidad\n controladorUsuario.getControladorVistaInicial().cambiarVisibilidad(1);\n controladorUsuario.getControladorVistaInicial().reestablecerInfo();\n controladorUsuario.getControladorVistaInicial().agregarPaneles();\n }\n }", "@Override\r\n\tpublic void onPanelOpened(Panel panel) {\n\r\n\t}", "void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.setTitle(gebruikersBeheerModel.getTitle());\n }", "@Override\r\n public void setup(Panel panel) {\n }", "private Component getPanelOpcionesInferior() {\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tlistaUsuarios = new JList(new DefaultListModel());\n//\t\tlistaUsuarios.setCellRenderer(modeloUsuarios.getListCellRenderer());\n\t\tJScrollPane panelScrollIzqArriba = new JScrollPane(listaUsuarios);\n\n\t\tpanelScrollIzqArriba.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tFakeInternalFrame panelIzqArriba = new FakeInternalFrame(\"Usuarios\", panelScrollIzqArriba);\n\n\t\tpanel.add(panelIzqArriba);\n\n\t\tpanelIzqArriba.setPreferredSize(new Dimension(250, 300));\n\t\tJButton botonIniciarParar = new JButton(\"Iniciar Simulacion\");\n\t\tbotonIniciarParar.addActionListener(\n\t\t\t\t\tnew ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tJButton src = (JButton) e.getSource();\n\t\t\t\t\t\t\tiniciarPausar_actionPerformed(src);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\tbotonFinalizarSimulacion = new JButton(\"Finalizar Simulacion\");\n\t\tbotonFinalizarSimulacion.addActionListener(\n\t\t\t\t\tnew ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tbotonFinalizar_actionPerformed();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\tJPanel panelBotones = new JPanel();\n\t\tpanelBotones.add(botonIniciarParar);\n\t\tpanelBotones.add(botonFinalizarSimulacion);\n\t\tpanel.add(panelBotones, BorderLayout.SOUTH);\n\n\t\treturn panel;\n\t}", "public RepalyPanel() {\n\t\t\ttry {\n//\t\t\t\tthis.addMouseListener(new MouseAdapter() {\n//\t\t\t\t\t@Override\n//\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n//\t\t\t\t\t\tSystem.out.println(e.getX() + \" \" + e.getY());\n//\t\t\t\t\t}\n//\t\t\t\t});\n\n\t\t\t\tsetLayout(null);\n\n\t\t\t\t// 退出按键\n\t\t\t\tjbRestart = MyButton.makeButton(restart, restart_down,\n\t\t\t\t\t\trestart_hover);\n\t\t\t\tadd(jbRestart);\n\t\t\t\tjbRestart.setBounds(540, 355, 140, 56);\n\t\t\t\tjbRestart.addActionListener(this);\n\n\t\t\t\t// 确认退出按键\n\t\t\t\tjbContinue = MyButton.makeButton(continue_pic, continue_down,\n\t\t\t\t\t\tcontinue_hover);\n\t\t\t\tadd(jbContinue);\n\t\t\t\tjbContinue.setBounds(345, 355, 140, 56);\n\t\t\t\tjbContinue.addActionListener(this);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "private void setUpPanel() {\n\n this.add(nameLabel);\n this.add(showMetadataButton);\n this.add(compressFilesButton);\n this.add(decompressFilesButton);\n this.add(compressionResultLabel);\n this.add(messageShorteningButton);\n this.add(messageShorteningResultLabel);\n }", "public HoaDonJPanel() {\n initComponents(); \n this.init();\n }", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private void iniciarComponentesInterface() {\n\t\tPanelchildren panelchildren = new Panelchildren();\r\n\t\tpanelchildren.setParent(this);\r\n\t\tlistBox = new Listbox();\r\n\t\tlistBox.setHeight(\"300px\");\r\n\t\tlistBox.setCheckmark(true);\r\n\t\tlistBox.setMultiple(false);\r\n\t\tlistBox.setParent(panelchildren);\r\n\t\tListhead listHead = new Listhead();\r\n\t\tlistHead.setParent(listBox);\r\n\t\tListheader listHeader = new Listheader(\"Projeto\");\r\n\t\tlistHeader.setParent(listHead);\r\n\r\n\t\t// Botões OK e Cancelar\r\n\t\tDiv div = new Div();\r\n\t\tdiv.setParent(panelchildren);\r\n\t\tdiv.setStyle(\"float: right;\");\r\n\t\tSeparator separator = new Separator();\r\n\t\tseparator.setParent(div);\r\n\t\tButton botaoOK = new Button(\"OK\");\r\n\t\tbotaoOK.addEventListener(\"onClick\", new EventListenerOK());\r\n\t\tbotaoOK.setWidth(\"100px\");\r\n\t\tbotaoOK.setStyle(\"margin-right: 5px\");\r\n\t\tbotaoOK.setParent(div);\r\n\t\tButton botaoCancelar = new Button(\"Cancelar\");\r\n\t\tbotaoCancelar.addEventListener(\"onClick\", new EventListenerCancelar());\r\n\t\tbotaoCancelar.setWidth(\"100px\");\r\n\t\tbotaoCancelar.setParent(div);\r\n\t}", "public kinpanel() {\n initComponents();\n }", "public TemporizadorPanel() {\n initComponents();\n }", "public void irAPanelAbierto() {\r\n //Seleccionar PerfilPanel\r\n itemClicked(jpanePerfil, jpaneActivePerfil, jlblPerfil, 1);\r\n }", "private void setupGUI(){\r\n\t\t\r\n\t\tfinal GUIFactory guifactory = GUIFactory.instance();\r\n\t\tfinal MTApplication app = (MTApplication)item.getView().getRenderer();\r\n\t\tfinal float leftiness = app.getWidth()*5/6;\r\n\t\tfinal float xPos = leftiness + 5;\r\n\t\t\r\n\t\t\r\n\t\toverlay = new MTOverlayContainer( app);\r\n\t\titem.getView().getRoot().addChild( overlay);\r\n\t\t\r\n\t\t// _THE_ PANEL \r\n\t\t\r\n\t\tpnlPanel = guifactory.createPanel( leftiness, 0, app.getWidth()-leftiness, app.getHeight(),\"pnlPanel\", overlay);\t\t\t\r\n\t\t\r\n\t\t// INTERACTION PANEL\r\n\t\t\r\n\t\tpnlInteraction = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlInteraction\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlInteraction.setNoFill( true);\r\n\t\t\r\n\t\t// EDIT PANEL\r\n\t\t\r\n\t\tpnlEdit = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tpnlPanel.getHeightXY( TransformSpace.GLOBAL),\r\n\t\t\t\t\"pnlEdit\",\r\n\t\t\t\tpnlPanel);\r\n\t\tpnlEdit.setVisible( false);\r\n\t\tpnlEdit.setNoFill( true);\r\n\t\t\r\n\t\t\r\n\t\t// ITEM NAME TEXTAREA\r\n\t\t\r\n\t\tString itemName = item.getName();\r\n\t\tif(itemName == null || itemName.equals( \"\"))\r\n\t\t\titemName = item.getID();\r\n\t\ttxtItemName = guifactory.createTextArea(itemName, \"txtItemName\", pnlPanel);\r\n\t\ttxtItemName.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getY() + 10\t\r\n\t\t\t\t));\r\n\r\n\r\n\t\t// PANEL PICTURE\r\n\r\n\t\tVector3D pnlInteractionPos = pnlInteraction.getPosition( TransformSpace.GLOBAL);\r\n\t\tpnlPicture = guifactory.createPanel( pnlInteractionPos.getX()+50, pnlInteractionPos.getY()+50, 100, 100, \"pnlPicture\", pnlInteraction);\r\n\t\tpnlPicture.setAnchor( PositionAnchor.CENTER);\r\n\t\tpnlPicture.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\tpnlInteractionPos.getX() + pnlInteraction.getWidthXY( TransformSpace.GLOBAL)/2,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 50 + pnlPicture.getHeightXY( TransformSpace.GLOBAL)/2\r\n\t\t\t\t));\r\n\t\tpnlPicture.setTexture( GUITextures.instance().getByDevice( DeviceType.getDeviceType( device)));\r\n\t\t\r\n\t\t\r\n\t\t// POWER USAGE TEXTAREA\r\n\t\t\r\n\t\tString powerUsage = \"n/a\";\r\n\t\tif( device.getPowerUsage() != null && device.getPowerUsage().getValue() != null){\r\n\t\t\tpowerUsage = device.getPowerUsage().getValue().toString();\r\n\t\t}\r\n\t\t\r\n\t\ttxtPowerUsage = guifactory.createTextArea( \"Power usage: \" + powerUsage + \" Watts\", \"txtPowerUsage\", pnlInteraction);\r\n\t\ttxtPowerUsage.setPositionGlobal(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\tpnlInteractionPos.getY() + 140\t\t\r\n\t\t\t\t\t\t));\r\n\t\ttxtPowerUsage.setVisible( false);\r\n\t\t\r\n\t\t\r\n\t\t// ON/OFF BUTTON\r\n\t\t\r\n\t\tbtnOnOff = guifactory.createButton( \"Turn device On/Off\", \"btnOnOff\", pnlInteraction);\r\n\t\tbtnOnOff.setPosition( txtPowerUsage.getPosition( TransformSpace.GLOBAL));\r\n\t\tbtnOnOff.addGestureListener( TapProcessor.class, new BtnOnOffListener());\r\n\t\t\r\n\t\t\r\n\t\t// SUBDEVICE BUTTON PANEL\r\n\t\t\r\n\t\tpnlSubDeviceButtons = guifactory.createPanel(\r\n\t\t\t\tpnlPanel.getPosition( TransformSpace.GLOBAL).getX(),\r\n\t\t\t\tbtnOnOff.getVectorNextToComponent( 10, false).getY(),\r\n\t\t\t\tpnlPanel.getWidthXY( TransformSpace.GLOBAL),\r\n\t\t\t\tdevice.getSubDevice().size() * (btnOnOff.getHeight()+10),\r\n\t\t\t\t\"pnlSubDeviceButtons\",\r\n\t\t\t\tpnlInteraction);\r\n\t\t\r\n\t\t// SUB DEVICE BUTTONS\r\n\t\t\r\n\t\tsubDeviceButtons = new LinkedList<MTButton>();\r\n\t\tfor( int i = 0; i < device.getSubDevice().size(); i++){\r\n\t\t\t\r\n\t\t\tPhysicalDevice subDevice = device.getSubDevice().get( i);\r\n\t\t\t\r\n\t\t\t// get button's caption\r\n\t\t\tString caption = subDevice.getName();\r\n\t\t\tif(caption == null || caption.equals( \"\"))\r\n\t\t\t\tcaption = subDevice.getId();\r\n\t\t\t\r\n\t\t\tMTButton btnSubDevice = guifactory.createButton( caption, \"btnSubDevice_\" + subDevice.getId(), pnlSubDeviceButtons);\r\n\t\t\tbtnSubDevice.setPosition(\r\n\t\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\t\r\n\t\t\t\t\t\tpnlSubDeviceButtons.getPosition( TransformSpace.GLOBAL).getY() + i*(btnSubDevice.getHeight() + 10)\r\n\t\t\t\t\t));\r\n\t\t\t\r\n\t\t\tsubDeviceButtons.add( btnSubDevice);\r\n\t\t\tbtnSubDevice.addGestureListener( TapProcessor.class, new BtnSubDeviceListener( subDevice));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// EDIT BUTTON\r\n\t\t\r\n\t\tbtnEdit = guifactory.createButton( \"Edit\", \"btnEdit\", pnlInteraction);\r\n\t\tbtnEdit.setPosition( new Vector3D( xPos, app.getHeight() - 2*btnEdit.getHeight() - 30));\r\n\t\tbtnEdit.addGestureListener( TapProcessor.class, new BtnEditListener());\r\n\t\t\r\n\t\t\r\n\t\t// BUTTON HIDE\r\n\t\t\r\n\t\tbtnHide = guifactory.createButton( \"Hide menu\", \"btnHide\", pnlPanel);\r\n\t\tbtnHide.setPosition( new Vector3D( xPos, app.getHeight() - btnHide.getHeight() - 20));\r\n\t\tbtnHide.addGestureListener( TapProcessor.class, new BtnHideListener());\r\n\t\t\r\n\t\t\r\n\t\t///// EDIT-ELEMENTS /////\r\n\r\n\t\tchkMovePlanar = guifactory.createCheckButton( \"Move planar\", \"chkMovePlanar\", pnlEdit);\r\n\t\tchkMovePlanar.setPosition(\r\n\t\t\t\tnew Vector3D(\r\n\t\t\t\t\t\txPos,\r\n\t\t\t\t\t\ttxtItemName.getPosition( TransformSpace.GLOBAL).getY() + txtItemName.getHeightXY( TransformSpace.GLOBAL)+ 20\t\r\n\t\t\t\t));\r\n\t\tchkMovePlanar.addGestureListener( TapProcessor.class, new ChkMovePlanarListener());\r\n\r\n\t\t\r\n\t\tchkMoveY = guifactory.createCheckButton( \"Move up/down\", \"chkMoveY\", pnlEdit);\r\n\t\tchkMoveY.setPosition( chkMovePlanar.getVectorNextToComponent( 10, false));\r\n\t\tchkMoveY.addGestureListener( TapProcessor.class, new ChkMoveYListener());\r\n\r\n\t\t\r\n\t\tchkRotate = guifactory.createCheckButton( \"Rotate\", \"chkRotate\", pnlEdit);\r\n\t\tchkRotate.setPosition( chkMoveY.getVectorNextToComponent( 10, false));\r\n\t\tchkRotate.addGestureListener( TapProcessor.class, new ChkRotateListener());\r\n\r\n\t\t\r\n\t\tchkScale = guifactory.createCheckButton( \"Scale\", \"chkScale\", pnlEdit);\r\n\t\tchkScale.setPosition( chkRotate.getVectorNextToComponent( 10, false));\r\n\t\tchkScale.addGestureListener( TapProcessor.class, new ChkScaleListener());\r\n\r\n\t\t\r\n\t\tbtnChangeVisualisation = guifactory.createButton( \"Change Style\", \"btnChangeVisualisation\", pnlEdit);\r\n\t\tbtnChangeVisualisation.setPosition( chkScale.getVectorNextToComponent( 10, false));\r\n\t\tbtnChangeVisualisation.addGestureListener( TapProcessor.class, new BtnChangeVisualisationListener());\r\n\t\t\r\n\t\t\r\n\t\tbtnSave = guifactory.createButton( \"Save\", \"btnSave\", pnlEdit);\r\n\t\tbtnSave.setPosition( btnEdit.getPosition());\r\n\t\tbtnSave.addGestureListener( TapProcessor.class, new BtnSaveListener());\r\n\t}", "private void addToPanel(){\n getContentPane().add(jdpFondo);\n jtpcContenedor.add(jtpPanel);\n\tjtpcContenedor.add(jtpPanel2);\n jdpFondo.add(jtpcContenedor, BorderLayout.CENTER);\n jdpFondo.add(jpnlPanelPrincilal);\n }", "public void dibujar(JPanel panel);", "@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}", "public IntegracionMenu() {\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 1123, 633);\r\n\t\t\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tmenuBar.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tsetJMenuBar(menuBar);\r\n\t\t\r\n\t\tJMenu mnInicio = new JMenu(\"Inicio\");\r\n\t\tmnInicio.setForeground(Color.BLACK);\r\n\t\tmnInicio.setFont(new Font(\"Segoe UI\", Font.PLAIN, 15));\r\n\t\tmenuBar.add(mnInicio);\r\n\t\t\r\n\t\tJMenu mnArchivo = new JMenu(\"Archivo\");\r\n\t\tmnArchivo.setForeground(Color.BLACK);\r\n\t\tmnArchivo.setFont(new Font(\"Segoe UI\", Font.PLAIN, 15));\r\n\t\tmenuBar.add(mnArchivo);\r\n\t\t\r\n\t\tJMenu mnAyuda = new JMenu(\"Ayuda\");\r\n\t\tmnAyuda.setForeground(Color.BLACK);\r\n\t\tmnAyuda.setFont(new Font(\"Segoe UI\", Font.PLAIN, 15));\r\n\t\tmenuBar.add(mnAyuda);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tcontentPane.add(panel, BorderLayout.WEST);\r\n\t\tGridBagLayout gbl_panel = new GridBagLayout();\r\n\t\tgbl_panel.columnWidths = new int[]{209, 0};\r\n\t\tgbl_panel.rowHeights = new int[]{150, 45, 45, 45, 45, 45, 0, 0, 0, 0};\r\n\t\tgbl_panel.columnWeights = new double[]{1.0, Double.MIN_VALUE};\r\n\t\tgbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel.setLayout(gbl_panel);\r\n\t\t\r\n\t\tJButton button = new JButton(\"Panel Principal\");\r\n\t\tbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"panel inicio\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setLayout(null);\r\n\t\tGridBagConstraints gbc_panel_1 = new GridBagConstraints();\r\n\t\tgbc_panel_1.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_panel_1.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_1.gridx = 0;\r\n\t\tgbc_panel_1.gridy = 0;\r\n\t\tpanel.add(panel_1, gbc_panel_1);\r\n\t\t\r\n\t\tlblID = new JLabel(\"\");\r\n\t\tlblID.setBounds(74, 59, 107, 14);\r\n\t\tpanel_1.add(lblID);\r\n\t\t\r\n\t\t\r\n\t\tlblNombre= new JLabel(\"\");\r\n\t\tlblNombre.setBounds(74, 96, 125, 14);\r\n\t\tpanel_1.add(lblNombre);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"ID:\");\r\n\t\tlblNewLabel.setBounds(10, 59, 46, 14);\r\n\t\tpanel_1.add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNombre_1 = new JLabel(\"Nombre:\");\r\n\t\tlblNombre_1.setBounds(10, 96, 54, 14);\r\n\t\tpanel_1.add(lblNombre_1);\r\n\t\t\r\n\t\tJLabel lblDatosDelLogin = new JLabel(\"Datos del login\");\r\n\t\tlblDatosDelLogin.setBounds(74, 11, 125, 14);\r\n\t\tpanel_1.add(lblDatosDelLogin);\r\n\t\tbutton.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbutton.setPreferredSize(new Dimension(209, 45));\r\n\t\tbutton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbutton.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbutton.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_button = new GridBagConstraints();\r\n\t\tgbc_button.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_button.anchor = GridBagConstraints.NORTH;\r\n\t\tgbc_button.gridx = 0;\r\n\t\tgbc_button.gridy = 1;\r\n\t\tpanel.add(button, gbc_button);\r\n\t\t\r\n\t\tJButton btnGestionUsuarios = new JButton(\"Gestión De Usuarios\");\r\n\t\tbtnGestionUsuarios.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"Gestion de usuarios\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnGestionUsuarios.setPreferredSize(new Dimension(209, 45));\r\n\t\tbtnGestionUsuarios.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnGestionUsuarios.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnGestionUsuarios.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnGestionUsuarios.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_btnGestionUsuarios = new GridBagConstraints();\r\n\t\tgbc_btnGestionUsuarios.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnGestionUsuarios.gridx = 0;\r\n\t\tgbc_btnGestionUsuarios.gridy = 2;\r\n\t\tpanel.add(btnGestionUsuarios, gbc_btnGestionUsuarios);\r\n\t\t\r\n\t\tJButton btnCreacinDeUsuarios = new JButton(\"Creación de Usuarios\");\r\n\t\tbtnCreacinDeUsuarios.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"panel creacion users\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreacinDeUsuarios.setPreferredSize(new Dimension(209, 45));\r\n\t\tbtnCreacinDeUsuarios.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnCreacinDeUsuarios.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnCreacinDeUsuarios.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnCreacinDeUsuarios.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_btnCreacinDeUsuarios = new GridBagConstraints();\r\n\t\tgbc_btnCreacinDeUsuarios.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnCreacinDeUsuarios.gridx = 0;\r\n\t\tgbc_btnCreacinDeUsuarios.gridy = 3;\r\n\t\tpanel.add(btnCreacinDeUsuarios, gbc_btnCreacinDeUsuarios);\r\n\t\t\r\n\t\tJButton btnModificarProductos = new JButton(\"Modificar Productos\");\r\n\t\tbtnModificarProductos.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tbtnModificarProductos.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnModificarProductos.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnModificarProductos.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnModificarProductos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout, \"modificar producto\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnModificarProductos.setPreferredSize(new Dimension(209, 45));\r\n\t\tGridBagConstraints gbc_btnModificarProductos = new GridBagConstraints();\r\n\t\tgbc_btnModificarProductos.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnModificarProductos.gridx = 0;\r\n\t\tgbc_btnModificarProductos.gridy = 4;\r\n\t\tpanel.add(btnModificarProductos, gbc_btnModificarProductos);\r\n\t\t\r\n\t\tJButton btnListadoDeCompradores = new JButton(\"Listado de compradores\");\r\n\t\tbtnListadoDeCompradores.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tCardLayout cl = (CardLayout)(panelCardLayout.getLayout());\r\n\t\t\t\tcl.show(panelCardLayout,\"panel Compradores\"\t); //$NON-NLS-1$\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnListadoDeCompradores.setPreferredSize(new Dimension(209, 45));\r\n\t\tbtnListadoDeCompradores.setHorizontalTextPosition(SwingConstants.LEADING);\r\n\t\tbtnListadoDeCompradores.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\tbtnListadoDeCompradores.setFont(new Font(\"Verdana\", Font.BOLD, 13));\r\n\t\tbtnListadoDeCompradores.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\tGridBagConstraints gbc_btnListadoDeCompradores = new GridBagConstraints();\r\n\t\tgbc_btnListadoDeCompradores.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_btnListadoDeCompradores.gridx = 0;\r\n\t\tgbc_btnListadoDeCompradores.gridy = 5;\r\n\t\tpanel.add(btnListadoDeCompradores, gbc_btnListadoDeCompradores);\r\n\t\t\r\n\t\tpanelCardLayout= new JPanel();\r\n\t\tpanelCardLayout.setPreferredSize(new Dimension(104, 18));\r\n\t\tcontentPane.add(panelCardLayout, BorderLayout.CENTER);\r\n\t\tpanelCardLayout.setLayout(new CardLayout(0, 0));\r\n\t\t\r\n\t\tJPanel panelInicio = new PanelPrincipal();\r\n\t \r\n\t\tpanelCardLayout.add(panelInicio, \"panel inicio\");\r\n\t\t\r\n\t\tJPanel panelCreacionDeUsers = new PanelUsuarios(null);\r\n\t\tpanelCardLayout.add(panelCreacionDeUsers, \"panel creacion users\");\r\n\t\t\r\n\t\tJPanel panelModificarProductos = new ModificarProducto();\r\n\t\tpanelCardLayout.add(panelModificarProductos, \"modificar producto\");\r\n\t\t\r\n\t\tJPanel panelListadoCompradores = new ListadoCompradores();\r\n\t\tpanelCardLayout.add(panelListadoCompradores, \"panel Compradores\"); //$NON-NLS-1$\r\n\t\t\t\r\n\t\tJPanel panelGestionUsuarios = new GestionDeUsuarios();\r\n\t\tpanelCardLayout.add(panelGestionUsuarios, \"Gestion de usuarios\");\r\n\t\t\r\n\t\t\r\n\t}", "public void setUpHUDPanel() {\n\n\t\t//Criando e configurando painel que apresenta botoes de acoes\n\t\tthis.playerOptionPanel = new JPanel(null);\n\t\tthis.playerOptionPanel.setBounds(730, 315, 275, 235);\n\t\tthis.playerOptionPanel.setOpaque(false);\n\n\t\t//Criando e configurando botao para jogar/manipular dado\n\t\tthis.moveButton = new JButton(\"JOGAR O DADO\");\n\t\tthis.moveButton.setBounds(45, 25, 175, 45);\n\t\tthis.moveButton.setActionCommand(\"MOVE\");\n\t\tthis.moveButton.setMnemonic(KeyEvent.VK_M);\n\t\tthis.moveButton.setToolTipText(\"Cique aqui para jogar o dado e realizar o movimento\");\n\n\t\t//Adicionando tratador de evento para clique no botao\n\t\tthis.moveButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tmanipulaDice();\n\t\t\t}\n\t\t});\n\n\t\t//Criando e configurando botao para realizar palpite\n\t\tthis.suggestButton = new JButton(\"REALIZAR PALPITE\");\n\t\tthis.suggestButton.setBounds(45, 90, 175, 45);\n\t\tthis.suggestButton.setActionCommand(\"SUGGEST\");\n\t\tthis.suggestButton.setMnemonic(KeyEvent.VK_S);\n\t\tthis.suggestButton.setEnabled(false);\n\t\tthis.suggestButton.setToolTipText(\"Clique aqui para realizar sugestão\");\n\n\t\t//Criando e configurando botao para realizar acusacao\n\t\tthis.accuseButton = new JButton(\"ACUSAR\");\n\t\tthis.accuseButton.setBounds(45, 160, 175, 45);\n\t\tthis.accuseButton.setActionCommand(\"ACCUSE\");\n\t\tthis.accuseButton.setMnemonic(KeyEvent.VK_A);\n\t\tthis.accuseButton.setToolTipText(\"Clique para fazer acusacao. OBS: Acusacao incorreta poderá te eliminar do jogo.\");\n\n\t\t//Adicionando os botoes corretamente no painel\n\t\tthis.playerOptionPanel.add(this.moveButton);\n\t\tthis.playerOptionPanel.add(this.suggestButton);\n\t\tthis.playerOptionPanel.add(this.accuseButton);\n\n\t\t//Incluindo painel em painel maior\n\t\tthis.add(this.playerOptionPanel);\n\t}", "@Override\r\n \tpublic void start(AcceptsOneWidget panel, EventBus eventBus) {\n \t\tpanel.setWidget(view);\t\t\r\n \t}", "public void addPanelControls() {\n\t\tlist_sort = new JComboBox<>(new String[] { \"MSSV\", \"HoTen\", \"NTNS\" });\r\n\t\tbtn_sapxep = new JButton(\"Sap xep\");\r\n\t\tbtn_them = new JButton(\"Them\");\r\n\t\tbtn_xoa = new JButton(\"Xoa\");\r\n\t\tbtn_save = new JButton(\"Save\");\r\n\t\tbtn_load = new JButton(\"Load\");\r\n\r\n\t\tJPanel mControlPanel = new JPanel(new GridLayout(5, 1));\r\n\t\tmControlPanel.add(btn_them);\r\n\t\tmControlPanel.add(btn_xoa);\r\n\t\tJPanel sapxepPanel = new JPanel();\r\n\t\tsapxepPanel.add(list_sort);\r\n\t\tsapxepPanel.add(btn_sapxep);\r\n\t\tmControlPanel.add(sapxepPanel);\r\n\t\tmControlPanel.add(btn_save);\r\n\t\tmControlPanel.add(btn_load);\r\n\r\n\t\tmControlPanel.setPreferredSize(new Dimension(380, 200));\r\n\t\tmControlPanel.setBorder(new TitledBorder(\"Controls\"));\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tc.weightx = 0.5;\r\n\t\tc.gridx = 1;\r\n\t\tc.gridy = 0;\r\n\t\tpanel.add(mControlPanel,c);\r\n\t}", "protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}", "private void setUIComponents() {\n\t\tframe.setTitle(\"Departamento de ventas\");\n\t\tframe.setMinimumSize(new Dimension(700, 500));\n\n\t\t/*\n\t\t * Paneles externos. Solo hay que añadir en el bottomPanel\n\t\t */\n\t\tJPanel topPanel = new JPanel();\n\t\tframe.getContentPane().add(topPanel, BorderLayout.NORTH);\n\t\ttopPanel.setBackground(new Color(233, 196, 106));\n\t\ttopPanel.setBounds(100, 100, 100, 100);\n\n\t\tJPanel leftPanel = new JPanel();\n\t\tframe.getContentPane().add(leftPanel, BorderLayout.WEST);\n\t\tleftPanel.setBackground(new Color(233, 196, 106));\n\n\t\tJPanel rightPanel = new JPanel();\n\t\tframe.getContentPane().add(rightPanel, BorderLayout.EAST);\n\t\trightPanel.setBackground(new Color(233, 196, 106));\n\n\t\tJPanel bottomPanel = new JPanel();\n\t\tframe.getContentPane().add(bottomPanel, BorderLayout.SOUTH);\n\t\tbottomPanel.setBackground(new Color(233, 196, 106));\n\t\tbottomPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 0));\n\t\t// Se añaden los componentes al bottomPanel\n\t\tbtnLogOut = new JButton(\"Cerrar Sesión\");\n\t\tbtnLogOut.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\tbtnLogOut.setBorder(null);\n\t\tbtnLogOut.setBackground(new Color(233, 196, 106));\n\t\tbtnLogOut.setFont(new Font(\"SansSerif\", Font.BOLD, 12));\n\t\tbottomPanel.add(btnLogOut);\n\n\t\tJLabel lblLogOut = new JLabel(\"X\");\n\t\tlblLogOut.setForeground(new Color(220, 20, 60));\n\t\tlblLogOut.setFont(new Font(\"SansSerif\", Font.BOLD, 13));\n\t\tbottomPanel.add(lblLogOut);\n\n\t\t/*\n\t\t * mainPanel. Dentro se crean otros paneles para añadir los distintos\n\t\t * componentes.\n\t\t */\n\t\tJPanel mainPanel = new JPanel();\n\t\tmainPanel.setBorder(new MatteBorder(2, 2, 1, 1, (Color) new Color(0, 0, 0)));\n\t\tframe.getContentPane().add(mainPanel);\n\t\tGridBagLayout gbl_mainPanel = new GridBagLayout();\n\t\tgbl_mainPanel.columnWidths = new int[] { 1061, 0 };\n\t\tgbl_mainPanel.rowHeights = new int[] { 137, 298, 328, 0 };\n\t\tgbl_mainPanel.columnWeights = new double[] { 0.0, Double.MIN_VALUE };\n\t\tgbl_mainPanel.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };\n\t\tmainPanel.setLayout(gbl_mainPanel);\n\n\t\t// Paneles que componen el mainPanel\n\n\t\tJPanel clientPanel = new JPanel();\n\t\tGridBagConstraints gbc_clientesPanel = new GridBagConstraints();\n\t\tgbc_clientesPanel.fill = GridBagConstraints.BOTH;\n\t\tgbc_clientesPanel.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_clientesPanel.gridx = 0;\n\t\tgbc_clientesPanel.gridy = 0;\n\t\tmainPanel.add(clientPanel, gbc_clientesPanel);\n\t\tclientPanel.setLayout(new BorderLayout());\n\t\tclientPanel.setPreferredSize(new Dimension(10, 50));\n\n\t\t// Añadir Jlabel a clientesPanel\n\t\tJLabel lblClientData = new JLabel(\"Datos del cliente\");\n\t\tlblClientData.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblClientData.setFont(new Font(\"SansSerif\", Font.BOLD, 25));\n\t\tclientPanel.add(lblClientData, BorderLayout.CENTER);\n\n\t\t// Panel para rellenar datos de cliente.\n\t\tJPanel clientDataPanel = new JPanel();\n\t\tGridBagConstraints gbc_datosClientePanel = new GridBagConstraints();\n\t\tgbc_datosClientePanel.fill = GridBagConstraints.BOTH;\n\t\tgbc_datosClientePanel.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_datosClientePanel.gridx = 0;\n\t\tgbc_datosClientePanel.gridy = 1;\n\t\tmainPanel.add(clientDataPanel, gbc_datosClientePanel);\n\t\tclientDataPanel.setLayout(new GridLayout(1, 2));\n\n\t\tJPanel clientDataPanelLeft = new JPanel();\n\t\tclientDataPanel.add(clientDataPanelLeft);\n\t\tSpringLayout sl_datosClientePanelLeft = new SpringLayout();\n\t\tclientDataPanelLeft.setLayout(sl_datosClientePanelLeft);\n\n\t\t// Componentes panel derecho\n\t\t// Añadir Jlabel y JText para los distintos datos del ciente\n\t\tJLabel lblCod = new JLabel(\"Código de cliente:\");\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, lblCod, 26, SpringLayout.NORTH, clientDataPanelLeft);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, lblCod, 70, SpringLayout.WEST, clientDataPanelLeft);\n\t\tlblCod.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\tclientDataPanelLeft.add(lblCod);\n\n\t\ttxtCod = new JTextField();\n\t\ttxtCod.setEnabled(false);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, txtCod, -3, SpringLayout.NORTH, lblCod);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, txtCod, 74, SpringLayout.EAST, lblCod);\n\t\ttxtCod.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\ttxtCod.setColumns(10);\n\t\tclientDataPanelLeft.add(txtCod);\n\n\t\t// Añadir Jlabel y JText para los distintos datos del ciente\n\t\tJLabel lblNombreCliente = new JLabel(\"Nombre:\");\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, lblNombreCliente, 26, SpringLayout.SOUTH, lblCod);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, lblNombreCliente, 0, SpringLayout.WEST, lblCod);\n\t\tlblNombreCliente.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\tclientDataPanelLeft.add(lblNombreCliente);\n\n\t\ttxtName = new JTextField();\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, txtName, -3, SpringLayout.NORTH, lblNombreCliente);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, txtName, 0, SpringLayout.WEST, txtCod);\n\t\ttxtName.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\ttxtName.setColumns(10);\n\t\tclientDataPanelLeft.add(txtName);\n\n\t\t// Añadir Jlabel y JText para los distintos datos del ciente\n\t\tJLabel lblSurnames = new JLabel(\"Apellidos:\");\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, lblSurnames, 26, SpringLayout.SOUTH,\n\t\t\t\tlblNombreCliente);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, lblSurnames, 0, SpringLayout.WEST, lblCod);\n\t\tlblSurnames.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\tclientDataPanelLeft.add(lblSurnames);\n\n\t\ttxtSurnames = new JTextField();\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, txtSurnames, -3, SpringLayout.NORTH, lblSurnames);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, txtSurnames, 0, SpringLayout.WEST, txtCod);\n\t\ttxtSurnames.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\ttxtSurnames.setColumns(10);\n\t\tclientDataPanelLeft.add(txtSurnames);\n\n\t\tJLabel lblDni = new JLabel(\"DNI:\");\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, lblDni, 26, SpringLayout.SOUTH, lblSurnames);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, lblDni, 0, SpringLayout.WEST, lblCod);\n\t\tlblDni.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\tclientDataPanelLeft.add(lblDni);\n\n\t\ttxtDni = new JTextField();\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, txtDni, -3, SpringLayout.NORTH, lblDni);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, txtDni, 0, SpringLayout.WEST, txtCod);\n\t\ttxtDni.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\ttxtDni.setColumns(10);\n\t\tclientDataPanelLeft.add(txtDni);\n\n\t\t// Añadir Jlabel y JText para los distintos datos del ciente\n\t\tJLabel lblTelephone = new JLabel(\"Teléfono:\");\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, lblTelephone, 26, SpringLayout.SOUTH, lblDni);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, lblTelephone, 0, SpringLayout.WEST, lblCod);\n\t\tlblTelephone.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\tclientDataPanelLeft.add(lblTelephone);\n\n\t\ttxtTelephone = new JTextField();\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.NORTH, txtTelephone, -3, SpringLayout.NORTH, lblTelephone);\n\t\tsl_datosClientePanelLeft.putConstraint(SpringLayout.WEST, txtTelephone, 0, SpringLayout.WEST, txtCod);\n\t\ttxtTelephone.setFont(new Font(\"SansSerif\", Font.PLAIN, 15));\n\t\ttxtTelephone.setColumns(10);\n\t\tclientDataPanelLeft.add(txtTelephone);\n\n\t\tJPanel clientDataPanelRight = new JPanel();\n\t\tclientDataPanel.add(clientDataPanelRight);\n\n\t\tJPanel bottonPanel = new JPanel();\n\t\tGridBagConstraints gbc_botonPanel = new GridBagConstraints();\n\t\tgbc_botonPanel.fill = GridBagConstraints.BOTH;\n\t\tgbc_botonPanel.gridx = 0;\n\t\tgbc_botonPanel.gridy = 2;\n\t\tmainPanel.add(bottonPanel, gbc_botonPanel);\n\t\tbottonPanel.setLayout(new FlowLayout(1, 250, 100));\n\n\t\t// Botones\n\t\tbackButton = new JButton(\"Volver al menú\");\n\t\tbackButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\tbackButton.setFont(new Font(\"SansSerif\", Font.BOLD, 15));\n\t\tbackButton.setBackground(new Color(244, 162, 97));\n\t\tbackButton.setForeground(Color.WHITE);\n\t\tbottonPanel.add(backButton);\n\n\t\tregisterButton = new JButton(\"Añadir cliente\");\n\t\tregisterButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\tregisterButton.setFont(new Font(\"SansSerif\", Font.BOLD, 15));\n\t\tregisterButton.setBackground(new Color(231, 111, 81));\n\t\tregisterButton.setForeground(Color.WHITE);\n\t\tbottonPanel.add(registerButton);\n\n\t}", "@Override protected JComponent setupPanel()\t{ return null; }", "public void PanelPrincipalDos() {\n panelInicializarDos = new JPanel();\n panelInicializarDos.setBackground(myColorHeaderTitulo);\n panelInicializarDos.setBounds(0, 0, 1000, 400);\n panelInicializarDos.setLayout(null);\n panelInicializarDos.setVisible(false);\n\n botonIniciaizarDos = new JButton(\"Inicializar\");\n botonIniciaizarDos.setBackground(myColorBotonHeader);\n botonIniciaizarDos.setForeground(myColorBotonLetraHeader);\n botonIniciaizarDos.setBounds(200, 160, 220, 60);\n\n textoSaldoInicial = new JLabel(\"Saldo Inicial:\");\n textoSaldoInicial.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoSaldoInicial.setBounds(20, 60, 200, 40);\n textoSaldoInicial.setForeground(Color.WHITE);\n\n TextoSaldoInicial = new JTextField();\n TextoSaldoInicial.setBounds(130, 60, 130, 40);\n\n textoFechaInicial = new JLabel(\"Fecha Actual Agregada Automaticamente\");\n textoFechaInicial.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoFechaInicial.setBounds(20, 10, 450, 40);\n textoFechaInicial.setForeground(Color.WHITE);\n\n textoMostrarInicial = new JLabel(\"Inicializar.in Generado:\");\n textoMostrarInicial.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoMostrarInicial.setBounds(500, 5, 450, 40);\n textoMostrarInicial.setForeground(Color.WHITE);\n\n textoPisos = new JLabel(\"Número Pisos:\");\n textoPisos.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoPisos.setBounds(20, 110, 200, 40);\n textoPisos.setForeground(Color.WHITE);\n\n CampoTextoPisos = new JTextField();\n CampoTextoPisos.setBounds(140, 110, 120, 40);\n\n botonIngresarInicializar = new JButton(\"Ingresar\");\n botonIngresarInicializar.setBackground(myColorBotonHeader);\n botonIngresarInicializar.setForeground(myColorBotonLetraHeader);\n botonIngresarInicializar.setBounds(50, 180, 100, 40);\n\n textArea2 = new JTextArea();\n String texto;\n textArea2.setEditable(false);\n scroll2 = new JScrollPane(textArea2);\n scroll2.setBounds(450, 40, 300, 400);\n panelInicializarDos.add(scroll2);\n\n //===============================\n //todo contenido panel precio\n panelPreciosDos = new JPanel();\n panelPreciosDos.setBackground(myColorHeaderTitulo);\n panelPreciosDos.setBounds(0, 0, 1000, 400);\n panelPreciosDos.setLayout(null);\n panelPreciosDos.setVisible(false);\n\n botonPreciosDos = new JButton(\"Precios\");\n botonPreciosDos.setBackground(myColorBotonHeader);\n botonPreciosDos.setForeground(myColorBotonLetraHeader);\n botonPreciosDos.setBounds(530, 160, 220, 60);\n\n //inicializar precios habitaciones\n TextoHabitaciones = new JLabel(\"-> Precios Habitaciones <-\");\n TextoHabitaciones.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n TextoHabitaciones.setBounds(20, 5, 230, 40);\n TextoHabitaciones.setForeground(Color.WHITE);\n\n textoIndv = new JLabel(\"Individual: \");\n textoIndv.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoIndv.setBounds(20, 40, 200, 30);\n textoIndv.setForeground(Color.WHITE);\n\n CampoTextoIndv = new JTextField();\n CampoTextoIndv.setBounds(110, 40, 120, 30);\n\n textoDoble = new JLabel(\"Doble: \");\n textoDoble.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoDoble.setBounds(20, 70, 200, 30);\n textoDoble.setForeground(Color.WHITE);\n\n CampoTextoDoble = new JTextField();\n CampoTextoDoble.setBounds(110, 70, 120, 30);\n\n textoMatri = new JLabel(\"Matri: \");\n textoMatri.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoMatri.setBounds(20, 100, 200, 30);\n textoMatri.setForeground(Color.WHITE);\n\n CampoTextoMatri = new JTextField();\n CampoTextoMatri.setBounds(110, 100, 120, 30);\n\n textoCuadruple = new JLabel(\"Cuadruple: \");\n textoCuadruple.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoCuadruple.setBounds(20, 130, 200, 30);\n textoCuadruple.setForeground(Color.WHITE);\n\n CampoTextoCuadruple = new JTextField();\n CampoTextoCuadruple.setBounds(110, 130, 120, 30);\n\n textoSuite = new JLabel(\"Suite: \");\n textoSuite.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoSuite.setBounds(20, 160, 200, 30);\n textoSuite.setForeground(Color.WHITE);\n\n CampoTextoSuite = new JTextField();\n CampoTextoSuite.setBounds(110, 160, 120, 30);\n\n //inicializar precio servicios\n TextoHabitaciones2 = new JLabel(\"-> Precios Servicios <-\");\n TextoHabitaciones2.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n TextoHabitaciones2.setBounds(20, 210, 200, 40);\n TextoHabitaciones2.setForeground(Color.WHITE);\n\n textoCam_A = new JLabel(\"Cama Adicional: \");//CAM_A\n textoCam_A.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoCam_A.setBounds(20, 260, 200, 30);\n textoCam_A.setForeground(Color.WHITE);\n\n comboCam_A = new JTextField();\n comboCam_A.setBounds(160, 260, 100, 40);\n\n textoCaj_F = new JLabel(\"Caja fuerte: \");//CAJ_F\n textoCaj_F.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoCaj_F.setBounds(20, 290, 200, 30);\n textoCaj_F.setForeground(Color.WHITE);\n\n comboCaj_F = new JTextField();\n comboCaj_F.setBounds(160, 290, 100, 40);\n\n //inicializar precios restaurant\n TextoHabitaciones3 = new JLabel(\"-> Precios Restaurant <-\");\n TextoHabitaciones3.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n TextoHabitaciones3.setBounds(280, 5, 230, 40);\n TextoHabitaciones3.setForeground(Color.WHITE);\n\n textoEsp_C = new JLabel(\"Esp_C: \");//ESP_C\n textoEsp_C.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoEsp_C.setBounds(260, 40, 200, 30);\n textoEsp_C.setForeground(Color.WHITE);\n\n CampoTextoEsp_C = new JTextField();\n CampoTextoEsp_C.setBounds(360, 40, 120, 30);\n\n textoLom_M = new JLabel(\"LOM_M: \");//\n textoLom_M.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoLom_M.setBounds(260, 70, 200, 30);\n textoLom_M.setForeground(Color.WHITE);\n\n CampoTextoLom_M = new JTextField();\n CampoTextoLom_M.setBounds(360, 70, 120, 30);\n\n textoJug_L = new JLabel(\"JUG_L: \");//JUG_L\n textoJug_L.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoJug_L.setBounds(260, 100, 200, 30);\n textoJug_L.setForeground(Color.WHITE);\n\n CampoTextoJug_L = new JTextField();\n CampoTextoJug_L.setBounds(360, 100, 120, 30);\n\n textoMalta = new JLabel(\"MALTA: \");//MALTA\n textoMalta.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoMalta.setBounds(260, 130, 200, 30);\n textoMalta.setForeground(Color.WHITE);\n\n CampoTextoMalta = new JTextField();\n CampoTextoMalta.setBounds(360, 130, 120, 30);\n\n botonIngresarPrecios = new JButton(\"Ingresar\"); //boton ingresar precios\n botonIngresarPrecios.setBackground(myColorBotonHeader);\n botonIngresarPrecios.setForeground(myColorBotonLetraHeader);\n botonIngresarPrecios.setBounds(330, 250, 150, 70);\n\n textoMostrarInicial2 = new JLabel(\"\");\n textoMostrarInicial2.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 17));\n textoMostrarInicial2.setBounds(680, 5, 450, 40);\n textoMostrarInicial2.setForeground(Color.WHITE);\n\n //panel extra \n panelDosExtra = new JPanel();\n panelDosExtra.setBackground(myColorHeaderTitulo);\n panelDosExtra.setBounds(0, 0, 1000, 400);\n panelDosExtra.setLayout(null);\n panelDosExtra.setVisible(false);\n\n //===============================\n //texto menu principal 2\n textoAbrirArchivoInicializar = new JLabel(\"Abrir Archivos Inicializar.in\");\n textoAbrirArchivoInicializar.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 20));\n textoAbrirArchivoInicializar.setBounds(10, 14, 281, 51);\n textoAbrirArchivoInicializar.setForeground(Color.WHITE);\n\n textoAbrirArchivoPrecio = new JLabel(\"Abrir Archivos Precio.in\");\n textoAbrirArchivoPrecio.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 20));\n textoAbrirArchivoPrecio.setBounds(10, 65, 281, 51);\n textoAbrirArchivoPrecio.setForeground(Color.WHITE);\n\n //- - - - - //botones menu principal 2\n botonAbrirArchivoInicializar = new JButton(\"Abrir Archivo\");\n botonAbrirArchivoInicializar.setBounds(300, 25, 150, 40);\n botonAbrirArchivoInicializar.setForeground(myColorBotonLetraHeader);\n botonAbrirArchivoInicializar.setBackground(myColorBotonHeader);\n\n botonAbrirArchivoPrecio = new JButton(\"Abrir Archivo\");\n botonAbrirArchivoPrecio.setBounds(300, 75, 150, 40);\n botonAbrirArchivoPrecio.setForeground(myColorBotonLetraHeader);\n botonAbrirArchivoPrecio.setBackground(myColorBotonHeader);\n\n //- - - - -\n textoCargaInteractiva = new JLabel(\"Carga Interactiva\");\n textoCargaInteractiva.setFont(new Font(\"Yu Gothic UI Semilight\", Font.PLAIN, 20));\n textoCargaInteractiva.setBounds(10, 150, 221, 51);\n textoCargaInteractiva.setForeground(Color.WHITE);\n //===============================\n //panel extra\n panelDosExtra.add(botonAbrirArchivoInicializar);\n panelDosExtra.add(botonAbrirArchivoPrecio);\n panelDosExtra.add(textoAbrirArchivoInicializar);\n panelDosExtra.add(textoAbrirArchivoPrecio);\n panelDosExtra.add(textoCargaInteractiva);\n\n panelDosExtra.add(botonIniciaizarDos);\n panelDosExtra.add(botonPreciosDos);\n panelDos.add(panelDosExtra);\n\n //===============================\n //agregar a panel inicializar\n panelInicializarDos.add(textoSaldoInicial);\n panelInicializarDos.add(TextoSaldoInicial);\n panelInicializarDos.add(textoFechaInicial);\n panelInicializarDos.add(textoPisos);\n panelInicializarDos.add(CampoTextoPisos);\n panelInicializarDos.add(botonIngresarInicializar);\n panelInicializarDos.add(textoMostrarInicial);\n //=============================== \n //agregar a panel precios \n\n panelPreciosDos.add(TextoHabitaciones);\n panelPreciosDos.add(textoIndv);\n panelPreciosDos.add(CampoTextoIndv);\n panelPreciosDos.add(textoDoble);\n panelPreciosDos.add(CampoTextoDoble);\n panelPreciosDos.add(textoMatri);\n panelPreciosDos.add(CampoTextoMatri);\n panelPreciosDos.add(textoCuadruple);\n panelPreciosDos.add(CampoTextoCuadruple);\n panelPreciosDos.add(textoSuite);\n panelPreciosDos.add(CampoTextoSuite);\n panelPreciosDos.add(TextoHabitaciones2);\n panelPreciosDos.add(TextoHabitaciones3);\n panelPreciosDos.add(textoEsp_C);\n panelPreciosDos.add(CampoTextoEsp_C);\n panelPreciosDos.add(textoLom_M);\n panelPreciosDos.add(CampoTextoLom_M);\n panelPreciosDos.add(textoJug_L);\n panelPreciosDos.add(CampoTextoJug_L);\n panelPreciosDos.add(textoMalta);\n panelPreciosDos.add(CampoTextoMalta);\n panelPreciosDos.add(textoCam_A);\n panelPreciosDos.add(comboCam_A);\n panelPreciosDos.add(textoCaj_F);\n panelPreciosDos.add(comboCaj_F);\n panelPreciosDos.add(botonIngresarPrecios);\n panelPreciosDos.add(botonIngresarPrecios);\n panelPreciosDos.add(textoMostrarInicial2);\n\n panelDos.add(panelInicializarDos);\n panelDos.add(panelPreciosDos);\n add(panelDos);\n }", "void addPanel() {\n \tPanel panel = new Panel();\r\n\r\n panel.setLayout(new GridLayout(4, 1));\r\n jSliderBrightness = makeTitledSilder(\"Helligkeit\", 0, 256, 128); // werte veraendert\r\n jSliderContrast = makeTitledSilder(\"Kontrast\", 0, 10, 5);\r\n jSliderSaturation = makeTitledSilder(\"Sättigung\", 0, 9, 4);\r\n jSliderHue = makeTitledSilder(\"Hue\", 0, 360, 0);\r\n //jSliderContrast = makeTitledSilder(\"Slider2-Wert\", 0, 100, 50);\r\n panel.add(jSliderBrightness);\r\n panel.add(jSliderContrast);\r\n panel.add(jSliderSaturation);\r\n panel.add(jSliderHue);\r\n \r\n add(panel);\r\n \r\n pack();\r\n }", "public OrgaPanel(Frame frame){\r\n\t\tsuper();\r\n\t\tthis.frame = frame;\r\n\r\n\t\tthis.removeAll();\r\n\t\tthis.setBackground(Color.WHITE);\r\n\t\tthis.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\r\n\t\tthis.add(Box.createRigidArea(new Dimension(0,5)));\r\n\r\n\t\t// Le panel titre et son label\r\n\t\tthis.orgaNamePanel = new JPanel();\r\n\t\torgaNamePanel.setBackground(Frame.colorEventary);\r\n\t\torgaNamePanel.setMaximumSize(new Dimension(800,30));\r\n\t\tthis.organisationName = new JLabel(\"\");\r\n\t\tthis.orgaNamePanel.add(organisationName);\r\n\t\tthis.add(orgaNamePanel);\r\n\t\tthis.add(Box.createRigidArea(new Dimension(0,10)));\r\n\r\n\t\t// Pour l'ajout d'un nouveau membre\r\n\t\tthis.inscriptionPan = new JPanel();\r\n\t\tthis.inscriptionPan.setBackground(Color.WHITE);\r\n\t\tthis.inscriptionPan.setMaximumSize(new Dimension(800,30));\r\n\t\tthis.inscriptionPan.setLayout(new BoxLayout(inscriptionPan, BoxLayout.X_AXIS));\r\n\t\tthis.add(this.inscriptionPan);\r\n\r\n\t\tJPanel inscriptionTitrePan = new JPanel();\r\n\t\tinscriptionTitrePan.setBackground(Frame.colorEventary);\r\n\t\tinscriptionTitrePan.setMaximumSize(new Dimension(200,30));\r\n\t\tinscriptionTitrePan.add(new JLabel(\"Ajouter un nouveau membre\"));\r\n\t\tinscriptionPan.add(inscriptionTitrePan);\r\n\r\n\t\tJPanel inscriptionBoxPan = new JPanel();\r\n\t\tinscriptionBoxPan.setMaximumSize(new Dimension(450,30));\r\n\t\tinscriptionBoxPan.setBackground(Color.WHITE);\r\n\t\tinscriptionBoxPan.add(new JLabel(\"Saisir Numéro Etudiant \"));\r\n\t\tthis.loginBox = new EventaryComboBox<String>();\r\n\t\tthis.loginBoxModel = new DefaultComboBoxModel<String>();\r\n\t\tthis.loginBox.setEditable(true);\r\n\t\tinscriptionBoxPan.add(this.loginBox);\r\n\t\tinscriptionPan.add(inscriptionBoxPan);\r\n\r\n\t\tthis.valider = new JButton();\r\n\t\tthis.valider.setMaximumSize(new Dimension(150,30));\r\n\t\tthis.valider.setBackground(new Color(139,233,120));\r\n\t\tthis.inscriptionPan.add(this.valider);\r\n\r\n\t\tthis.add(Box.createRigidArea(new Dimension(0,10)));\r\n\r\n\t\t// Pour la liste des membres\r\n\t\tJPanel listeTitrePan = new JPanel();\r\n\t\tlisteTitrePan.setBackground(Frame.colorEventary);\r\n\t\tlisteTitrePan.setMaximumSize(new Dimension(800,30));\r\n\t\tlisteTitrePan.add(new JLabel(\"Liste des Membres\"));\r\n\t\tthis.add(listeTitrePan);\r\n\r\n\t\tthis.listePan = new JPanel();\r\n\t\tthis.listePan.setMaximumSize(new Dimension(800,500));\r\n\t\tthis.listePan.setLayout(new BoxLayout(this.listePan, BoxLayout.Y_AXIS));\r\n\t\tthis.add(this.listePan);\r\n\r\n\t}", "protected abstract void iniciarLayout();", "private void panelSISC(String panel) {\n\n this.dispose();\n new InterfazPlantillaPestanas(panel).setVisible(true);\n }", "public PanelAdministrarMarcas() {\n initComponents();\n cargarTabla();\n }", "public AppoinmentPanel() {\n initComponents();\n }", "public void asetaPanelli(JPanel panel)\n {\n pane.removeAll();\n pane.add(panel);\n Refresh();\n }", "@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}", "private void inicialitzarComponents() {\n\t\tsetLayout(new BorderLayout(0, 0));\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setOpaque(false);\n\t\tadd(panel, BorderLayout.NORTH);\n\n\t\tBox verticalBox = Box.createVerticalBox();\n\t\tverticalBox.setOpaque(false);\n\t\tpanel.add(verticalBox);\n\n\t\tJPanel panel_2 = new JPanel();\n\t\tpanel_2.setOpaque(false);\n\t\tverticalBox.add(panel_2);\n\n\t\tJPanel panel_3 = new JPanel();\n\t\tpanel_3.setOpaque(false);\n\t\tverticalBox.add(panel_3);\n\n\t\tJLabel lblNewLabel = new JLabel(nomUsuari);\n\t\tlblNewLabel.setFont(lblNewLabel.getFont().deriveFont(30f));\n\t\tpanel_3.add(lblNewLabel);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setOpaque(false);\n\t\tadd(panel_1, BorderLayout.CENTER);\n\n\t\tBox verticalBox_1 = Box.createVerticalBox();\n\t\tverticalBox_1.setOpaque(false);\n\t\tpanel_1.add(verticalBox_1);\n\n\t\tJPanel panel_4 = new JPanel();\n\t\tpanel_4.setOpaque(false);\n\t\tverticalBox_1.add(panel_4);\n\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Peces girades:\");\n\t\tpanel_4.add(lblNewLabel_1);\n\n\t\tJLabel lblNewLabel_2 = new JLabel(String.valueOf(records.get(\"pecesGirades\")));\n\t\tpanel_4.add(lblNewLabel_2);\n\n\t\tJPanel panel_5 = new JPanel();\n\t\tpanel_5.setOpaque(false);\n\t\tverticalBox_1.add(panel_5);\n\n\t\tJLabel lblNewLabel_3 = new JLabel(\"Partides blanques guanyades:\");\n\t\tpanel_5.add(lblNewLabel_3);\n\n\t\tJLabel lblNewLabel_4 = new JLabel(String.valueOf(records.get(\"partidesBlanquesGuanyades\")));\n\t\tpanel_5.add(lblNewLabel_4);\n\n\t\tJPanel panel_6 = new JPanel();\n\t\tpanel_6.setOpaque(false);\n\t\tverticalBox_1.add(panel_6);\n\n\t\tJLabel lblNewLabel_5 = new JLabel(\"Partides negres guanyades:\");\n\t\tpanel_6.add(lblNewLabel_5);\n\n\t\tJLabel lblNewLabel_6 = new JLabel(String.valueOf(records.get(\"partidesNegresGuanyades\")));\n\t\tpanel_6.add(lblNewLabel_6);\n\n\t\tpanellRanking.setLayout(new BorderLayout());\n\t\tpanellRanking.add(menu, BorderLayout.NORTH);\n\t\tpanellRanking.add(taulaHoritzontal, BorderLayout.CENTER);\n\t\tpanellRanking.setBorder(BorderFactory.createLineBorder(Color.white, 4));\n\t\tJPanel panel_7 = new JPanel();\n\t\tpanel_7.setOpaque(false);\n\t\tpanel_7.setSize(20, 20);\n\t\tpanel_7.add(panellRanking);\n\t\tverticalBox_1.add(panel_7);\n\t}", "@Override\n\tpublic void createContents(Panel mainPanel) {\n\t\tmainPanel.setLayout(new ColumnLayout(5));\n\t\tnew Label(mainPanel).setText(\"El jugador\");\n\t\tnew Label(mainPanel).setText(this.getModel().nombre);\n\t\tnew Label(mainPanel).setText(\"se retira con \");\n\t\tnew Label(mainPanel).bindValueToProperty(Jugador.FICHAS);\n\t\tnew Label(mainPanel).setText(\"$\");\n\t Button boton = new Button(mainPanel).setCaption(\"OK\");\n\t boton.onClick(new MessageSend(this,\"cerrar\"));\n\t \n\t \n\t \n\t}", "private JPanel buildMainPanel() {\n FormLayout layout = new FormLayout(\"pref:grow\",\n \"pref, 3dlu, pref, 3dlu, pref, 12dlu, pref, 3dlu, pref, pref, \"\n + \"pref, pref, 9dlu, pref, 3dlu, pref, \"\n + \"pref, pref, pref, 0:grow, pref\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n // Bottom border\n builder.setBorder(Borders.createEmptyBorder(\"1dlu, 3dlu, 2dlu, 3dlu\"));\n CellConstraints cc = new CellConstraints();\n\n int row = 1;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.status\"),\n cc.xy(1, row));\n row += 2;\n builder.add(synchronizationStatusLabel, cc.xy(1, row));\n row += 2;\n builder.add(synchronizationDateLabel, cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.you_have\"),\n cc.xy(1, row));\n row += 2;\n builder.add(newNoticesLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(filesAvailableLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(downloadsLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(uploadsLine.getUIComponent(), cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(\n Translation.getTranslation(\"status_tab.online_storage.title\"),\n cc.xy(1, row));\n row += 2;\n builder.add(onlineStorageAccountLabel.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(onlineStorageSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(licenseInfoSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(buyNowLabel.getUIComponent(), cc.xy(1, row));\n if (PreferencesEntry.SHOW_TELL_A_FRIEND\n .getValueBoolean(getController()))\n {\n row += 2;\n builder.add(tellFriendLabel.getUIComponent(), cc.xy(1, row));\n }\n\n return builder.getPanel();\n }", "public PanelAdmin() {\n initComponents();\n tfUsuario.setText(DatosList[0]);\n tfNombre.setText(DatosList[1]);\n tfApellido.setText(DatosList[2]);\n if (DatosList[4].equals(\"1\"))\n {\n jlRol2.setText(\"Administrador\");\n }\n else\n {\n jlRol2.setText(\"común\");\n }\n tfFecha.setText(DatosList[5]);\n tfCorreo.setText(DatosList[6]);\n tfTeléfono.setText(DatosList[7]);\n Image img = new ImageIcon(DatosList[8]).getImage();\n ImageIcon Profile = new ImageIcon(img.getScaledInstance(100, 100, Image.SCALE_SMOOTH));\n tfFoto.setIcon(Profile);\n taDescripción.setText(DatosList[9]);\n if (DatosList[10].equals(\"1\"))\n {\n jlEstado2.setText(\"Activo\");\n }\n else\n {\n jlEstado2.setText(\"Inactivo\");\n }\n }", "private void initPanel() {\r\n panel = new JDialog(mdiForm);\r\n panel.setTitle(\"Groups\");\r\n panel.setSize(325, 290);\r\n panel.getContentPane().add(groupsController.getControlledUI());\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n java.awt.Dimension dlgSize = panel.getSize();\r\n int x = screenSize.width/1 - ((dlgSize.width/1)+20);\r\n int y = screenSize.height/1 - ((dlgSize.height/1)+60);\r\n panel.setLocation(x, y);\r\n panel.setFocusable(false);\r\n panel.show();\r\n panel.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r\n panel.addWindowListener(new java.awt.event.WindowAdapter() {\r\n public void windowClosing(java.awt.event.WindowEvent event) {\r\n panel.dispose();\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n }\r\n });\r\n }", "private JPanel getAnalyzaPanel() {\n\t\tif (analyzaPanel == null) {\n\t\t\tucivoText = new JLabel();\n\t\t\tucivoText.setBounds(new Rectangle(128, 61, 299, 15));\n\t\t\tucivoText.setText(\"\");\n\t\t\tucivoText.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tanalyzaPanel = new JPanel();\n\t\t\tanalyzaPanel.setLayout(null);\n\t\t\tanalyzaPanel.setVisible(false);\n\t\t\tanalyzaPanel.setBounds(new Rectangle(12, 7, 523, 420));\n\t\t\tanalyzaPanel.add(getZahrajTlacitko(), null);\n\t\t\tanalyzaPanel.add(getAnalyzujTlacitko(), null);\n\t\t\tanalyzaPanel.add(getVstupText(), null);\n\t\t\tanalyzaPanel.add(getLogList(), null);\n\t\t\tanalyzaPanel.add(getPotvrdTlacitko(), null);\n\t\t\tanalyzaPanel.add(getAnalyzaScroll(), null);\n\t\t\tanalyzaPanel.add(suzvukText, null);\n\t\t\tanalyzaPanel.add(getDalejTlacitko(), null);\n\t\t\tanalyzaPanel.add(cvicenieText, null);\n\t\t\tanalyzaPanel.add(ucivoText, null);\n\t\t}\n\t\treturn analyzaPanel;\n\t}", "public void addComponentsToPanel() {\n\t\tpanel.add(backBtn);\n\t\tpanel.add(forgotPassword);\n\t\tpanel.add(txtPass);\n\t\tpanel.add(txtSendEmail);\n\t\tpanel.add(remindMeBtn);\n\n\t\tpanel.add(backgroundLabel);\n\t}", "public Accueil() {\n initComponents();\n setLocationRelativeTo(null);\n desk.setLayout(new FlowLayout());\n jPanel1.setBackground(Color.white);\n //pane_search.setVisible(false);\n }", "void zeigeFenster() {\r\n\t\t_panel.setVisible(true);\r\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "private MenuServicios(){\n super(\"Gym Manager Servicios a Socios\");\n setBackground(Color.WHITE);\n\tgetContentPane().setLayout(null);\n setResizable(false);\n\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n pack();\n\tsetSize(942,592);\n\tsetLocationRelativeTo(null);\n image_path = \"jar:\" + getClass().getProtectionDomain().getCodeSource().\n getLocation().toString() + \"!/imagenes/\";\n \n jdpFondo = new JDesktopPane();\n jdpFondo.setBackground(Color.WHITE);\n jtpcContenedor = new JXTaskPaneContainer();\n jtpPanel = new JXTaskPane();\n jtpPanel2 = new JXTaskPane();\n jpnlPanelPrincilal = new JPanel();\n jpnlPanelPrincilal.setBackground(Color.WHITE);\n jtpcContenedor.setBackground(Color.LIGHT_GRAY);\n \n paginaInicio();\n crearComponentes();\n addToPanel();\n accionComponentes();\n \n }", "public void iniciarComponentes(){\n\n crearPanel();\n colocarBotones();\n \n }", "public MenuDroite() {\n\t\tlblBus = new JLabel(new ImageIcon(\"res/mini.png\"));\n\t\tlblVitesse = new JLabel(\"VITESSE\");\n\t\tlblLigne = new JLabel(\"LIGNE\");\n\t\tlblDestination = new JLabel(\"DESTINATION\");\n\t\tlblTraffic = new JLabel(\"Etat traffic\");\n\t\t\n\t\tlblBus.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\n\t\tbtnAugmenterVitesse = new JButton(\"+\");\n\t\tbtnReduireVitesse = new JButton(\"-\");\n\t\tbtnConnexion = new JButton(\"Se connecter\");\n\t\t//btnRafraichir = new JButton(\"Rafraichir\");\n\t\t\n\t\tmodelSlctDestination = new DefaultComboBoxModel();\n\t\t\n\t\tslctDestination = new JComboBox(modelSlctDestination);\n\t\tslctDestination.setEnabled(false);\n\t\t\n modelListeLigne = new DefaultListModel();\n\n\t\tlisteLigne = new JList(modelListeLigne);\n\t\t\n\t\tlisteLigne.addMouseListener(new ListeLigneCtrl());\n\t\tlisteLigne.setCellRenderer(new CellRenderer());\n\t\t\n\t\tbtnReduireVitesse.setMaximumSize(new Dimension(10,10));\n btnConnexion.addActionListener(new ConnecterCtrl());\n //btnRafraichir.addActionListener(new RafraichirCtrl());\n btnAugmenterVitesse.setEnabled(false);\n btnReduireVitesse.setEnabled(false);\n //btnRafraichir.setEnabled(false);\n\t\t\n\t\tJPanel pane = new JPanel();\n\t\tpane.setLayout(new BorderLayout());\n\t\t\n\t\tpane.add(btnReduireVitesse, BorderLayout.WEST);\n\t\tpane.add(lblVitesse, BorderLayout.CENTER);\n\t\tpane.add(btnAugmenterVitesse, BorderLayout.EAST);\n\t\t\n this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n this.add(lblBus);\n this.add(Box.createRigidArea(new Dimension(0,5)));\n this.add(lblTraffic);\n this.add(Box.createRigidArea(new Dimension(0,10)));\n this.add(pane);\n this.add(Box.createRigidArea(new Dimension(0,10)));\n //this.add(new Box.Filler(new Dimension(0,0), new Dimension(0,200), new Dimension(0,200)));\n this.add(slctDestination);\n this.add(Box.createRigidArea(new Dimension(0,10)));\n this.add(lblLigne);\n this.add(Box.createRigidArea(new Dimension(0,15)));\n this.add(new JSeparator());\n //this.add(Box.createRigidArea(new Dimension(0,15)));\n //this.add(btnRafraichir);\n this.add(Box.createRigidArea(new Dimension(0,15)));\n this.add(btnConnexion);\n this.add(Box.createRigidArea(new Dimension(0,15)));\n this.add(new JSeparator());\n this.add(Box.createRigidArea(new Dimension(0,15)));\n this.add(listeLigne);\n this.add(Box.createRigidArea(new Dimension(0,650)));\n\t}", "public AdminProfile_panel() {\n initComponents();\n \n }", "public PanelCompra() {\n initComponents();\n lblNick.setText(PanelCuenta.cuenta.getNickName());\n lblNombre.setText(PanelCuenta.cuenta.getUsuario().getNombre());\n lblDireccion.setText(PanelCuenta.cuenta.getUsuario().getDireccion());\n llenarTabla();\n }", "private void paginaAddAluno(JPanel quadroAddAluno){\n\t\t\tJLabel lblAdcionandoUmAluno = new JLabel(\"ADICIONANDO UM ALUNO\");\n\t\t\tlblAdcionandoUmAluno.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 26));\n\t\t\tlblAdcionandoUmAluno.setBounds(215, 135, 334, 32);\n\t\t\tquadroAddAluno.add(lblAdcionandoUmAluno);\n\t\t\t\n\t\t\tJLabel lblParaAdiconarUm = new JLabel(\"PARA ADICONAR UM ALUNO AO SISTEMA, BASTA COLOCAR O NOME, SOBRENOME DO NOVO ALUNO\");\n\t\t\tlblParaAdiconarUm.setBounds(73, 226, 648, 16);\n\t\t\tquadroAddAluno.add(lblParaAdiconarUm);\n\t\t\t\n\t\t\tJLabel lblNome = new JLabel(\"NOME:\");\n\t\t\tlblNome.setBounds(138, 341, 61, 16);\n\t\t\tquadroAddAluno.add(lblNome);\n\t\t\t\n\t\t\taddNome = new JFormattedTextField();\n\t\t\taddNome.setBounds(187, 336, 477, 26);\n\t\t\tquadroAddAluno.add(addNome);\n\t\t\taddNome.setColumns(10);\n\t\t\t\n\t\t\tJLabel lblSobrenome = new JLabel(\"SOBRENOME:\");\n\t\t\tlblSobrenome.setBounds(138, 434, 81, 16);\n\t\t\tquadroAddAluno.add(lblSobrenome);\n\t\t\t\n\t\t\taddSobrenome = new JFormattedTextField();\n\t\t\taddSobrenome.setBounds(231, 429, 433, 26);\n\t\t\tquadroAddAluno.add(addSobrenome);\n\t\t\taddSobrenome.setColumns(10);\n\t\t\t\n\t\t\tJButton btnNewButton = new JButton(\"ADICIONAR\");\n\t\t\tbtnNewButton.setBounds(336, 619, 117, 29);\n\t\t\tquadroAddAluno.add(btnNewButton);\n\t\t\t\n\t\t\tJLabel lblAoClicarEm = new JLabel(\"AO CLICAR EM ADICIONAR, UMA MENSAGEM SERÁ EXIBIDA INFORMANDO SE O ALUNO FOI ADIOCIONADO COM SUCESSO\");\n\t\t\tlblAoClicarEm.setBounds(20, 531, 763, 32);\n\t\t\tquadroAddAluno.add(lblAoClicarEm);\n\t\t}", "protected final void setPanelDatos(){\n panel_datos.setBackground(fondo);\n panel_datos.setBorder(BorderFactory.createTitledBorder(null,\"Datos\",TitledBorder.CENTER,TitledBorder.DEFAULT_POSITION, titulo, titulos));\n\n titulo_funcion.setFont(titulo); \n titulo_funcion.setForeground(titulos);\n titulo_h.setFont(titulo); \n titulo_h.setForeground(titulos);\n titulo_x.setFont(titulo); \n titulo_x.setForeground(titulos);\n titulo_n.setFont(titulo); \n titulo_n.setForeground(titulos);\n titulo_condiciones.setFont(titulo); \n titulo_condiciones.setForeground(titulos);\n titulo_y.setFont(titulo); \n titulo_y.setForeground(titulos);\n titulo_val.setFont(titulo); \n titulo_val.setForeground(titulos);\n titulo_metodo.setFont(titulo); \n titulo_metodo.setForeground(titulos);\n\n calcular.setBackground(titulos);\n calcular.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n limpiar.setBackground(titulos);\n limpiar.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n agregar.setBackground(titulos);\n agregar.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n funcion.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n h.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n x.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n n.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n y.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n val.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n variables.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\n GroupLayout panel_datosLayout = new GroupLayout(panel_datos);\n panel_datos.setLayout(panel_datosLayout);\n\n panel_datosLayout.setHorizontalGroup(\n panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_funcion))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_metodo)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(metodo, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_n)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(n, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_x)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(x, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_h)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(h, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(calcular, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(limpiar, GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(agregar,GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_y)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(y, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(titulo_val)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(val, GroupLayout.PREFERRED_SIZE,50, GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(funcion)\n .addContainerGap())\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(titulo_condiciones)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(titulo_variables, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(variables, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)\n .addGap(16, 16, 16))))\n );\n\n panel_datosLayout.setVerticalGroup(\n panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(titulo_variables)\n .addComponent(variables, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(5, 5, 5)\n .addComponent(titulo_funcion)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(funcion, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(titulo_condiciones)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_y)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(y, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)\n .addComponent(titulo_val)\n .addComponent(val, GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)))\n .addGap(11,11,11)\n .addComponent(agregar,GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_h)\n .addComponent(h, GroupLayout.PREFERRED_SIZE,22, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_x)\n .addComponent(x, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_n)\n .addComponent(n, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_metodo)\n .addComponent(metodo, GroupLayout.PREFERRED_SIZE,24, GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(calcular, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n .addComponent(limpiar, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11))\n );\n }", "private void codigoInicial() {\r\n itemPanels = new itemPanel[5];\r\n itemPanels[0] = new itemPanel(null, null, false);\r\n itemPanels[1] = new itemPanel(null, null, false);\r\n itemPanels[2] = new itemPanel(null, null, false);\r\n itemPanels[3] = new itemPanel(null, null, false);\r\n itemPanels[4] = new itemPanel(null, null, false);\r\n\r\n setSize(1082, 662);\r\n jpaneMenu.setBackground(AtributosGUI.color_principal);\r\n setLocationRelativeTo(null);\r\n\r\n\r\n java.awt.Color color_primario = AtributosGUI.color_principal;\r\n\r\n jpanePerfil.setBackground(color_primario);\r\n jpaneHorario.setBackground(color_primario);\r\n jpaneCursos.setBackground(color_primario);\r\n jpaneTramites.setBackground(color_primario);\r\n jpaneSalud.setBackground(color_primario);\r\n jpaneMenuItems.setBackground(color_primario);\r\n\r\n jlblCursos.setFont(AtributosGUI.item_label_font);\r\n jlblHorario.setFont(AtributosGUI.item_label_font);\r\n jlblPerfil.setFont(AtributosGUI.item_label_font);\r\n jlblSalud.setFont(AtributosGUI.item_label_font);\r\n jlblTramites.setFont(AtributosGUI.item_label_font);\r\n\r\n jlblCursos.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblHorario.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblPerfil.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblSalud.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblTramites.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n\r\n jpaneActiveCursos.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveHorario.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActivePerfil.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveSalud.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveTramites.setBackground(AtributosGUI.item_Off_panel_active);\r\n\r\n \r\n\r\n }", "public PanelCicloEscolar() {\n initComponents();\n }", "public LocalPanel() {\r\n\t\tinitComponents();\r\n\t}", "private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "private void init() {\r\n\t\tthis.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));\r\n\t\tthis.labelTitle = new JLabel(\"Edit your weapons\");\r\n\t\tthis.labelTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.initFilter();\r\n\t\tthis.initList();\r\n\t\tthis.list.setSelectedIndex(0);\r\n\t\tthis.initInfo();\r\n\t\tthis.initButton();\r\n\r\n\t\tJPanel panelWest = new JPanel();\r\n\t\tpanelWest.setLayout(new BoxLayout(panelWest, BoxLayout.PAGE_AXIS));\r\n\t\tJPanel panelCenter = new JPanel();\r\n\t\tpanelCenter.setLayout(new BoxLayout(panelCenter, BoxLayout.LINE_AXIS));\r\n\r\n\t\tpanelWest.add(this.panelFilter);\r\n\t\tpanelWest.add(Box.createRigidArea(new Dimension(0, 5)));\r\n\t\tpanelWest.add(this.panelInfo);\r\n\t\tpanelCenter.add(panelWest);\r\n\t\tpanelCenter.add(Box.createRigidArea(new Dimension(10, 0)));\r\n\t\tthis.panelList.setPreferredSize(new Dimension(300, 150));\r\n\t\tpanelCenter.add(this.panelList);\r\n\r\n\t\tthis.panel.add(this.labelTitle);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(panelCenter);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(this.panelButton);\r\n\r\n\t}", "public void initPanel() {\n\n puzzlePanel.setVisible(false);\n puzzlePanel = new PuzzlePanel(panelSize);\n\n getContentPane().add(puzzlePanel, BorderLayout.CENTER);\n getContentPane().add(controlPanel, BorderLayout.SOUTH);\n puzzlePanel.setVisible(true);\n\n isWin = false;\n puzzlePanel.setMoveCount(0);\n\n lblMove.setText(\"Jumlah Gerakan: 0\");\n lblTime.setText(\"Waktu: 0 detik\");\n startTime = System.currentTimeMillis();\n\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n while (!isWin) {\n try {\n currentTime = System.currentTimeMillis();\n lblTime.setText(\"Waktu terpakai: \" + ((currentTime - startTime) / 1000)\n + \" detik\");\n Thread.sleep(1000);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n }\n });\n t.start();\n }", "public abstract void createContents(Panel mainPanel);", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n scrollPane1.setViewportView(table);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonRegister = new JButton();\n buttonRegister.setText(\"Track\");\n panel1.add(buttonRegister, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonMenu = new JButton();\n buttonMenu.setText(\"Menu\");\n panel1.add(buttonMenu, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setForeground(new Color(-1));\n sectionTitle = new JLabel();\n Font sectionTitleFont = this.$$$getFont$$$(\"Droid Sans\", Font.BOLD, 18, sectionTitle.getFont());\n if (sectionTitleFont != null) sectionTitle.setFont(sectionTitleFont);\n this.$$$loadLabelText$$$(sectionTitle, ResourceBundle.getBundle(\"language\").getString(\"title_resources\"));\n panel.add(sectionTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n resourceList.setModel(defaultListModel1);\n resourceList.setSelectionMode(1);\n scrollPane1.setViewportView(resourceList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n publishButton = new JButton();\n publishButton.setEnabled(false);\n this.$$$loadButtonText$$$(publishButton, ResourceBundle.getBundle(\"language\").getString(\"button_publishResource\"));\n panel1.add(publishButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n pullButton = new JButton();\n pullButton.setEnabled(false);\n this.$$$loadButtonText$$$(pullButton, ResourceBundle.getBundle(\"language\").getString(\"button_pullResource\"));\n panel1.add(pullButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "public void actPanel(VentanaMedico vm,Medico m, int leido, int diag,Vector<ECG> auxec,Vector<Paciente> auxpac) {\n\trey4.setVisible(false);\n\trey4.removeAll();\n\t\n\trey4.setOpaque(false);\n\trey4.setLayout(new BoxLayout(rey4,BoxLayout.Y_AXIS));\n\n\tint cont=0;\n\tfor(int i= 0;i<auxec.size();i++){\n\t\tif(leido==0 && diag==0) {\n\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\tJPanel invi = new JPanel();\n\t\t\tinvi.setOpaque(false);\n\t\t\trey4.add(pan);\t\n\t\t\trey4.add(invi);\n\t\t\tcont++;\n\t\t} else {\n\t\t\tif(leido==-1) {\n\t\t\t\tif(diag==-1) {\n\t\t\t\t\tif(auxec.get(i).isLeido()==false && auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else if(diag==1){\n\t\t\t\t\tif(auxec.get(i).isLeido()==false && !auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(auxec.get(i).isLeido()==false) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if(leido==1){\n\t\t\t\tif(diag==-1) {\n\t\t\t\t\tif(auxec.get(i).isLeido()==true && auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else if(diag==1){\n\t\t\t\t\tif(auxec.get(i).isLeido()==true && !auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(auxec.get(i).isLeido()==true) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if(leido==0) {\n\t\t\t\tif(diag==-1) {\n\t\t\t\t\tif(auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t} else if(diag==1){\n\t\t\t\t\tif(!auxec.get(i).getDiagnostico().isEmpty()) {\n\t\t\t\t\t\tPanelPaciente pan = new PanelPaciente(auxpac.get(i),auxec.get(i));\n\t\t\t\t\t\tpan.setBorder(new LineBorder(Color.gray, 2));\n\t\t\t\t\t\tpan.addMouseListener(new ControladorPanelM(vm,auxpac.get(i), m,auxec.get(i),0));\n\t\t\t\t\t\tJPanel invi = new JPanel();\n\t\t\t\t\t\tinvi.setOpaque(false);\n\t\t\t\t\t\trey4.add(pan);\t\n\t\t\t\t\t\trey4.add(invi);\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\tif(cont<10) {\n\t\tfor(int i= cont;i<10;i++){\n\t\t\tJPanel relle=new JPanel();\n\t\t\trelle.setLayout(new BorderLayout());\n\t\t\tJButton b=new JButton();\n\t\t\tb.setContentAreaFilled(false);\n\t\t\tb.setOpaque(false);\n\t\t\tb.setBorderPainted(false);\n\t\t\trelle.add(b,BorderLayout.CENTER);\n\t\t\trelle.setOpaque(false);\n\t\t\trey4.add(relle);\n\t\t}\n\t}\n\trey4.setVisible(true);\n}", "public PanelSgamacView1()\n {\n }", "@Override\npublic void rebuildPanel() {\n\t\n}", "private JPanel criarPainelSul() {\n\n JPanel pSul = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\n this.btnUC3 = criarBtnUC3();\n this.btnUC4 = criarBtnUC4();\n this.btnUC5 = criarBtnUC5();\n\n disableBotoesUCs();\n pSul.add(this.btnUC3);\n pSul.add(this.btnUC4);\n pSul.add(this.btnUC5);\n\n pSul.setBorder(BorderFactory.createEmptyBorder(MARGEM_SUPERIOR,\n MARGEM_ESQUERDA,\n MARGEM_INFERIOR,\n MARGEM_DIREITA));\n\n return pSul;\n }", "private void putPanels() {\n\t\tfrmUserDesign.getContentPane().add(userDesignPanel, \"userDesign\");\n\t\tfrmUserDesign.getContentPane().add(vendasClass.getVendas(), \"Vendas\");\n\t\tfrmUserDesign.getContentPane().add(maquinaClass.getMaquinas(), \"Maquinas\");\n\t\tfrmUserDesign.getContentPane().add(funcionarioClasse.getFuncionarios(), \"Funcionarios\");\n\t\tfrmUserDesign.getContentPane().add(produtoClass.getProdutos(), \"Produtos\");\n\t\tfrmUserDesign.getContentPane().add(chart.getGrafico(), \"Grafico\");\n\t\tcl.show(frmUserDesign.getContentPane(), \"userDesign\");// mostrar o main menu\n\t}", "private void modificarComponentesPanelPadre() {\n panelCrearArticuloClienteDistribuidor_labelTitulo.setText(panelCrearArticuloClienteDistribuidor_labelTitulo.getText() + \"Distribuidor\");\n }", "void iniciaPanel() {\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tinfo[i][j] = new JLabel(\"\");\n\t\t\t\tinfo[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true));\n\t\t\t\tinfo[i][j].setOpaque(true);\n\t\t\t\tif(i==0) {\n\t\t\t\t\tinfo[i][j].setBackground(UIManager.getColor(\"List.selectionBackground\"));\n\t\t\t\t}\n\t\t\t\tif(i==1) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.yellow);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==2) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.blue);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==3) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.red);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==4) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.gray);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tpanel.add(info[i][j]);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tinfo[0][0].setText(\"PROCESOS\");\n\t\tinfo[1][0].setText(\"P1\");\n\t\tinfo[2][0].setText(\"P2\");\n\t\tinfo[3][0].setText(\"P3\");\n\t\tinfo[4][0].setText(\"P4\");\n\t\tinfo[0][1].setText(\"TIEMPO DE ARRIBO/LLEGADA\");\n\t\tinfo[0][2].setText(\"RAFAGAS DE USO DEL CPU\");\n\t\t\n\t\t//llenado donde estara la simulacion\t\t\n\t\tfor (int i = 0; i < ns; i++) {\n\t\t\tfor (int j = 0; j < ms; j++) {\n\t\t\t\tsimulacion[i][j] = new JLabel(\"\");\n\t\t\t\tsimulacion[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true));\n\t\t\t\tsimulacion[i][j].setOpaque(true);\n\t\t\t\tsimulacion[i][j].setBackground(Color.WHITE);\n\t\t\t\tsimulacion[i][j].setVisible(false);\n\t\t\t\tsimulacion[i][j].setFont(fuente2);\n\t\t\t\tpanel_2.add(simulacion[i][j]);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tllenainfo();\n\t\t\n\t}", "public JPanel createPanel(Hospital_Management_System hms)\n\t{\n\t\t//set table settings\n\t\ttable.setColumnSelectionAllowed(false);\n\t\ttable.setRowSelectionAllowed(true);\n\t\ttable.getTableHeader().setEnabled(false);\n\t\ttable.setRowHeight(50);\n\t\ttable.setEnabled(true);\n\t\ttable.getTableHeader().setReorderingAllowed(false);\n\t\tJScrollPane tableContainer = new JScrollPane(table);\n\t\ttableContainer.setLocation(86, 244);\n\t\ttableContainer.setSize(1746, 700);\n\t\t//initialize the panel layout and size\n\t\tJPanel patientListPanel = new JPanel();\n\t\tpatientListPanel.setLayout(null);\n\t\tpatientListPanel.setBounds(0, 0, 1920, 1080);\n\t\t//set background\n\t\tJLabel lblBackground = new JLabel();\n\t\tlblBackground.setIcon(new ImageIcon(PatientListPanel.class.getResource(\"/graphics/list_background.png\")));\n\t\tlblBackground.setBounds(0, 0, 1920, 1080);\n\t\t/*\n\t\t * HEADER MESSAGE\n\t\t */\n\t\tJLabel lblWelcomeBackAdministrator = new JLabel(\"Welcome Back!\");\n\t\tlblWelcomeBackAdministrator.setFont(bArial);\n\t\tlblWelcomeBackAdministrator.setBounds(166, 29, 510, 26);\n\t\t/*\n\t\t * DATE DISPLAYED BELOW HEADER\n\t\t */\n\t\tDateFormat df = new SimpleDateFormat(\"EEE MMM dd, yyyy\");\n\t\tDate today = new Date();\n\t\tJLabel date = new JLabel(\"Today is: \"+df.format(today));\n\t\tdate.setFont(new Font(\"Calibri Light\", Font.PLAIN, 26));\n\t\tdate.setBounds(166, 87, 560, 26);\n\t\t/*\n\t\t * RETURN BUTTON\n\t\t */\n\t\tJButton btnReturn = new JButton(\"Return\");\n\t\tbtnReturn.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tif(hms.getAccessFrom() == \"Admin\")\n\t\t\t\t{\n\t\t\t\t\thms.displayPatientManagementPage();\n\t\t\t\t}\n\t\t\t\telse if(hms.getAccessFrom() == \"Employee\")\n\t\t\t\t{\n\t\t\t\t\thms.displayEmployeeMainPage();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnReturn.setFont(new Font(\"Arial\", Font.BOLD, 16));\n\t\tbtnReturn.setBounds(725, 955, 500, 59);\n\t\t/*\n\t\t * FILTER TEXTBOX\n\t\t */\n\t\tJTextField filterField = RowFilterUtil.createRowFilter(table);\n\t\tfilterField.setFont(new Font(\"Arial\", Font.BOLD, 24));\n\t\tfilterField.setColumns(10);\n\t\tfilterField.setBounds(265, 955, 300, 59);\n\t\t/*\n\t\t * SEARCH LABEL\t\t\n\t\t */\n\t\tJLabel lbSearch = new JLabel(\"Search:\");\n\t\tlbSearch.setFont(new Font(\"Arial\", Font.BOLD, 28));\n\t\tlbSearch.setBounds(125, 955, 300, 59);\n\t\t//add all the components to panel\n\t\tpatientListPanel.add(btnReturn);\n\t\tpatientListPanel.add(tableContainer, BorderLayout.CENTER);\n\t\tpatientListPanel.add(lblWelcomeBackAdministrator);\n\t\tpatientListPanel.add(date);\n\t\tpatientListPanel.add(filterField);\n\t\tpatientListPanel.add(lbSearch);\n\t\tpatientListPanel.add(lblBackground);\n\t\t\n\t\treturn patientListPanel;\n\t}", "public JPanel menuPanel() {\n\t\tJPanel mpanel = new JPanel(null);\n\t\tmpanel.setBounds(0, 100, 700, 300);\n\t\tmpanel.setBackground(Color.PINK);\n\t\tFont lblfont = new Font(\"SansSerif\", Font.BOLD, 30);\n\t\t\n\t\tworkerBtn = new JButton(workerpic);\n\t\tvisitorBtn = new JButton(visitorpic);\n\t\tworkerBtn.addActionListener(this);\n\t\tvisitorBtn.addActionListener(this);\n\t\tvisitorBtn.setBounds(100, 50, 150, 200);\n\t\tworkerBtn.setBounds(450, 50, 150, 200);\n\t\t\n\t\tlblworker.setBounds(450, 0, 150, 50);\n\t\tlblvisitor.setBounds(100, 0, 150, 50);\n\t\tlblworker.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblvisitor.setHorizontalAlignment(JLabel.CENTER);\n\t\tlblworker.setFont(lblfont);\n\t\tlblvisitor.setFont(lblfont);\n\t\tmpanel.add(lblworker);\n\t\tmpanel.add(lblvisitor);\n\t\tmpanel.add(visitorBtn);\n\t\tmpanel.add(workerBtn);\n\t\treturn mpanel;\n\t}", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tthis.add(firstButton);\n\t\tthis.add(firstField);\n\t}", "private void cambiaPanelAnterior() {\r\n\t\tCardLayout cl = (CardLayout) VentanaPrincipal.getInstance().getContentPane().getLayout();// obtenemos el card layout\r\n\t\tcl.show(VentanaPrincipal.getInstance().getContentPane(), VentanaPrincipal.getInstance().getPanelEquipo().getName());// mostramos el pael Equipos\r\n\t}", "@Override\n\tvoid modifyUserContentPanel() {\n\t\t panel = new JPanel();\n\t\tpanel.setLayout(new BoxLayout(panel,BoxLayout.PAGE_AXIS));\n\t\ticon1 = new BarGraphIcon(graphModel1,200,200);\n\t\ticon2= new BarGraphIcon(graphModel2,200,200);\n\t\tcourseLabel = new JLabel(\"Course: \");\n\t\tpanel.add(courseLabel);\n\t\tpanel.add(new JLabel(\" \"));\n\t\tpanel.add(new JLabel(\"Semester Offerings:\"));\n\t\tpanel.add( new JLabel(icon1));\n\t\tpanel.add(new JLabel(\" \"));\n\t\tpanel.add(new JLabel(\"Campus Offerings:\"));\n\t\tpanel.add(new JLabel(icon2));\n\t\t\n\t\tmakeUserContentPanel(panel);\n\t}", "@Override\n public void newPanelModel() {\n\n }", "@Override\n public void newPanelModel() {\n\n }", "public EjemplarUI() {\n initComponents();\n controlador = Controladores.peliculaController;\n }", "private DisplayPanel(){\r\n\t\t\t\tControlActionListenter cal = new ControlActionListenter();\r\n\t\t\t\tsetLayout(new BorderLayout());\r\n\t\t\t\tfinal JButton btn1 = new JButton(\"First\");\r\n\t\t\t\tbtn1.setFocusable(false);\r\n \t \tbtn1.addActionListener(cal);\r\n \t\t\tfinal JButton btn2 = new JButton(\"Next\");\r\n \t\t\tbtn2.addActionListener(cal);\r\n \t\t\t\tfinal JButton btn3 = new JButton(\"Previous\");\r\n \t\t \tbtn3.addActionListener(cal);\r\n \t\t final JButton btn4 = new JButton(\"Last\");\r\n \t\tbtn4.addActionListener(cal);\r\n \t\tbtn2.setFocusable(false);\r\n \t\tbtn3.setFocusable(false);\r\n \t\tbtn4.setFocusable(false);\r\n \t\t \tJPanel controlButtons = new JPanel(new GridLayout(2,2,5,5));\r\n \t\t \tcontrolButtons.add(btn3);\r\n \t\t \tcontrolButtons.add(btn2);\r\n \t\t \tcontrolButtons.add(btn1);\r\n \t\tcontrolButtons.add(btn4);\r\n \t\tcontrolButtons.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\r\n \t\tadd(controlButtons, BorderLayout.PAGE_END);\r\n\t\t\t}", "public PanelIconos() {\n initComponents();\n }", "public pnl_Gestionar_info_laboratorio() {\n initComponents();\n listar_info_lab.setSelected(true);\n new CambiaPanel(panel_contenedor, new paneles_de_paneles.de_gestionar_info_laboratorio_listar());\n pnl_Gestionar_contrato.color_performed(listar_info_lab,add_info_lab);\n }", "public JPanelChuyen() {\n initComponents();\n thoiGianDao = new ThoiGianHoatDongDao();\n tbmChuyen = (DefaultTableModel) jtbChuyen.getModel();\n dpNgayBatDau.setEnabled(false);\n ChuyenDao.loadDSChuyenVaoBang(LopKetNoi.select(\"select * from Chuyen\"), tbmChuyen);\n }", "public AccueilPanel() {\n initComponents();\n resetError();\n }" ]
[ "0.72953594", "0.72142833", "0.720917", "0.71795934", "0.7171218", "0.70199084", "0.697869", "0.69774663", "0.696192", "0.69542044", "0.6911045", "0.6892004", "0.68834317", "0.6876587", "0.68717235", "0.6837905", "0.6799554", "0.678549", "0.678549", "0.6772771", "0.6716574", "0.6711985", "0.6711878", "0.6709041", "0.6707482", "0.6692564", "0.66855544", "0.6675998", "0.66555077", "0.66540277", "0.6652019", "0.66476303", "0.6639532", "0.6635808", "0.6634186", "0.6627626", "0.6621246", "0.6621246", "0.6621105", "0.6619089", "0.66166365", "0.661131", "0.6607035", "0.66008085", "0.6597966", "0.6593669", "0.65914816", "0.6590643", "0.65794355", "0.6570274", "0.6559784", "0.65595657", "0.65571666", "0.6539579", "0.6539579", "0.65391016", "0.65187734", "0.6509928", "0.6505996", "0.6500895", "0.64961034", "0.6496011", "0.6495924", "0.64902663", "0.64898384", "0.64868605", "0.64864856", "0.6466142", "0.64631057", "0.6454893", "0.6454876", "0.64547044", "0.64538413", "0.6448797", "0.6447127", "0.64442706", "0.6441572", "0.6439998", "0.64384323", "0.64375293", "0.6437096", "0.64340216", "0.64339256", "0.64207375", "0.64127463", "0.64123154", "0.64120984", "0.64105", "0.64103335", "0.64050543", "0.64046276", "0.64005935", "0.6400471", "0.63979185", "0.63979185", "0.63957787", "0.6389935", "0.63806146", "0.6375383", "0.6369155", "0.63687027" ]
0.0
-1
write your code here
public static ArrayList<Integer> maxSlidingWindow(int[] nums, int k) { ArrayList<Integer> ans = new ArrayList<Integer>(); Deque<Integer> deque = new ArrayDeque<Integer>(); if (nums.length == 0) { return ans; } for (int i = 0; i < k - 1; i++) { inQueue(deque, nums[i]); } for(int i = k - 1; i < nums.length; i++) { inQueue(deque, nums[i]);//入队过程中,如果入队大则删去前面all。否则跟随。 ans.add(deque.peekFirst()); // System.out.println( nums[i - k + 1]+""+deque);//[3,-1,-3] outQueue(deque, nums[i - k + 1]);//滑动过程中每次都把前面的一个筛去 // System.out.println( nums[i - k + 1]+""+deque);//[-1,-3] // 1[3, -1] // 1[3, -1] // 3[3, -1, -3] // 3[-1, -3] // -1[5] // -1[5] // -3[5, 3] // -3[5, 3] } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void ganar() {\n // TODO implement here\n }", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "CD withCode();", "private stendhal() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void baocun() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void furyo ()\t{\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void themesa()\n {\n \n \n \n \n }", "Programming(){\n\t}", "@Override\n\tvoid output() {\n\t\t\n\t}", "private void yy() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "private void kk12() {\n\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "public static void main(String[] args) {\n\t// write your code here\n }", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "protected void mo6255a() {\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public void working()\n {\n \n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "public void perder() {\n // TODO implement here\n }", "public void smell() {\n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public void cocinar(){\n\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void interr() {\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "protected void execute() {\n\n\n \n }", "@Override\n public void execute() {\n \n \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 }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "protected void display() {\n\r\n\t}", "private void sout() {\n\t\t\n\t}", "private static void oneUserExample()\t{\n\t}", "public void nhapdltextlh(){\n\n }", "public void miseAJour();", "protected void additionalProcessing() {\n\t}", "private void sub() {\n\n\t}", "@Override\n\tpublic void view() {\n\t\t\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\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "void mo67924c();", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }", "public void mo5382o() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }", "void kiemTraThangHopLi() {\n }", "public void skystonePos5() {\n }", "public final void cpp() {\n }", "public final void mo51373a() {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"This is the main class of this project\");\r\n\t\tSystem.out.println(\"how about this\");\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"new push\");\r\n\r\n\t\t//how to update this line\r\n\t\t\r\n\t\tSystem.out.println(\"hello there\");\r\n\r\n\t\tSystem.out.println(\"zen me shuoXXXXXXXXXXXKKKKkKKKKKKXXXXXXXX\");\r\n\r\n\t\tSystem.out.println(\"eventually we succeeded!\");\r\n\t\t//wa!!!\r\n\t\t\r\n\r\n\r\n\t\t//hen shu fu !\r\n\t\t\r\n\t\t//it is a good day\r\n\t\t\r\n\t\t//testing\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"hope it works\");\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}" ]
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.55133164", "0.55123806", "0.55114794", "0.5500045", "0.5489272", "0.5482718", "0.5482718", "0.5477585", "0.5477585", "0.54645246", "0.5461012", "0.54548836", "0.5442613", "0.5430592", "0.5423748", "0.5419415", "0.5407118", "0.54048806", "0.5399331", "0.539896", "0.5389593", "0.5386248", "0.5378453", "0.53751254", "0.5360644", "0.5357343", "0.5345515", "0.53441405", "0.5322276", "0.5318302", "0.53118485", "0.53118485", "0.53085434", "0.530508", "0.53038436", "0.5301922", "0.5296964", "0.52920514", "0.52903354", "0.5289583", "0.5287506", "0.52869135", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.5286737", "0.52859664", "0.52849185", "0.52817136", "0.52791214", "0.5278664", "0.5278048", "0.5276269", "0.52728665", "0.5265451", "0.526483", "0.526005", "0.5259683", "0.52577406", "0.5257731", "0.5257731", "0.52560073", "0.5255759", "0.5255707", "0.5250705", "0.5246863", "0.5243053", "0.52429926", "0.5242727", "0.52396125", "0.5239378", "0.5232576", "0.5224529", "0.52240705", "0.52210563", "0.52203166", "0.521787", "0.52172214" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_full_screen_image_view, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.72473437", "0.7202402", "0.71960324", "0.7177793", "0.7108265", "0.7040525", "0.70388484", "0.70126176", "0.70101976", "0.6981143", "0.69461405", "0.694", "0.69346833", "0.69183874", "0.69183874", "0.6891571", "0.6884306", "0.68758994", "0.687534", "0.68627334", "0.68627334", "0.68627334", "0.68627334", "0.6853258", "0.6847784", "0.6820167", "0.68177783", "0.68134266", "0.68132955", "0.68132955", "0.6806282", "0.68011856", "0.6798178", "0.67916524", "0.67897713", "0.6788724", "0.6783952", "0.6759952", "0.6757919", "0.6748738", "0.67445415", "0.67445415", "0.6741439", "0.67401767", "0.6726359", "0.6724678", "0.6723058", "0.6723058", "0.6721303", "0.67123276", "0.670777", "0.67050874", "0.670039", "0.66992784", "0.6697299", "0.6695259", "0.6686728", "0.668404", "0.668404", "0.6683142", "0.668091", "0.66799283", "0.6677784", "0.6669004", "0.66677624", "0.66630834", "0.66577506", "0.66577506", "0.66577506", "0.6656902", "0.66553235", "0.66553235", "0.66553235", "0.66530025", "0.66522014", "0.6650771", "0.66497517", "0.6647805", "0.66470283", "0.66469866", "0.6646818", "0.6645723", "0.66454786", "0.66439635", "0.66434425", "0.6642393", "0.6639529", "0.6635146", "0.6634077", "0.6632954", "0.66327274", "0.66327274", "0.66327274", "0.66297686", "0.66288346", "0.66275346", "0.66271275", "0.6625066", "0.6621276", "0.6619167", "0.6619167" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904454", "0.78056747", "0.77659833", "0.7727365", "0.7631989", "0.76223314", "0.7584553", "0.75306034", "0.7487836", "0.745791", "0.745791", "0.7438328", "0.74220496", "0.74034584", "0.7391494", "0.73866826", "0.73788977", "0.7370167", "0.7362255", "0.73555887", "0.7345252", "0.734152", "0.73303276", "0.7328559", "0.73255897", "0.73185426", "0.73165184", "0.73132133", "0.7303868", "0.7303868", "0.7301464", "0.7297915", "0.72930884", "0.72863466", "0.72832656", "0.72807384", "0.7278446", "0.72596914", "0.7259592", "0.7259592", "0.7259592", "0.7259204", "0.72497207", "0.7225063", "0.7219175", "0.7216816", "0.720443", "0.7201328", "0.71997535", "0.71924156", "0.71846914", "0.7177496", "0.7168223", "0.7167547", "0.7153918", "0.7153812", "0.71360034", "0.7135014", "0.7135014", "0.7129386", "0.7129096", "0.7124025", "0.7123219", "0.7122818", "0.71221405", "0.7117256", "0.71171826", "0.71171826", "0.71171826", "0.71171826", "0.71166563", "0.7116579", "0.71148115", "0.7112163", "0.71096337", "0.7109013", "0.7105877", "0.70992535", "0.70982933", "0.7095853", "0.7093862", "0.7093862", "0.70863163", "0.7082383", "0.7080991", "0.7080324", "0.7073529", "0.7068395", "0.7061839", "0.7060443", "0.7060233", "0.7051591", "0.70377344", "0.70377344", "0.7035971", "0.7035638", "0.7035638", "0.7032344", "0.7030622", "0.7029514", "0.70190036" ]
0.0
-1
Construct a new function printer given the Function Handler
public FunctionPrinter(FunctionHandlerData fhd) { this.fhd = fhd; this.beforeImage = false; this.printBlankLine = true; this.printHeader = false; this.printHiddenFields = true; this.printerFormatter = new FunctionPrinterFormatter(); this.lines = new ArrayList<String>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "QPrintTerm createPrintTerm();", "CreateHandler()\n {\n }", "FunctionExtract createFunctionExtract();", "public ConsoleHandler createConsoleHandler () {\r\n\t\t\t\r\n\t\tConsoleHandler consoleHandler = null;\r\n\t\t\t\r\n\t\ttry {\r\n\t\t \t\r\n\t\t\tconsoleHandler = new ConsoleHandler();\r\n\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t \r\n\t\t return consoleHandler;\r\n\t}", "PrintStatement createPrintStatement();", "public static void main(String[] args) {\t\t\r\n\t\tString str=\"Ashok Singh\";\r\n\t\tMyPrinter myPrinter=new MyPrinter();\r\n\t\t//myPrinter.print(str);\r\n\t\t\r\n\t\tmyPrinter.print(str, new Parser() {\r\n\t\t\tpublic String parse(String str) {\r\n\t\t\t\treturn StringParser.convert(str);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\tmyPrinter.print(str, s->StringParser.convert(s)); // Lambda Expresion\r\n\t\t\r\n\t\tmyPrinter.print(str, StringParser::convert); // Method Reference\r\n\t}", "void format(Printer printer);", "private ResultHandler print() {\n\t\treturn null;\r\n\t}", "Function createFunction();", "public Printer(){ }", "@Override\n\tpublic void accept(PrinterVisitor visitor) {\n\t\t\n\t}", "@Override\n\tpublic void print(String tab, FileWriter fw) {\n\t\tSystem.out.println(tab + \"CallExpression: \" + id + \" ( \");\n\t\ttry{\n\t\t\tfw.write(tab + \"CallExpression: \" + id + \" ( \\r\\n\");\n\t\t\tfor(Expression exp : argsList) {\n\t\t\t\texp.print(tab + \"\\t\", fw);\n\t\t\t\tSystem.out.println();\n\t\t\t\tfw.write(\"\\r\\n\");\n\t\t\t}\n\t\t\tSystem.out.println(tab + \" )\");\n\t\t\tfw.write(tab + \" )\\r\\n\");\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected MethodCallPrinter()\n {\n }", "public StreamHandler createStreamHandler (OutputStream outStream) {\r\n\t\t\t\t\t\r\n\t\tStreamHandler streamHandler = null;\r\n\r\n\t\ttry {\r\n\t\t\t\t \t\r\n\t\t\tstreamHandler = new StreamHandler(outStream, new SimpleFormatter());\r\n\t\t\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t \r\n\t\t\treturn streamHandler;\r\n\t}", "public static Factory factory() {\n return Document_print::new;\n }", "public EventPrinter() {\n this(System.out);\n }", "public void visitFiscalPrinter( DevCat devCat ) {}", "public ServiceGenerator(String function, ParsingResult parsingResult, String targetRootDir, String serviceName,\r\n\t\t\tConfig config, DatabaseConnectionHandler dbHandler) {\r\n\t\tthis.config = config;\r\n\t\tthis.dbHandler = dbHandler;\r\n\t\tthis.unalteredFunction = function;\r\n\t\tthis.parsingResult = parsingResult;\r\n\t\tthis.targetRootDir = targetRootDir;\r\n\t\tthis.serviceName = serviceName;\r\n\t}", "public String toString ()\n {\n return \"function:\" + _vname;\n }", "public void printHandlers() {\n\t\tServiceReference[] refs;\n\t\ttry {\n\t\t\tout.println(\"iPOJO Handlers\");\n\t\t\tout.println(\"-------------------\");\n\t\t\trefs = bundleContext.getServiceReferences(HandlerFactory.class.getName(), null);\n\n\t\t\tfor (int i = 0; i < refs.length; i++) {\n\t\t\t\tHandlerFactory handler = (HandlerFactory) bundleContext.getService(refs[i]);\n\t\t\t\tString name = handler.getHandlerName();\n\t\t\t\tif (\"composite\".equals(handler.getType()))\n\t\t\t\t\tname = name + \" [composite]\";\n\n\t\t\t\tif (handler.getMissingHandlers().size() == 0) {\n\t\t\t\t\tout.println(\"Handler \" + name + \" (VALID)\");\n\t\t\t\t} else {\n\t\t\t\t\tout.println(\"Handler \" + name + \" (INVALID : \" + handler.getMissingHandlers() + \")\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (InvalidSyntaxException e) {\n\n\t\t}\n\t}", "public void handlePrintFile (File printFile) {\n // not supported\n }", "public Arginfo visit(PrintStatement n, Arginfo argu) {\n Arginfo _ret=null;\n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n System.out.println(\"PRINT \");\n n.f2.accept(this, argu);\n n.f3.accept(this, argu);\n n.f4.accept(this, argu);\n return _ret;\n }", "private static void createPrinterMenuLogic() {\n\n\t\tmenuHandler.clrscr();\n\n\t\t// Printer name\n\t\tString printerName = menuHandler.inputString(\"Please input the printer name (cannot be empty)\");\n\n\t\t// Printer paper format\n\t\tSystem.out.println(\"Select printer paper format capabilities\");\n\t\tint maxChoice = menuHandler.printerFormatMenu();\n\t\tint formatChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Printer toner\n\t\tSystem.out.println(\"Select printer toner capabilities\");\n\t\tmaxChoice = menuHandler.printerTonerMenu();\n\t\tint tonerChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t// Parse user choices and create printer capabilities object\n\t\tBoolean[] bools = parsePrinterCapabilities(formatChoice, tonerChoice);\n\t\tPrinterCapability printerCapability = objectHandler.createPrinterCapability(bools[canPrintA4], bools[canPrintA3], bools[canPrintBlack], bools[canPrintColor]);\n\n\t\t// Ask user about pricing and create printer pricing object\n\t\tPrinterPricing printerPricing = createPrinterPricing(bools);\n\n\t\t// Ask user about capacity and create printer capacity object\n\t\tPrinterCapacity printerCapacity = createPrinterCapacity(bools);\n\n\t\tprinters.put(\"Printer\" + printers.size(), objectHandler.createPrinter(printerName, printerCapability, printerPricing, printerCapacity, objectHandler.createPrinterStatus()));\n\t}", "@Override\n public void run() {\n printfManager.openPrinter(alreadyBlueList.get(args));\n }", "@Test\n public void testAddHandler() {\n System.out.println(\"addHandler\");\n String sa = \"testhandler\";\n SpineEbXmlHandler h = (EbXmlMessage m) -> {\n };\n instance.addHandler(sa, h);\n }", "public Object getPrinter(PageFormat pf);", "public Builder outputHandler(Consumer<String> outputHandler) {\n this.outputHandler = outputHandler;\n return this;\n }", "public PDFunctionType4(COSBase functionStream) throws IOException {\n/* 49 */ super(functionStream);\n/* 50 */ byte[] bytes = getPDStream().toByteArray();\n/* 51 */ String string = new String(bytes, \"ISO-8859-1\");\n/* 52 */ this.instructions = InstructionSequenceBuilder.parse(string);\n/* */ }", "@Override\n\tpublic void print(String tab, FileWriter fw) {\n\t\tSystem.out.println(tab + \"LiteralExpression: \" + number.toString());\n\t\ttry {\n\t\t\tfw.write(tab + \"LiteralExpression: \" + number.toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public TextFilePrinter getPrinter();", "static public interface FunctionHandler\r\n {\r\n public double evaluateFunction(String nam, ArgParser args) throws ArithmeticException;\r\n }", "@Override\n public String toString() {\n return String.format(\"REIL function %s\", getName());\n }", "public static void main(String[] args) {\n\t\tString a = \"Jerin\";\r\n\t\t\r\n\t\tPrintDisplay p = () ->{\r\n\t\t\tSystem.out.println(a);\r\n\t\t};\r\n\t\tp.display();\r\n\r\n\t}", "public PDF()\n {\n \n i_hdl = create_Handler();\n }", "public Bach(Logger logger, Consumer<String> printer) {\n this.logger = logger;\n this.printer = printer;\n logger.log(Level.TRACE, \"Initialized Bach.java \" + VERSION);\n }", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "FunctionDecl createFunctionDecl();", "PaymentHandler createPaymentHandler();", "public EnlightenedJavaPrinter() {\n\n }", "public TreePrinter(Function<T, String> getLabel, Function<T, T> getLeft, Function<T, T> getRight) {\n this.getLabel = getLabel;\n this.getLeft = getLeft;\n this.getRight = getRight;\n }", "public void createPPF(){\n\t\tSystem.out.println(\"HDFC:: createed ppf\");\n\t}", "public void printer(double x);", "public void generate(){\n\t// Write constants/static vars section\n\twriteln(\".data\");\n\tfor ( String global : globalVars ) {\n\t // Initialized to zero. Why not?\n\t writeln(global+\":\\t.word 0\");\n\t}\n\twriteln(\"nl:\\t.asciiz \\\"\\\\n\\\"\");\n writeln(\"\\t.align\\t4\");\n\n\t// Write the prefix\n\twriteln(\".text\");\n\twriteln(\"entry:\");\n writeln(\"\\tjal main\");\n writeln(\"\\tli $v0, 10\");\n writeln(\"\\tsyscall\");\n\twriteln(\"printint:\");\n writeln(\"\\tli $v0, 1\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tla $a0, nl\");\n writeln(\"\\tli $v0, 4\");\n writeln(\"\\tsyscall\");\n writeln(\"\\tjr $ra\");\n\n\tString defun = \"\";\t// Holds the place of the current function\n\tint spDisplacement=0;\t// Stores any displacement we do with $sp\n\n\tfor ( int i=0; i<codeTable.size(); i++ ) {\n\t CodeEntry line = codeTable.get(i);\n\n\t if ( line instanceof Label ) {\n\t\tLabel label = (Label)line;\n\t\twriteln( line.toString() );\n\t\tif ( label.isFunction() )\n\t\t makeFrame( defun = label.name() );\n\t }\n\t else if ( line instanceof Tuple ) {\n\t\tTuple tuple = (Tuple)line;\n\t\t// \n\t\t// Pushing arguments onto the stack (op = \"pusharg\"|\"pushaddr\")\n\t\t// \n\t\tif ( tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") ) {\n\t\t ArrayList<Tuple> argLines = new ArrayList<Tuple>();\n\t\t ArrayList<String> lvOrAddr = new ArrayList<String>();\n\t\t while ( (tuple.op.equals(\"pusharg\") || tuple.op.equals(\"pushaddr\") )\n\t\t\t && i < codeTable.size() ) {\n\t\t\targLines.add( tuple );\n\t\t\tlvOrAddr.add( tuple.op );\n\t\t\tline = codeTable.get( ++i );\n\t\t\tif ( line instanceof Tuple )\n\t\t\t tuple = (Tuple)line;\n\t\t }\n\t\t // Move the stack pointer to accomodate args\n\t\t writeInst(\"subi\t$sp, $sp, \"+(4*argLines.size()));\n\t\t spDisplacement = 4;\n\t\t for ( int j=0; j < argLines.size(); j++ ) {\n\t\t\tTuple argLine = argLines.get(j);\n\t\t\tString theOp = lvOrAddr.get(j);\n\t\t\t// Pass a copy of the argument\n\t\t\tif ( theOp.equals(\"pusharg\") ) {\n\t\t\t if ( isNumber(argLine.place) )\n\t\t\t\twriteInst(\"li\t$t0, \"+argLine.place);\n\t\t\t else\n\t\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, argLine.place ));\n\t\t\t}\n\t\t\t// Pass-by-reference\n\t\t\telse {\n\t\t\t writeInst(\"la\t$t0, \"+printOffset( defun, argLine.place));\n\t\t\t}\n\t\t\twriteInst(\"sw\t$t0, \"+spDisplacement+\"($sp)\");\n\t\t\tspDisplacement+=4;\n\t\t }\n\t\t spDisplacement-=4;\n\n\t\t // Reset counter, put back instruction we didn't use.\n\t\t i--;\n\t\t continue;\n\t\t}\n\t\t// \n\t\t// Calling a function\n\t\t// \n\t\telse if ( tuple.op.equals(\"jal\") ) {\n\t\t writeInst(\"jal\t\"+tuple.arg1);\n\t\t if ( ! tuple.place.equals(\"\") )\n\t\t\twriteInst(\"sw\t$v0, \"+printOffset( defun, tuple.place ));\n\t\t // Move back the $sp from all the \"pushargs\" we probably did\n\t\t if ( spDisplacement > 0 )\n\t\t\twriteInst(\"addi\t$sp, $sp, \"+spDisplacement);\n\t\t}\n\t\t//\n\t\t// Returning from a function (\"return\")\n\t\t//\n\t\telse if ( tuple.op.equals(\"return\") ) {\n\t\t if ( ! tuple.place.equals(\"\") ) {\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t\twriteInst(\"move\t$v0, $t0\");\n\t\t }\n\t\t writeInst(\"move\t$sp, $fp\");\n\t\t writeInst(\"lw\t$ra, -4($sp)\");\n\t\t writeInst(\"lw\t$fp, 0($fp)\");\n\t\t writeInst(\"jr\t$ra\");\n\t\t \n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring two registers for operands\n\t\t//\n\t\telse if ( tuple.op.equals(\"sub\") ||\n\t\t\t tuple.op.equals(\"mul\") ||\n\t\t\t tuple.op.equals(\"div\") ||\n\t\t\t tuple.op.equals(\"rem\") ) {\n\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t if ( tuple.op.equals(\"sub\") && isNumber(tuple.arg2) ) {\n\t\t\twriteInst(\"subi\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t2, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t// \n\t\t// Arithmetic operations that have a separate 'immediate' function,\n\t\t// and where we can reduce # of instructions\n\t\t//\n\t\telse if ( tuple.op.equals(\"add\") ||\n\t\t\t tuple.op.equals(\"and\") ||\n\t\t\t tuple.op.equals(\"or\") ) {\n\t\t if ( isNumber(tuple.arg2) ) {\n\t\t\tif ( isNumber(tuple.arg1) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg1);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg2);\n\t\t }\n\t\t else if ( isNumber(tuple.arg1) ) {\n\t\t\tif ( isNumber(tuple.arg2) )\n\t\t\t writeInst(\"li\t$t1, \"+tuple.arg2);\n\t\t\telse\n\t\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"i\t$t0, $t1, \"+tuple.arg1);\n\t\t }\n\t\t else {\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t\twriteInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t\twriteInst(tuple.op+\"\t$t0, $t1, $t2\");\n\t\t }\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Arithmetic operations requiring only one register for an operand\n\t\t// \n\t\telse if ( tuple.op.equals(\"not\") ||\n\t\t\t tuple.op.equals(\"neg\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Immediate arithmetic expressions\n\t\t//\n\t\telse if ( tuple.op.equals(\"addi\") ||\n\t\t\t tuple.op.equals(\"subi\") ) {\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Assignment and other stuff that does '='\n\t\t//\n\t\telse if ( tuple.op.equals(\"copy\") ) {\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t0, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"lw\") ) {\n\t\t // Find the location of the base address, put it in t0\n\t\t // writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Loading arrays that are passed by reference\n\t\t//\n\t\telse if ( tuple.op.equals(\"la\") ) {\n\t\t // The base address of the array gets loaded into $t0\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.arg2 ));\n\t\t // Add to it the precalculated address offset\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sub\t$t0, $t0, $t1\");\n\t\t // Store a[n] into a temp\n\t\t writeInst(\"lw\t$t0, 0($t0)\");\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t\t//\n\t\t// Writing to arrays\n\t\t//\n\t\telse if ( tuple.op.equals(\"putarray\") || tuple.op.equals(\"putarrayref\") ) {\n\t\t // tuple.place = thing to be stored\n\t\t // tuple.arg1 = base address\n\t\t // tuple.arg2 = offset\n\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( tuple.op.equals(\"putarray\") )\n\t\t\twriteInst(\"la\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t2, \"+printOffset( defun, tuple.arg2 ));\n\t\t writeInst(\"sub\t$t1, $t1, $t2\");\n\t\t writeInst(\"sw\t$t0, 0($t1)\");\n\t\t}\n\t\t//\n\t\t// Writing to pointers\n\t\t//\n\t\telse if ( tuple.op.equals(\"putpointer\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Performing conditional branches\n\t\t// \n\t\telse if ( tuple.op.equals(\"ble\") ||\n\t\t\t tuple.op.equals(\"bge\") ||\n\t\t\t tuple.op.equals(\"beq\") ||\n\t\t\t tuple.op.equals(\"bne\") ||\n\t\t\t tuple.op.equals(\"bgt\") ||\n\t\t\t tuple.op.equals(\"blt\") ||\n\t\t\t tuple.op.equals(\"beq\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t if ( isNumber(tuple.arg1) )\n\t\t\twriteInst(\"li\t$t1, \"+tuple.arg1);\n\t\t else\n\t\t\twriteInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(tuple.op+\"\\t$t0, $t1, \"+tuple.arg2);\n\t\t}\n\t\t//\n\t\t// Unconditional branch\n\t\t//\n\t\telse if ( tuple.op.equals(\"b\") ) {\n\t\t writeInst(\"b\t\"+tuple.place);\n\t\t}\n\t\t//\n\t\t// Branch equal to zero\n\t\t//\n\t\telse if ( tuple.op.equals(\"beqz\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"beqz\t$t0, \"+tuple.arg1);\n\t\t}\n\t\t//\n\t\t// Dereferences\n\t\t//\n\t\telse if ( tuple.op.equals(\"deref\") ) {\n\t\t writeInst(\"lw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t writeInst(\"lw\t$t1, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"lw\t$t0, ($t1)\");\n\t\t}\n\t\t//\n\t\t// Address-of (&)\n\t\t//\n\t\telse if ( tuple.op.equals(\"addrof\") ) {\n\t\t writeInst(\"la\t$t0, \"+printOffset( defun, tuple.arg1 ));\n\t\t writeInst(\"sw\t$t0, \"+printOffset( defun, tuple.place ));\n\t\t}\n\t }\n\t}\n\n }", "private void buildFunctionCreation(IFunction nd, SuccessorInfo i) {\n // `tail` is the last CFG node in the function creation\n INode tail = nd;\n if (!(nd instanceof AFunctionExpression) && !hoistedFns.contains(nd.getId())) {\n writeSuccessor(tail, nd.getId());\n tail = nd.getId();\n }\n writeSuccessors(tail, nd instanceof AFunctionExpression ? i.getSuccessors(true) : i.getAllSuccessors());\n }", "public MchPrinter(BPrinter fp, PrintStream ps) {\n\t\tprinter = fp;\n\t\tstream = ps;\n\t}", "public\n /* Constructor */\n AVRProgrammer(Handler _handler) {\n handler = _handler;\n }", "FunctionCall getFc();", "Rule Function() {\n // Push 1 FunctionNode onto the value stack\n StringVar functionName = new StringVar(\"\");\n return Sequence(\n Optional(\"oneway \"),\n FunctionType(),\n Identifier(),\n actions.pop(),\n ACTION(functionName.set(match())),\n \"( \",\n ZeroOrMore(Field()),\n \") \",\n Optional(Throws()),\n Optional(ListSeparator()),\n push(new IdentifierNode(functionName.get())),\n actions.pushFunctionNode());\n }", "public static TracingHelper create(Function<ContainerRequestContext, String> nameFunction) {\n return new TracingHelper(nameFunction);\n }", "public static void main(String[] args){\t \n\t FunctionTest ft = ()-> System.out.println(\"Hola Mundo\");\n ft.saludar();\n\t}", "EthHandler create(EthVersion version);", "void createHandler(final String handlerClassName);", "private void outputMakeNodeFunction(PrintWriter out) {\n\t\t\n\t\tout.println(\" private \" + prefix + \"ASTNode makenode(String rulename, String value, boolean multi_child) {\");\n\t\t\n\t\tfor (String rulename : grammardef.getRuleNames()) {\n\t\t\tif (grammardef.getRules(rulename).get(0).isSubrule()) continue;\n\t\t\n\t\t\tout.println(\" if (rulename.equals(\\\"\" + rulename + \"\\\")) return new \" + node(rulename) + \"(rulename, value, multi_child);\");\n\t\t}\n\t\t\n\t\tout.println(\" throw new RuntimeException(\\\"Unknown rule name, cannot make node \\\\\\\"\\\" + rulename + \\\"\\\\\\\"\\\");\");\n\t\t\n\t\tout.println(\" }\");\n\t\t\n\t}", "public PrintToStringSubscriber() {\n super(System.out::println);\n }", "public PrintDocumentSubscriber() {\n super(t -> System.out.println(t.toJson()));\n }", "@Override\n public String codeGen() {\n\n\tString labelFun = \"labelFun\" + MiniFunLib.getLabIndex();\n\tString popParSequence = \"\";\n\tString popLocalVariable = \"\";\n\tString localVariableCodeGen = \"\";\n\n\tfor (int i = 0; i < funParams.size(); i++) {\n\t NodeType nt = this.funParams.get(i).getType().getNodeType();\n\n\t if (nt == NodeType.ARROWTYPE_NODE)\n\t\tpopParSequence += VMCommands.POP + \"\\n\" + VMCommands.POP + \"\\n\";\n\t else\n\t\tpopParSequence += VMCommands.POP + \"\\n\";\n\t}\n\n\tfor (int i = 0; i < funLocalVariables.size(); i++) {\n\t localVariableCodeGen += funLocalVariables.get(i).codeGen();\n\t popLocalVariable += VMCommands.POP + \"\\n\";\n\t}\n\n\tString code = labelFun + \" :\\n\" +\n\t// Preparo parte bassa dell'activation Record\n\n\t\t// Il registro FP punterà al nuovo Activation Record\n\t\tVMCommands.CFP + \"\\n\"\n\n\t\t// PUSH dei dati Locali\n\t\t+ localVariableCodeGen +\n\n\t\t// PUSH return address del chiamante\n\t\tVMCommands.LRA + \"\\n\"\n\n\t\t// Corpo della funzione\n\t\t+ funBody.codeGen() +\n\n\t\t// POP RV e salvo nel registro\n\t\tVMCommands.SRV + \"\\n\" +\n\n\t\t// POP RA e salvo nel registro\n\t\tVMCommands.SRA + \"\\n\" +\n\n\t\t// Rimuovo variabili locali\n\t\tpopLocalVariable +\n\t\t// Rimuovo Access Link\n\t\tVMCommands.POP + \"\\n\" +\n\t\t// Rimuovo Pametri\n\t\tpopParSequence +\n\n\t\t// Ripristino il Registro FP che punterà all'Activation Record\n\t\t// del chiamante\n\t\tVMCommands.SFP + \"\\n\" +\n\n\t\t// PUSH valore di ritorno\n\t\tVMCommands.LRV + \"\\n\" +\n\t\t// PUSH indirizzo di ritorno\n\t\tVMCommands.LRA + \"\\n\" +\n\n\t\t// Salto al Chiamante\n\t\tVMCommands.JS + \"\\n\";\n\n\tMiniFunLib.addFunctionCode(code);\n\n\treturn VMCommands.PUSH + \" \" + labelFun + \"\\n\";\n }", "@Override\r\n\tpublic void print(TransferObjectContext context) {\n\t\tif (customConstructorDefined && context.isCustomerConstructorParameter()) {\r\n\t\t\tsuper.print(context);\r\n\t\t}\r\n\t}", "private PrintUtilities()\n {\n // Do nothing.\n }", "public void write(Printer p) throws IOException, IVisitor.VisitorException {\n\t\tp.writer().append(\"(\" + commandName + \" \");\n\t\toption.accept(p);\n\t\tp.writer().append(\" \");\n\t\tvalue.accept(p);\n\t\tp.writer().append(\")\");\n\t}", "public void print () {\n }", "public Hello(Handler handler){\n this.handler = handler;\n }", "void print() {\n\t\n\t}", "private void createFunctionPanel()\n\t{\n\t\tGridLayout funcGrid = new GridLayout(2,5);\n\t\tfuncGrid.setHgap (5);\n\t\tfuncGrid.setVgap (5);\n\t\tfunctionPanel.setLayout(funcGrid);\n\t\tfunctionPanel.add (eToPower);\n\t\tfunctionPanel.add (ln);\n\t\tfunctionPanel.add (twoPower);\n\t\tfunctionPanel.add (xCube);\n\t\tfunctionPanel.add (xSquare);\n\t\tfunctionPanel.add (del);\n\t\tfunctionPanel.add (C);\n\t\tfunctionPanel.add (negate);\n\t\tfunctionPanel.add (cubeRoot);\t\t\n\t\tfunctionPanel.add (squareRoot);\n\t\t\n\t}", "public String getTail(Handler handler)\n {\n return \"</pre></body></html>\\n\";\n }", "public void makePrintButton() {\r\n JButton print = new JButton(\"Print out account details\");\r\n new Button(print, main);\r\n// print.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// print.setPreferredSize(new Dimension(2500, 100));\r\n// print.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n print.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n printLeagueOfLegendsAccount();\r\n }\r\n });\r\n// main.add(print);\r\n }", "public SymbolTableBuildingVisitor(Hashtable<String, ClassTreeNode> map, ErrorHandler handler){\n classMap = map;\n errorHandler = handler;\n }", "public Snippet visit(PrintStatement 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 n.nodeToken3.accept(this, argu);\n\t _ret.returnTemp = generateTabs(blockDepth)+\"System.out.print(\"+f2.returnTemp+\");\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public MyPrinter() {\r\n this.message = \"\";\r\n }", "Handler<Q, R> handler();", "@Override\r\n public void visit(Print n, functionStruct fStruct) {\r\n String printObject = n.f2.f0.toString();\r\n addId(printObject, fStruct.functionName, fStruct.lineNumber);\r\n \r\n }", "@Override\n\tpublic void printParseTree(String indent) {\n\t\tIO.displayln(indent+indent.length()+\" <fun op> \");\n\t\tif(boro_choto != ' ')\n\t\tIO.displayln(indent+indent.length()+\" \"+boro_choto);\n\t\telse if(soman != \"\")\n\t\tIO.displayln(indent+indent.length()+\" \"+soman);\n\t}", "void printFleet(ConsolePrinter printer);", "String toString(String functionName);", "public String visit(Procedure n, Object argu) \r\n\t{\r\n\t\t\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\".text \\n\");\r\n\t\tMipsOutPut.add(n.f0.f0.tokenImage+\": \\n\");\r\n\t MipsOutPut.add(MipsOutPut.Space+\"sw $fp, -8($sp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"move $fp, $sp \\n\");\r\n int stackLength = (Integer.parseInt(n.f5.f0.tokenImage)+2)*4;\r\n MipsOutPut.add(MipsOutPut.Space+\"subu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"sw $ra, -4($fp) \\n\");\r\n\t\tn.f10.accept(this,argu);\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $ra, -4($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"lw $fp, -8($fp) \\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"addu $sp, $sp, \" +stackLength +\"\\n\");\r\n\t\tMipsOutPut.add(MipsOutPut.Space+\"j $ra \\n\");\r\n\t\treturn null;\r\n\t}", "FunCall createFunCall();", "public String toString() {\n return function.toString();\n }", "FuncDecl createFuncDecl();", "public String print();", "@Override\n\t\t\tpublic void performAction(PrintWriter pw) {\n\t\t\t\t\n\t\t\t\tString hello = \"helloworld\";\n\t\t\t\t\n\t\t\t\tpw.println(hello);\n\t\t\t\t\n\t\t\t}", "public void print();", "public void print();", "public void print();", "public void print();", "public static void main(String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "@Override\n public Void VisitTopNode(TopNode node) {\n for (FunctionDclNode FuncDecl : node.getFunctionDeclarations()) {\n symbolTable.currentScope().define(FuncDecl.getVariable(), FuncDecl.getLineNumber());\n }\n //symbolTable.currentScope().define(new Variable(ValueType.VOID, \"print\", true));\n //Visit all function declarations\n for (FunctionDclNode funcDecl : node.getFunctionDeclarations())\n visit(funcDecl);\n symbolTable.pushScope(ScopeType.LOCAL);\n if (node.getStatements() != null)\n visit(node.getStatements());\n symbolTable.popScope();\n return null;\n }", "IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);", "public Consumer<String> outputHandler() {\n return outputHandler;\n }", "public void parseFunctions(){\n\t\t\n\t}", "void printWithJavaFX() {\n }", "private JCTree.JCStatement createPrintln(String message) {\n return make.Exec(\n make.Apply(\n List.nil(), // Return value\n make.Select(\n make.Select(\n make.Ident(names.fromString(\"System\")),\n names.fromString(\"out\")\n ),\n names.fromString(\"println\")\n ),\n List.of(make.Literal(message)))\n );\n }", "public static void main(String[] args){\n SomeFunc<String> reverse = (str) -> new StringBuilder(str).reverse().toString();\n// System.out.println(reverse.func(\"Hello World\"));\n\n // passing lambda expressions as arguments\n// System.out.println(makeHappy((s -> s + \" :)\"), \"Hello Jeff\"));\n\n MyNumberType doubleNum = (nt) -> nt * 2;\n MyNumberType addOneToNum = (nt)-> nt + 1;\n System.out.printf(\"2 doubled is %d, 2 + 1 is %d\", doubleNum.transform(2), addOneToNum.transform(2));\n System.out.printf(\"\\n2 doubled + 1 is %d\", doubleNum.andThen(addOneToNum).transform(2));\n\n// consumerDemo();\n// predicateDemo();\n functionDemo();\n// supplierDemo();\n\n }", "public static TracingHelper create() {\n return new TracingHelper(TracingHelper::classMethodName);\n }", "public MemoryHandler createMemoryHandler ( Handler\t\tdiskFileHandler\r\n\t\t\t\t\t\t\t\t\t\t\t , int \t\trecordNumber\r\n\t\t\t\t\t\t\t\t\t\t\t , Level \tlevelValue\r\n\t\t\t\t\t\t\t\t\t\t\t ) {\r\n\t\t\t\t\r\n\t\tMemoryHandler memoryHandler = null;\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\t \t\r\n\t\t\tmemoryHandler = new MemoryHandler(diskFileHandler, recordNumber, levelValue);\r\n\t\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t \r\n\t\t return memoryHandler;\r\n\t}", "OpFunction createOpFunction();", "private void generateHandlerAction(Handler h, Message m, StringBuilder builder, Context ctx, String debug) {\n if (h.getEvent().size() == 0) {\n builder.append(\".effect((message) => {\\n\");\n builder.append(debug);\n ctx.getCompiler().getThingActionCompiler().generate(h.getAction(), builder, ctx);\n builder.append(\"})\\n\\n\");\n } else {\n builder.append(\".effect((\" + m.getName() + \") => {\\n\");\n builder.append(debug);\n ctx.getCompiler().getThingActionCompiler().generate(h.getAction(), builder, ctx);\n builder.append(\"})\");\n }\n }", "public static void printRuntimeTable(functionRuntimes fRT)\r\n {\r\n\r\n }", "public static void main(String[] args) {\n\r\n\t\t String s1=\"Lambda\";\r\n\r\n\t\t String s2=\"Expression\";\r\n\r\n\t\t \r\n\r\n\t\t StringFormatter x=(a1,a2)->a1+\" \"+a2;\r\n\r\n\t\t StringFormatter y=(a1,a2)->a1+\"-\"+a2;\r\n\r\n\t\t StringFormatter z=(a1,a2)->a1.toUpperCase()+\" \"+a2.toUpperCase();\r\n\r\n\t\t \r\n\r\n\t\t System.out.println(x.format(s1, s2));\r\n\r\n\t\t System.out.println(y.format(s1, s2));\r\n\r\n\t\t System.out.println(z.format(s1, s2));\r\n\r\n}", "public static void main (String[] args){\n Printer printer = new Printer();\n printer.print();\n }", "private void genDebugDumpValue(PrintWriter writer, String varName, String tabs) {\n genDebug(writer, tabs + \"std::cout << \\\"\" + varName + \" = \\\" << \" + varName + \" << std::endl;\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tConsumer<String> imprimirUmaFrase = System.out::println;\n\t\tConsumer<String> imprimirOutraFrase = frase -> System.out.println(frase);\n\t\t\n\t\timprimirUmaFrase.accept(\"Hello World\");\n\t\timprimirOutraFrase.accept(\"Ola Mundo\");\n\t\t\n\t}" ]
[ "0.52833027", "0.5202579", "0.515913", "0.51392466", "0.50378287", "0.5035608", "0.50075686", "0.49738702", "0.49275112", "0.4903725", "0.48866785", "0.4799607", "0.4786424", "0.47195715", "0.4711184", "0.46992078", "0.46709034", "0.46473137", "0.46014556", "0.45941547", "0.4590749", "0.4589547", "0.45730886", "0.4572853", "0.45668647", "0.4536985", "0.45281827", "0.4522347", "0.45080122", "0.4484885", "0.4481216", "0.4480749", "0.4480713", "0.44805843", "0.44766304", "0.44711745", "0.4470272", "0.44666746", "0.44647783", "0.44594118", "0.44556755", "0.44517902", "0.44436228", "0.4437826", "0.44179934", "0.441256", "0.439696", "0.4393991", "0.4379322", "0.4375917", "0.4369045", "0.4368419", "0.4364254", "0.43602055", "0.43557993", "0.43401557", "0.43331313", "0.431527", "0.43067572", "0.4302452", "0.4302425", "0.4298167", "0.42931446", "0.42930028", "0.4285993", "0.42853174", "0.42842484", "0.42819917", "0.4280612", "0.42777616", "0.427758", "0.42756644", "0.4272966", "0.4270422", "0.42621762", "0.42526487", "0.4251521", "0.42512608", "0.42505732", "0.42495313", "0.42495313", "0.42495313", "0.42495313", "0.42438594", "0.4240384", "0.4237647", "0.4233714", "0.42222276", "0.4212659", "0.42115304", "0.421136", "0.4190349", "0.41888702", "0.41846594", "0.41812956", "0.4178231", "0.41755706", "0.41743115", "0.4173844", "0.41729975" ]
0.6998621
0
Return the generated lines
public List<String> getLines() { return lines; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Integer> generateLine() {\r\n\t\tList<Integer> tempLine = new ArrayList<Integer>();\r\n\t\tfor (int j=0; j <3; j++) {\r\n\t\t\tint randomNum = ThreadLocalRandom.current().nextInt(0,3);\r\n\t\t\ttempLine.add(randomNum);\r\n\t\t}\r\n\t\treturn tempLine;\r\n\t}", "private Line[] makeTenRandomLines() {\n Random rand = new Random(); // create a random-number generator\n Line[] lines = new Line[NUM_LINE];\n for (int i = 0; i < NUM_LINE; ++i) {\n int x1 = rand.nextInt(400) + 1; // get integer in range 1-400\n int y1 = rand.nextInt(300) + 1; // get integer in range 1-300\n int x2 = rand.nextInt(400) + 1; // get integer in range 1-400\n int y2 = rand.nextInt(300) + 1; // get integer in range 1-300\n lines[i] = new Line(x1, y1, x2, y2);\n }\n return lines;\n }", "public void generateLineItems(){\n for(int i=0; i<purch.getProdIdx().length; i++){\r\n \r\n prod= new Product(db.getProductDbItem(purch.getProductItem(i)));\r\n \r\n LineItem[] tempL=new LineItem[lineItem.length+1];\r\n System.arraycopy(lineItem,0,tempL,0,lineItem.length);\r\n lineItem=tempL;\r\n lineItem[lineItem.length-1]= new LineItem(prod.getProdId(),purch.getQtyAmtItm(i), \r\n prod.getProdUnitPrice(), prod.getProdDesc(), prod.getProdDiscCode()); \r\n totalPurch += (purch.getQtyAmtItm(i) * prod.getProdUnitPrice());\r\n totalDisc += lineItem[lineItem.length-1].getDiscAmt();\r\n \r\n }\r\n }", "List<Line> getLines();", "private List<LotteryTicketLine> createTicketLines(int lines, LotteryTicket ticket) {\n\t\tList<LotteryTicketLine> linesList = new ArrayList<>();\n\n\t\t// Iterate the lines\n\t\tfor (int linesItr = 1; linesItr <= lines; linesItr++) {\n\t\t\t// Generate appropriate parameters and add in list object\n\t\t\tint first = generateRandomNumber();\n\t\t\tint second = generateRandomNumber();\n\t\t\tint third = generateRandomNumber();\n\t\t\tLotteryTicketLine line = new LotteryTicketLine(first, second, third, getOutcome(first, second, third),\n\t\t\t\t\tticket);\n\t\t\tlinesList.add(line);\n\t\t}\n\t\treturn linesList;\n\t}", "private ListStore<Line> createLines() {\n\t\tStyleInjectorHelper.ensureInjected(CommonGanttResources.resources.css(), true);\n\n\t\tLineProperties lineProps = GWT.create(LineProperties.class);\n\t\tListStore<Line> store = new ListStore<Line>(lineProps.key());\n\t\tString customCssStyle = CommonGanttResources.resources.css().todayLineMain();\n\t\tLine line = new Line(new Date(), \"Текушая дата :\" + new Date().toString(), customCssStyle);\n\t\tstore.add(line);\n\t\treturn store;\n\t}", "public void generateLines(int lineAmount, PointManager pointManager, Triangle triangle, Circle circle) {\n pointManager.generatePointsOnCircle(lineAmount, circle);\n for (int i = 0; i < lineAmount; i++) {\n\n Line line = new Line();\n // randomly setting both points of line\n Random random = new Random();\n if (randomStartpoint) {\n line.setStartPoint(pointManager.getOnCirclePoints().get(random.nextInt(pointManager.getOnCirclePoints().size())));\n } else {\n line.setStartPoint(triangle.getFirstCorner());\n }\n line.setEndPoint(pointManager.getOnCirclePoints().get(random.nextInt(pointManager.getOnCirclePoints().size())));\n lines.add(line);\n }\n }", "org.tensorflow.proto.profiler.XLine getLines(int index);", "@Override\n protected void createLines() {\n\n Line[] lines = new GraphicalLine[(2 * columns * rows) + columns + rows];\n int lineIndex = 0;\n\n int boxCounter = 0;\n int x = settings.dotStartX() + settings.dotWidth();\n int y = settings.dotStartY() + settings.lineOffset();\n boolean isTop = true;\n boolean isFirstRow = true;\n\n /* horizontal lines */\n /* for every row + 1 */\n for (int i = 0; i < rows + 1; i++) {\n\n /* for every column */\n for (int j = 0; j < columns; j++) {\n\n Line line = new GraphicalLine(x, y, settings.lineWidth(), settings.lineHeight());\n line.addBox(boxes[boxCounter]);\n if (isTop) {\n boxes[boxCounter].setTopLine(line);\n } else {\n boxes[boxCounter].setBottomLine(line);\n /* if there is a next row */\n if (i + 1 < rows + 1) {\n line.addBox(boxes[boxCounter + columns]);\n boxes[boxCounter + columns].setTopLine(line);\n }\n }\n boxCounter++;\n lines[lineIndex++] = line;\n x += settings.dotSeparatorLength();\n }\n boxCounter = isTop ? boxCounter - columns : boxCounter;\n if (isFirstRow) {\n isTop = false;\n isFirstRow = false;\n }\n y += settings.dotSeparatorLength();\n x = settings.dotStartX() + settings.dotWidth();\n }\n\n boxCounter = 0;\n x = settings.dotStartX() + settings.lineOffset();\n y = settings.dotStartY() + settings.dotWidth();\n\n /* vertical lines */\n /* for every row */\n for (int i = 0; i < rows; i++) {\n\n /* for every column + 1 */\n for (int j = 0; j < columns + 1; j++) {\n\n Line line = new GraphicalLine(x, y, settings.lineHeight(), settings.lineWidth());\n /* if there is a previous vertical line */\n if (j > 0) {\n boxes[boxCounter - 1].setRightLine(line);\n line.addBox(boxes[boxCounter - 1]);\n }\n /* if there is a next column */\n if (j + 1 < columns + 1) {\n boxes[boxCounter].setLeftLine(line);\n line.addBox(boxes[boxCounter]);\n boxCounter++;\n }\n lines[lineIndex++] = line;\n x += settings.dotSeparatorLength();\n }\n y += settings.dotSeparatorLength();\n x = settings.dotStartX() + settings.lineOffset();\n }\n\n this.lines = lines;\n }", "Line createLine();", "@Override\r\n\tprotected String[] getSpecificLines() {\r\n\t\tString[] lines = new String[4];\r\n\t\tlines[0] = \"\";\r\n\t\tif (items.toString().lastIndexOf('_') < 0) {\r\n\t\t\tlines[1] = items.toString();\r\n\t\t\tlines[2] = \"\";\r\n\t\t} else {\r\n\t\t\tlines[1] = items.toString().substring(0, items.toString().lastIndexOf('_'));\r\n\t\t\tlines[2] = items.toString().substring(items.toString().lastIndexOf('_') + 1);\r\n\t\t}\r\n\t\tlines[3] = String.valueOf(cost);\r\n\t\treturn lines;\r\n\t}", "public String[] getLines() {// otan patas subscribe sto menu , print lista me ta lines\n int length = databaseLineIDToTitle.size();\n\n if (length == 0) {\n return null;\n } else {\n int subs = 0;\n\n for (Map.Entry<Integer, String> pair : databaseLineIDToTitle.entrySet()) { // Entryset, returns the hashmap\n if (subscribedLists.contains(pair.getKey())) {\n subs++;\n }\n }\n\n String[] array = new String[length - subs];\n\n int i = 0;\n\n for (Map.Entry<Integer, String> pair : databaseLineIDToTitle.entrySet()) { // Entryset, returns the hashmap\n if (!subscribedLists.contains(pair.getKey())) {\n array[i++] = String.format(\"%03d - %s \\n \", pair.getKey(), pair.getValue());\n }\n }\n return array;\n }\n }", "private LineData generateDataLine(int cnt) {\n\n ArrayList<Entry> e1 = new ArrayList<Entry>();\n\n for (int i = 0; i < 12; i++) {\n e1.add(new Entry(i, (int) (Math.random() * 65) + 40));\n }\n\n LineDataSet d1 = new LineDataSet(e1, \"New DataSet \" + cnt + \", (1)\");\n d1.setLineWidth(2.5f);\n d1.setCircleRadius(4.5f);\n d1.setHighLightColor(Color.rgb(244, 117, 117));\n d1.setDrawValues(false);\n\n ArrayList<Entry> e2 = new ArrayList<Entry>();\n\n for (int i = 0; i < 12; i++) {\n e2.add(new Entry(i, e1.get(i).getY() - 30));\n }\n\n LineDataSet d2 = new LineDataSet(e2, \"New DataSet \" + cnt + \", (2)\");\n d2.setLineWidth(2.5f);\n d2.setCircleRadius(4.5f);\n d2.setHighLightColor(Color.rgb(244, 117, 117));\n d2.setColor(ColorTemplate.VORDIPLOM_COLORS[0]);\n d2.setCircleColor(ColorTemplate.VORDIPLOM_COLORS[0]);\n d2.setDrawValues(false);\n\n ArrayList<ILineDataSet> sets = new ArrayList<ILineDataSet>();\n sets.add(d1);\n sets.add(d2);\n\n LineData cd = new LineData(sets);\n return cd;\n }", "java.util.List<org.tensorflow.proto.profiler.XLine> \n getLinesList();", "@Override\n\tpublic List<String> getLinesToExport()\n\t{\n\n\t\tList<String> returnList = new ArrayList<>();\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(\"series\");\n\t\tsb.append(\"\\t\");\n\t\tsb.append(\"x\");\n\t\tsb.append(\"\\t\");\n\t\tsb.append(\"y\");\n\t\tsb.append(\"\\t\");\n\t\tsb.append(\"components delimited by ///\");\n\t\treturnList.add(sb.toString());\n\t\tfor (SciomeSeries<Number, Number> seriesData : getSeriesData())\n\t\t{\n\t\t\tfor (SciomeData<Number, Number> xychartData : seriesData.getData())\n\t\t\t{\n\t\t\t\tsb.setLength(0);\n\t\t\t\tDouble X = xychartData.getXValue().doubleValue();\n\t\t\t\tDouble Y = xychartData.getYValue().doubleValue();\n\t\t\t\tList extraValue = (List) xychartData.getExtraValue();\n\n\t\t\t\tStringBuilder components = new StringBuilder();\n\t\t\t\tfor (Object obj : extraValue)\n\t\t\t\t{\n\t\t\t\t\tif (components.length() > 0)\n\t\t\t\t\t\tcomponents.append(\"///\");\n\t\t\t\t\tcomponents.append(obj.toString());\n\t\t\t\t}\n\n\t\t\t\tsb.append(seriesData.getName());\n\t\t\t\tsb.append(\"\\t\");\n\t\t\t\tsb.append(X);\n\t\t\t\tsb.append(\"\\t\");\n\t\t\t\tsb.append(Y);\n\t\t\t\tsb.append(\"\\t\");\n\t\t\t\tsb.append(components.toString());\n\n\t\t\t\treturnList.add(sb.toString());\n\n\t\t\t}\n\t\t}\n\n\t\treturn returnList;\n\n\t}", "private void makeTestLines(int n) {\n testLines = new ArrayList<>();\n for (int i = 0; i < n; i += 1) {\n testLines.add(\"Line \" + i);\n }\n }", "@Override\n public Line[] getLines(){\n Line[] arrayOfLines = new Line[]{topLine, rightLine, bottomLine, leftLine}; //stores the array of lines that form the rectangle\n return arrayOfLines;\n }", "@Override\r\n\tpublic synchronized String toString()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tStringBuilder sb = new StringBuilder()\r\n\t\t\t\t.append(lines.size()).append(' ')\r\n\t\t\t\t.append(numberOfClients).append(' ');\r\n\t\t\tfor(int i = size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tsb.append(lines.get(i).toString()).append(' ');\r\n\t\t\t}\r\n\t\t\treturn sb.toString();\r\n\t\t}\r\n\t}", "public static ArrayList getLines() {\n return lines;\n }", "private LineData generateLineData() {\n\n LineData d = new LineData();\n LineDataSet set = new LineDataSet(ReportingRates, \" ARVs (Reporting Rates)\");\n set.setColors(Color.parseColor(\"#90ed7d\"));\n set.setLineWidth(2.5f);\n set.setCircleColor(Color.parseColor(\"#90ed7d\"));\n set.setCircleRadius(2f);\n set.setFillColor(Color.parseColor(\"#90ed7d\"));\n set.setMode(LineDataSet.Mode.CUBIC_BEZIER);\n set.setDrawValues(true);\n\n set.setAxisDependency(YAxis.AxisDependency.LEFT);\n d.addDataSet(set);\n\n return d;\n }", "private String generatorResponse(int countLines) {\n return this.answersList.get(new Random().nextInt(countLines));\n }", "List<String> getLines();", "private void createLinesArray()\n {\n //This will iterate through the lines array\n for (int i = 0; i < lines.length; i++)\n {\n //Stop at end-of-File\n if (mapScanner.hasNextLine())\n {\n //Add the current line to the lines array\n lines[i] = mapScanner.nextLine();\n }\n }\n }", "private static GridLineSet generateRandomTestLines(GridGraph gridGraph,\n int amount) {\n GridLineSet gridLineSet = new GridLineSet();\n \n Random rand = new Random();\n for (int i=0; i<amount; i++) {\n int x1 = rand.nextInt(gridGraph.sizeX);\n int y1 = rand.nextInt(gridGraph.sizeY);\n int x2 = rand.nextInt(gridGraph.sizeX);\n int y2 = rand.nextInt(gridGraph.sizeY);\n \n Experiment.testAndAddLine(x1,y1,x2,y2,gridGraph,gridLineSet);\n }\n \n return gridLineSet;\n }", "void getAllLines(Vector<Integer> lineIDs,Vector<Integer> lineDepIDs, Vector<String> lineCodes, String empresa);", "private void printLines() {\n for (String L: testLines) {\n print.write(L);\n }\n }", "public String readLines() {\n\n String fileAsString;\n fileAsString = read();\n StringBuilder newString = new StringBuilder();\n if (fileAsString != null) {\n if (fromLine == toLine) {\n\n newString = new StringBuilder(fileAsString.split(\"\\n\")[fromLine - 1]);\n return newString.toString();\n } else {\n if (toLine > fileAsString.split(\"\\n\").length) {\n toLine = fileAsString.split(\"\\n\").length;\n }\n ;\n for (int i = fromLine - 1; i < toLine; i++) {\n\n newString.append(fileAsString.split(\"\\n\")[i]).append(\"\\n\");\n\n\n }\n }\n\n }\n\n\n return newString.toString();\n }", "public List<Polyline> getAllLines() {\n return lines;\n }", "static void generate(Proc proc, PrintWriter outData)\r\n {\r\n for (int i=0; i < proc.lines.size(); i++)\r\n {\r\n //String l = (String) proc.lines.elementAt(i);\r\n Line line = \tproc.lines.elementAt(i);\r\n outData.println(line.line);\r\n }\r\n outData.println();\r\n }", "public List<String> getOutput() {\n List<String> toRet = new ArrayList<String>();\n String line = processLinesOut_.poll();\n while (line != null) {\n toRet.add(line);\n line = processLinesOut_.poll();\n }\n return toRet;\n }", "public Line[] rockLines() {\n\t\treturn outLine;\n\t}", "ArrayList<String> getLines();", "public void generateOutputLine(String outputLine, int index);", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "public List<ArticLine> getArticLines() {\n\n if (articLines == null) {\n articLines = new ArrayList<ArticLine>();\n\n List<Element> paragraphs = br.ufrgs.artic.utils.FileUtils.getElementsByTagName(\"para\", omniPageXMLDocument.getDocumentElement());\n\n Integer lineCounter = 0;\n Boolean foundIntroOrAbstract = false;\n String previousAlignment = null;\n Element previousElement = null;\n if (paragraphs != null && !paragraphs.isEmpty()) {\n\n for (Element paragraphElement : paragraphs) {\n\n String alignment = getAlignment(paragraphElement);\n\n String paragraph = \"new\";\n\n List<Element> linesOfParagraph = br.ufrgs.artic.utils.FileUtils.getElementsByTagName(\"ln\", paragraphElement);\n\n if (linesOfParagraph != null && !linesOfParagraph.isEmpty()) {\n for (Element lineElement : linesOfParagraph) {\n ArticLine articLine = new ArticLine(lineCounter, lineElement, previousElement,\n averagePageFontSize, alignment, previousAlignment, topBucketSize, leftBucketSize);\n articLines.add(articLine);\n\n String textContent = articLine.getOriginalText();\n\n if (textContent != null && Pattern.compile(\"intro|abstract\", Pattern.CASE_INSENSITIVE).\n matcher(textContent).find()) {\n foundIntroOrAbstract = true;\n }\n\n if (!foundIntroOrAbstract) { //special case for headers\n articLine.setParagraph(\"header\");\n } else {\n articLine.setParagraph(paragraph);\n }\n\n paragraph = \"same\";\n previousElement = lineElement;\n previousAlignment = alignment;\n lineCounter++;\n }\n }\n }\n }\n }\n\n return articLines;\n }", "private LineData generateDataLine(int cnt, String name, ArrayList<Double> mainEmotion) {\n\n ArrayList<Entry> values1 = new ArrayList<>();\n\n //int[] val = {(int) happinessr, (int) sadnessr, (int) surpriser, (int) fearr, (int) neutralr, (int) contemptr, (int) angerr, (int) disgustr};\n\n for (int i = 0; i < mainEmotion.size(); i++) {\n values1.add(new Entry(i, mainEmotion.get(i).intValue()));\n }\n\n LineDataSet d1 = new LineDataSet(values1, name);\n d1.setLineWidth(2.5f);\n d1.setCircleRadius(4.5f);\n //Toast.makeText(getContext().getApplicationContext(), name, Toast.LENGTH_LONG).show();\n\n switch (name) {\n case \"Happiness\":\n d1.setColor(Color.rgb(189, 237, 255));\n d1.setCircleColors(Color.rgb(189, 237, 255));\n break;\n case \"Sadness\":\n d1.setColor(Color.rgb(74, 88, 176));\n d1.setCircleColors(Color.rgb(74, 88, 176));\n break;\n case \"Contempt\":\n d1.setColor(Color.rgb(242, 5, 92));\n d1.setCircleColors(Color.rgb(242, 5, 92));\n break;\n case \"Disgust\":\n d1.setColor(Color.rgb(79, 139, 62));\n d1.setCircleColors(Color.rgb(79, 139, 62));\n break;\n case \"Fear\":\n d1.setColor(Color.rgb(89, 72, 122));\n d1.setCircleColors(Color.rgb(89, 72, 122));\n break;\n case \"Surprise\":\n d1.setColor(Color.rgb(205, 185, 39));\n d1.setCircleColors(Color.rgb(205, 185, 39));\n break;\n case \"Anger\":\n d1.setColor(Color.rgb(189, 73, 84));\n d1.setCircleColors(Color.rgb(189, 73, 84));\n break;\n case \"Neutral\":\n d1.setColor(Color.rgb(220, 235, 221));\n d1.setCircleColors(Color.rgb(220, 235, 221));\n break;\n default:\n break;\n\n }\n\n d1.setHighLightColor(Color.rgb(255, 0, 0));\n d1.setDrawValues(false);\n\n ArrayList<Entry> values2 = new ArrayList<>();\n\n for (int i = 0; i < mainEmotion.size(); i++) {\n values2.add(new Entry(i, values1.get(i).getY() - 30));\n }\n\n ArrayList<ILineDataSet> sets = new ArrayList<>();\n sets.add(d1);\n //sets.add(d2);\n\n return new LineData(sets);\n }", "public void computeLine ()\r\n {\r\n line = new BasicLine();\r\n\r\n for (GlyphSection section : glyph.getMembers()) {\r\n StickSection ss = (StickSection) section;\r\n line.includeLine(ss.getLine());\r\n }\r\n\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\r\n line + \" pointNb=\" + line.getNumberOfPoints() +\r\n \" meanDistance=\" + (float) line.getMeanDistance());\r\n }\r\n }", "public Polygon getLine() {\n float[] vertices;\n if (modo == 1) {\n\n vertices = new float[]{\n getX(), getY(),\n getX() + (getWidth()*0.2f), getY() + getHeight()-getHeight()*0.2f,\n getX() + getWidth(), getY() + getHeight()};\n } else if (modo == 2) {\n\n vertices = new float[]{\n getX() + getWidth()- getWidth()*0.2f , getY() + getHeight() - getHeight()*0.2f,\n getX() + getWidth(), getY(),\n getX() , getY() + getHeight(),\n\n };\n\n } else if (modo == 3) {\n vertices = new float[]{\n getX(), getY(),\n getX() + getWidth() *0.8f, getY() + getHeight() *0.2f,\n getX() + getWidth(), getY() + getHeight()\n };\n } else {\n vertices = new float[]{\n getX(), getY() + getHeight(),\n getX() + getWidth()*0.2f, getY() + getHeight()*0.2f,\n getX() + getWidth(), getY()\n };\n }\n\n polygon.setVertices(vertices);\n return polygon;\n }", "public void addLines(){\n\t\tif (controlPoints.size() == 1) return;\n\t\t\n\t\tif (lineLists.size() < controlPoints.size()-1){\n\t\t lineLists.add(new LinkedList<Line>());\n\t\t}\n\t\t\n\t\t\n\t\tint numControlLines = controlPoints.size() - 1;\n\t\t\n\t\tfor (int i = 0; i < numControlLines; i++){\n\t\t\tLine line = new Line();\n\t\t\tif (i == 0){\n\t\t\t\tline.setStroke(Color.LIGHTGRAY);\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showPrimaryLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t\tline.toBack();\n\t\t\t} else {\n\t\t\t\tdouble hue = 360 * (((i-1)%controlPoints.size())/(double)controlPoints.size());\n\t\t\t\tdouble sat = .4;\n\t\t\t\tdouble bri = .8;\n\t\t\t\tline.setStroke(Color.hsb(hue, sat, bri));\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showSubLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t}\n\t\t\tLinkedList<Line> list = lineLists.get(i);\n\t\t\tlist.add(line);\n\t\t}\n\t}", "public String toString(){\n\t\tStringBuilder output = new StringBuilder();\n\t\tfor (int i=13; i<=16; i++){\n\t\t\toutput.append(linesAndStores[i].makeString());\n\t\t\toutput.append(\"\\n\");\n\t\t}\n\t\treturn output.toString();\n\t}", "public UBA<Line> _toLineSegments()\n {\n UBA<Line> output = new UBA<Line>();\n\n int len = _points.size();\n for(int i = 0; i < len - 1; i++)\n {\n Line line = new Line(i, i + 1, _points);\n output.push(line);\n }\n\n // Add the last point.\n if(_isClosed)\n {\n Line line = new Line(len - 1, 0, _points);\n output.push(line);\n }\n\n return output;\n }", "public String toString() {\r\n\tStringBuffer gline = new StringBuffer();\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(\"line\");\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co1.x);\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co1.y);\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co2.x);\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co2.y);\r\n\treturn gline.toString();\r\n }", "private String joinLines() {\n StringBuilder S = new StringBuilder();\n for (String L : testLines) {\n S.append(L);\n S.append(NL);\n }\n return S.toString();\n }", "final void createLines(boolean isFirst, double length, boolean isContinuous, int number, int direction, boolean isLast, int headType) {\n Line previousLine;\n for (int i = 0; i < number; i++) {\n Line line = new Line();\n line.setStrokeWidth(1.5);\n Anchor anchor;\n Color transparent = new Color(1, 1, 1, 0);\n if (isFirst && i == 0) {\n base = new Anchor(transparent, new SimpleDoubleProperty(startX), new SimpleDoubleProperty(startY));\n anchor = base;\n }\n else {\n previousLine = (Line)getChildren().get(getChildren().size()-1);\n anchor = new Anchor(transparent, previousLine.endXProperty(), previousLine.endYProperty());\n }\n getChildren().add(anchor);\n line.startXProperty().bind(anchor.centerXProperty());\n line.startYProperty().bind(anchor.centerYProperty());\n switch(direction) {\n // Direction is up\n case 1:\n line.endXProperty().bind(anchor.centerXProperty());\n line.endYProperty().bind(anchor.centerYProperty().subtract(length));\n break;\n // Direction is right\n case 2:\n line.endXProperty().bind(anchor.centerXProperty().add(length));\n line.endYProperty().bind(anchor.centerYProperty());\n break;\n // Direction is down\n case 3:\n line.endXProperty().bind(anchor.centerXProperty());\n line.endYProperty().bind(anchor.centerYProperty().add(length));\n break;\n // Direction is left\n case 4:\n line.endXProperty().bind(anchor.centerXProperty().subtract(length));\n line.endYProperty().bind(anchor.centerYProperty());\n break;\n }\n if(!isContinuous)\n line.getStrokeDashArray().setAll(5.0, 5.0);\n line.setMouseTransparent(true);\n getChildren().add(line);\n }\n if(isLast) {\n previousLine = (Line)getChildren().get(getChildren().size()-1);\n head = new Head(headType * 10 + direction, previousLine.endXProperty(), previousLine.endYProperty());\n getChildren().add(head);\n }\n }", "private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }", "public String extractDecoratedLines (int fromLine, int fromColumn,\n\t\t\tint toLine, int toColumn);", "private void Create_Path() {\n lines = new Line[getPoints().size()];\n for (int i = 1; i < getLines().length; i++) {\n lines[i] = new Line(getPoints().get(way[i]).getX(), getPoints().get(way[i]).getY(), getPoints().get(way[i - 1]).getX(), getPoints().get(way[i - 1]).getY());\n }\n lines[0] = new Line(getPoints().get(way[getLines().length - 1]).getX(), getPoints().get(way[getLines().length - 1]).getY(), getPoints().get(way[0]).getX(), getPoints().get(way[0]).getY());\n\n }", "private static void chaotic(int lines) {\n Random rand = new Random();\r\n //prints out a random amout of * from 1 to 5 for every line\r\n for (int i = 0; i < lines; i++) {\r\n int length = rand.nextInt(5) + 1;\r\n for(int o = 0; o < length; o++)\r\n System.out.print(\"* \");\r\n //new line to separate lines of *\r\n System.out.println(\"\");\r\n }\r\n }", "@Override\n public List<PurchaseOrderLine> getOrderlines() {\n return orderLines;\n }", "private List<List<positionTicTacToe>> initializeWinningLines()\n\t{\n\t\tList<List<positionTicTacToe>> winningLines = new ArrayList<List<positionTicTacToe>>();\n\t\t\n\t\t//48 straight winning lines\n\t\t//z axis winning lines\n\t\tfor(int i = 0; i<4; i++)\n\t\t\tfor(int j = 0; j<4;j++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,j,0,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,j,1,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,j,2,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,j,3,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t//y axis winning lines\n\t\tfor(int i = 0; i<4; i++)\n\t\t\tfor(int j = 0; j<4;j++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,0,j,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,1,j,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,2,j,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,3,j,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t//x axis winning lines\n\t\tfor(int i = 0; i<4; i++)\n\t\t\tfor(int j = 0; j<4;j++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(0,i,j,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(1,i,j,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(2,i,j,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(3,i,j,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t\n\t\t//12 main diagonal winning lines\n\t\t//xz plane-4\n\t\tfor(int i = 0; i<4; i++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(0,i,0,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(1,i,1,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(2,i,2,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(3,i,3,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t//yz plane-4\n\t\tfor(int i = 0; i<4; i++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,0,0,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,1,1,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,2,2,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,3,3,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t//xy plane-4\n\t\tfor(int i = 0; i<4; i++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(0,0,i,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(1,1,i,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(2,2,i,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(3,3,i,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t\n\t\t//12 anti diagonal winning lines\n\t\t//xz plane-4\n\t\tfor(int i = 0; i<4; i++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(0,i,3,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(1,i,2,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(2,i,1,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(3,i,0,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t//yz plane-4\n\t\tfor(int i = 0; i<4; i++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,0,3,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,1,2,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,2,1,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(i,3,0,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t//xy plane-4\n\t\tfor(int i = 0; i<4; i++)\n\t\t\t{\n\t\t\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(0,3,i,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(1,2,i,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(2,1,i,-1));\n\t\t\t\toneWinCondtion.add(new positionTicTacToe(3,0,i,-1));\n\t\t\t\twinningLines.add(oneWinCondtion);\n\t\t\t}\n\t\t\n\t\t//4 additional diagonal winning lines\n\t\tList<positionTicTacToe> oneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\toneWinCondtion.add(new positionTicTacToe(0,0,0,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(1,1,1,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(2,2,2,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(3,3,3,-1));\n\t\twinningLines.add(oneWinCondtion);\n\t\t\n\t\toneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\toneWinCondtion.add(new positionTicTacToe(0,0,3,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(1,1,2,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(2,2,1,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(3,3,0,-1));\n\t\twinningLines.add(oneWinCondtion);\n\t\t\n\t\toneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\toneWinCondtion.add(new positionTicTacToe(3,0,0,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(2,1,1,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(1,2,2,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(0,3,3,-1));\n\t\twinningLines.add(oneWinCondtion);\n\t\t\n\t\toneWinCondtion = new ArrayList<positionTicTacToe>();\n\t\toneWinCondtion.add(new positionTicTacToe(0,3,0,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(1,2,1,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(2,1,2,-1));\n\t\toneWinCondtion.add(new positionTicTacToe(3,0,3,-1));\n\t\twinningLines.add(oneWinCondtion);\t\n\t\t\n\t\treturn winningLines;\n\t\t\n\t}", "public static void drawLines(Pane pane) {\n\n for (int i = 0; i < 4; i++) {\n Line lineH = new Line(0, i * 150, 450, i * 150);\n lineH.setStroke(Color.DARKGRAY);\n lineH.setStrokeWidth(3);\n pane.getChildren().add(lineH);\n\n Line lineV = new Line(i * 150, 0, i * 150, 450);\n lineV.setStroke(Color.DARKGRAY);\n lineV.setStrokeWidth(3);\n pane.getChildren().add(lineV);\n }\n }", "public void draw()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tfor(int i = lines.size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tlines.get(i).draw();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<String> nextSeveralLines() throws IOException {\n if (StringUtils.isBlank(currentPath)) return null;\n List<String> lista = new ArrayList<String>();\n String sCurrentLine;\n int temp = 1;\n\n bufferReader.mark(10000000);\n while ((sCurrentLine = bufferReader.readLine()) != null) {\n temp++;\n if (temp > counterSeveralLines) {\n for (int i = 0; i < linesAfter; i++) {\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n counterSeveralLines++;\n lista.add(sCurrentLine);\n }\n }\n bufferReader.reset();\n return lista;\n }\n }\n return lista;\n }", "public int[] getLineNumbers() {\n return lineNos;\n }", "int getFixedLines();", "public int getLines() {\n\t\treturn this.linhas;\n\t}", "public abstract String getLine(int lineNumber);", "private void drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }", "private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}", "@Override\n public Line getLine() {\n return line;\n }", "public KochLine getLineD(){\n\t\tKochLine lineD= new KochLine(p4,p5);\n\t\treturn lineD;\n\t\t\n\t}", "public Lines()\r\n\t{\r\n\t\tlines = new LinkedList<Line>();\r\n\t}", "private void drawLine(Vector3 point1, Vector3 point2, Node n) {\n\n Node nodeForLine= new Node();\n nodeForLine.setName(LINE_STRING);\n //First, find the vector extending between the two points and define a look rotation\n //in terms of this Vector.\n final Vector3 difference = Vector3.subtract(point1, point2);\n final Vector3 directionFromTopToBottom = difference.normalized();\n final Quaternion rotationFromAToB =\n Quaternion.lookRotation(directionFromTopToBottom, Vector3.up());\n MaterialFactory.makeTransparentWithColor(getApplicationContext(), new Color(this.colorLine.x, this.colorLine.y, this.colorLine.z,this.alphaColor))\n .thenAccept(\n material -> {\n /* Then, create a rectangular prism, using ShapeFactory.makeCube() and use the difference vector\n to extend to the necessary length. */\n ModelRenderable model = ShapeFactory.makeCube(\n new Vector3(this.sizeLine, this.sizeLine, difference.length()),\n Vector3.zero(), material);\n /* Last, set the world rotation of the node to the rotation calculated earlier and set the world position to\n the midpoint between the given points . */\n\n nodeForLine.setParent(n);\n\n\n nodeForLine.setRenderable(model);\n nodeForLine.setWorldPosition(Vector3.add(point1, point2).scaled(.5f));\n nodeForLine.setWorldRotation(rotationFromAToB);\n }\n );\n\n }", "void showNewLine(String lineNumber, String directionId);", "List<Stopsinlinedb> fetchStopsInLines();", "private List<String> nextRecord() {\n\t\t\t\t\tList<String> record = new LinkedList<String>();\n\t\t\t\t\twhile (lines.hasNext()) {\n\t\t\t\t\t\tString line = lines.next();\n\t\t\t\t\t\tif (line.startsWith(\"---\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trecord.add(line);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn record;\n\t\t\t\t}", "private void crearLineasDelimitadoras(){\n Line2D.Float linea;\n int xp,yp,xl,yl;\n\n // Se crean las lineas verticales: tantas como columnas +1\n for(int i=0; i < columnas+1; i++){\n // Posicion de partida: xp valdra tanto como i*dimensionCasilla\n // yp valdra siempre 0\n // Posicion de llegada: xl vale igual que xp\n // yl valdra siempre numeroFilas*dimensionCasilla \n xp=i*dimensionCasilla;\n yp=0;\n xl=xp;\n yl=filas*dimensionCasilla;\n linea=new Line2D.Float(xp,yp,xl,yl);\n\n // Se agrega la linea al array de lineas\n lineasDelimitadoras.add(linea);\n }\n\n // Se crean las lineas horizontales: tantas como filas + 1\n for(int i=0; i < filas+1; i++){\n // Posicion de partida: xp valdra siempre 0\n // yp valdra i*dimensionCasilla\n // Posicion de llegada: xl valdra numeroFilas*dimensionCasilla\n // yl valdra igual que yp\n xp=0;\n yp=i*dimensionCasilla;\n xl=filas*dimensionCasilla;\n yl=yp;\n linea=new Line2D.Float(xp,yp,xl,yl);\n\n // Se agrega la linea al array de lineas\n lineasDelimitadoras.add(linea);\n }\n }", "public Shape[] getOutlines() throws Exception{\n\t\tShape[] outlines = new Shape[uniqueKeys];\n\t\t//tracks indices in outlines\n\t\tint keyCount = 0;\n\t\t\n\t\tScanner fileScan = new Scanner(mapFile);\n\n\t\t//initialize 1st outline\n\t\tString[] fileLine = fileScan.nextLine().split(\",\");\n\t\t//whole key, distinguishes index values for keys\n\t\tString key = fileLine[0 + level];\n\t\t//lumps keys with same starting substring\n\t\tString keyIndex = key.substring(0, 2);\n\t\tfloat fileLong = Float.parseFloat(fileLine[1 + level]);\n\t\tfloat fileLat = Float.parseFloat(fileLine[2 + level]);\n\t\toutlines[keyCount] = new Shape(key);\n\t\t//offset by minimum longitude and latitude\n\t\tfloat scaledX = xScale * (fileLong - minLongitude);\n\t\tfloat scaledY = height - (yScale * (fileLat - minLatitude));\n\t\toutlines[keyCount].addPoint(new Point(scaledX, scaledY));\n\t\t\n\t\t//rgb values\n\t\tint r = random.nextInt(256), g = random.nextInt(256), b = random.nextInt(256);\n\t\toutlines[keyCount].setColor(r, g, b);\n\t\t\n\t\twhile (fileScan.hasNext()) {\n\t\t\tfileLine = fileScan.nextLine().split(\",\");\n\t\t\tkey = fileLine[0 + level];\n\t\t\t\n\t\t\t//if new key, change array position in outlines\n\t\t\tif (!key.equals(outlines[keyCount].getName())) {\n\t\t\t\tkeyCount++;\n\t\t\t\toutlines[keyCount] = new Shape(key);\n\t\t\t\t//if different starting substring as well, generate new color\n\t\t\t\tif (!keyIndex.equals(key.substring(0, 2))) {\n\t\t\t\t\tr = random.nextInt(256); g = random.nextInt(256); b = random.nextInt(256);\n\t\t\t\t\tkeyIndex = key.substring(0, 2);\n\t\t\t\t}\n\t\t\t\toutlines[keyCount].setColor(r, g, b);\n\t\t\t}\n\t\t\t\n\t\t\tfileLong = Float.parseFloat(fileLine[1 + level]);\n\t\t\tfileLat = Float.parseFloat(fileLine[2 + level]);\n\t\t\tscaledX = xScale * (fileLong - minLongitude);\n\t\t\tscaledY = height - (yScale * (fileLat - minLatitude));\n\t\t\toutlines[keyCount].addPoint(new Point(scaledX, scaledY));\n\t\t}\n\t\tfileScan.close();\n\t\t\n\t\treturn outlines;\n\t}", "private void drawVerticalLines() {\r\n\t\tfor(int i=0;i<NDECADES;i++){\r\n\r\n\t\t\tdouble x1 = i* (getWidth()/NDECADES);\r\n\t\t\tdouble x2 = x1;\r\n\t\t\tdouble y1 = START_Y;\r\n\t\t\tdouble y2 = getHeight();\r\n\r\n\t\t\tdrawLine(x1,y1,x2,y2);\r\n\t\t}\r\n\t}", "public ArrayList<String> getLines() {\n\t\tif (cachedocs) {\n\t\t\tif (lines == null)\n\t\t\t\tlines = Config.DB.getLines(docid);\n\t\t\treturn lines;\n\t\t}\n\t\telse {\n\t\t\treturn Config.DB.getLines(docid);\n\t\t}\n\t}", "public ActionScriptBuilder lines(int count){\n\t\tfor(int i=0; i<count; i++)\n\t\t\tactionScriptLines.add(\"\");\n\t\treturn this;\n\t}", "public List<OrderLine> getOrderLineList() {\n\t\tHttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance()\n\t\t\t\t.getExternalContext().getRequest();\n\t\tHttpSession session = ((HttpServletRequest) request).getSession(false);\n\t\t\n\t\t//recuperation du login\n\t\tlogin = (session != null) ? (LoginMB) session.getAttribute(\"loginMB\") : null;\n\t\t//recuperation du user\n\t\tSystem.out.println(\"login user from session : \"+login.getUser().getIdPerson());\n\t\torderList = orderBu.getLastOrder(login.getUser().getIdPerson());\n\t\t\n\t\tSet<OrderLine> set = new HashSet<OrderLine>();\n\t\tset = orderList.get(orderList.size()-1).getOrderLines();\n\t\torderLineList = new ArrayList<OrderLine>(set);\n\t\tsetTotal(orderList.get(orderList.size()-1).getTotalAmount());\n\t\t\n\t\t\n\t\treturn orderLineList;\n\t}", "@Test\n\tpublic void findAllOrderLines() {\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllOrderLines \n\t\tInteger startResult = 0;\n\t\tInteger maxRows = 0;\n\t\tList<OrderLine> response = null;\n\t\tresponse = service.findAllOrderLines(startResult, maxRows);\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllOrderLines\n\t}", "public KochLine getLineC(){\n\t\tKochLine lineC= new KochLine(p3,p4);\n\t\treturn lineC;\n\t\t\n\t}", "public static List<List<String>> getLinesAsSentences(String text) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars;\n\t\tchars = text.toCharArray();\n\t\tList<List<String>> lines = new ArrayList<List<String>>();\n\t\tList<String> words = new ArrayList<String>();\n\t\twords.add(\"<s>\");\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == '\\n' || chars[i] == '\\r') {\n\t\t\t\tif (sb.length() > 0) {\n//\t\t\t\t\tSystem.out.println(\"Adding word: \"+sb.toString());\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tif (words.size() > 1) {\n//\t\t\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\t\t\twords.add(\"</s>\");\n\t\t\t\t\tlines.add(words);\n\t\t\t\t}\n\t\t\t\twords = new ArrayList<String>();\n\t\t\t\twords.add(\"<s>\");\n\t\t\t\tsb.setLength(0);\n\t\t\t} else if (chars[i] == ' ') {\n\t\t\t\tif (sb.length() > 0) {\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tsb.setLength(0);\n\t\t\t} else {\n\t\t\t\tsb.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sb.length() > 0) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\twords.add(sb.toString());\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\t\tif (words.size() > 1) {\n//\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\twords.add(\"</s>\");\n\t\t\tlines.add(words);\n\t\t}\n\t\tsb.setLength(0);\n\t\treturn lines;\n\t}", "public ArrayList<Line> getLines() {\n return currentLocation.getLines();\n }", "public Line getLine()\n {\n return line;\n }", "void getNextLine()\n\t\t\tthrows IOException, FileNotFoundException {\n String nextLine = \"\";\n if (reader == null) {\n nextLine = textLineReader.readLine();\n } else {\n nextLine = reader.readLine();\n }\n if (nextLine == null) {\n atEnd = true;\n line = new StringBuffer();\n } else {\n\t\t line = new StringBuffer (nextLine);\n }\n if (context.isTextile()) {\n textilize ();\n }\n\t\tlineLength = line.length();\n\t\tlineIndex = 0;\n\t}", "public String toString() {\n\t\treturn \"LINE:(\"+startPoint.getX()+\"-\"+startPoint.getY() + \")->(\" + endPoint.getX()+\"-\"+endPoint.getY()+\")->\"+getColor().toString();\n\t}", "@Override\n public PurchaseOrderLine getOrderLine(int index) {\n return orderLines.get(index);\n }", "private static String[] bodySquare(SquareLM squareLM){\n String[] bodyLines = new String[ROWS_BODY_SQUARE];\n if(squareLM == null){ //if it is empty\n for(int i=0; i < bodyLines.length; i++){\n bodyLines[i] = EMPTY_LINE_INSIDE_SQUARE;\n }\n }\n else{ //if it is not empty\n //first line: players on the square\n bodyLines[0] = playersToDrawOnSquare(squareLM);\n //second line: nothing (empty space)\n bodyLines[1] = EMPTY_LINE_INSIDE_SQUARE;\n //third and fourth lines:\n String [] otherInfoSquare;\n if(squareLM.getSquareType() == SquareType.AMMO_POINT){\n otherInfoSquare = specificInfoAmmoPointToDraw((AmmoPointLM) squareLM);\n bodyLines[2] = otherInfoSquare[0];\n bodyLines[3] = otherInfoSquare[1];\n }\n //SPAWN POINT\n if(squareLM.getSquareType() == SquareType.SPAWNING_POINT){\n otherInfoSquare = specificInfoSpawnPointToDraw((SpawnPointLM)squareLM);\n bodyLines[2] = otherInfoSquare[0];\n bodyLines[3] = otherInfoSquare[1];\n }\n }\n return bodyLines;\n }", "@Override\n public List<String> to_list_of_lines(String note, Integer debugLevel) {\n List<String> lst = super.to_list_of_lines(note, debugLevel);\n Glob.append_last_line(lst, String.format(\"activatioN\", _activation_));\n\n return lst;\n }", "public void PdfCreate() {\n\t\t\n\t\tDocument document = new Document();\n\t\ttry {\n\t\t\tPdfWriter.getInstance(document, new FileOutputStream(outputFileName));\n\t\t\tList<String> lineBlockAsString = new ArrayList<String>();\n\t\t\tint FORMAT = 0;\n\t\t\tint SIZE = 13;\n\t\t\tthis.lineblocksSIZE = 0;\n\t\t\tdocument.open();\n\t\t\t//Read all the Lineblocks and get the Format and Style from each one\n\n\t\t\tfor(LineBlock lineblock : lineBlocks) {\n\t\t\t\tPhrase phrase = new Phrase();\n\t\t\t\t\n\t\t\t\tFORMAT = 0;\n\t\t\t\tSIZE = 13;\n\t\t\t\t\n\t\t\t\tswitch (lineblock.getFormat()) {\n\t\t\t\t\n\t\t\t\t\tcase BOLD:\n\t\t\t\t\t\tFORMAT = Font.BOLD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ITALICS:\n\t\t\t\t\t\tFORMAT = Font.ITALIC;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tFORMAT = Font.NORMAL;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tswitch (lineblock.getStyle()) {\n\t\t\t\t\t\n\t\t\t\t\tcase OMITTED: \n\t\t\t\t\t\tFORMAT = Font.UNDEFINED;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase H1:\n\t\t\t\t\t\tSIZE = 16;\n\t\t\t\t\t\tFORMAT = Font.BOLD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase H2:\n\t\t\t\t\t\tSIZE = 16;\t\t\t\t\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}\n\n\t\t\t\tif(FORMAT == Font.UNDEFINED) //omit rule\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t//write inside the outputFileName.pdf based on the input Ruleset\n\t\t\t\tthis.lineblocksSIZE ++;\n\t\t\t\tFont font = new Font(FontFamily.TIMES_ROMAN, SIZE, FORMAT);\n\t\t\t\tlineBlockAsString = lineblock.getLines();\n\t\t\t\tfor(String line : lineBlockAsString) {\n\t\t\t\t\tChunk chunk = new Chunk(line, font);\t\t\t\t\n\t\t\t\t\tphrase.add(chunk);\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tParagraph p = new Paragraph();\n\t\t\t\tp.add(phrase);\n\t\t\t\tdocument.add(p);\n\t\t\t\tdocument.add(Chunk.NEWLINE);\n\t\t\t}\n\t\t} catch (FileNotFoundException | DocumentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tdocument.close();\n\t}", "public int getLine() {return _line;}", "StringBuffer generateVc(){\n\n StringBuffer r = new StringBuffer();\n\n for(int i = 0; i <= sons.size() - 1; i++)\n r.append(getChildAt(i).toDot());\n \n return r;\n }", "private String buildLine(int i){\n String line;\n int j;\n line = new String();\n\n for (j = i; j < i + 8; j++){\n line = line + Tools.pad(Integer.toHexString(memory[j]), 8, \n \"0\", Direction.RIGHT) + \" \";\n }\n return line;\n }", "public String Line() {\n return \"==================================================================================================================\";\n }", "private void writeTestLines() {\n for (String L : testLines) {\n pages.write(L);\n }\n }", "private String createNumberLine(){\n StringBuilder numberLine = new StringBuilder();\n for(int i = 0; i < this.columns; i++){\n numberLine.append(i + 1).append(\" \");\n }\n return numberLine.toString();\n }", "public ArrayList<LineItem> getLineItems(){\n\t\t\n\t\treturn lineItems;\n\t}", "private void generateRows() {\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\trows[i]=new Row(squares[i]);\n\t\t}\n\t}", "public Line copy() {\n return new Line(getWords());\n }", "public List<Integer> getLines(){\n\t\treturn lineNumber;\n\t}", "public int lines() {\n return list.size();\n }", "public KochLine getLineA(){\n\t\tKochLine lineA= new KochLine(p1,p2);\n\t\treturn lineA;\n\t\t\n\t}", "List<Integer> lineOffsets();", "private ArrayList<String> GetOrderContent() {\n ArrayList<String> order_content = new ArrayList<>();\n boolean added = false;\n for (String line : receipt_lines) {\n if (IsReceiptHeader(line) || IsReceiptFooter(line) || ColesReceiptItem.Is_So_On_Keyword(line) || ColesReceiptItem.Is_Empty(line))\n continue;\n if (ColesReceiptItem.Is_Total_Line(line)) break;\n if (ColesReceiptItem.Is_Order_Summary_Keyword(line))\n added = true;\n else if (added) order_content.add(line);\n }\n return order_content;\n }", "public void drawLines(float[] mvpMatrix)\n\t{\n GLES20.glUseProgram(chopperProgram);\n int error = GLES20.glGetError();\n if (error != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper drawLines: Use Program Error: \" + error);\n }\n\n // get handle to vertex shader's vPosition member\n mPositionHandle = GLES20.glGetAttribLocation(chopperProgram, \"vPosition\");\n if (mPositionHandle < 0)\n {\n System.out.println(\"StigChopper -- lines: Failed to get mPositionHandle\");\n }\n\n // get handle to shape's transformation matrix\n mMVPMatrixHandle = GLES20.glGetUniformLocation(chopperProgram, \"uMVPMatrix\");\n\n // Enable a handle to the cube vertices\n GLES20.glEnableVertexAttribArray(mPositionHandle);\n\n // Prepare the cube coordinate data\n GLES20.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false,\n\t\t\t\t\t\t\t\t\t vertexStride, lineVertexBuffer);\n\n // get handle to vertex shader's vColor member\n if (vertexColor)\n {\n mColorHandle = GLES20.glGetAttribLocation(chopperProgram, \"vColor\");\n if (mColorHandle < 0)\n {\n System.out.println(\"StigChopper: Failed to get vColor\");\n }\n GLES20.glEnableVertexAttribArray(mColorHandle);\n\n GLES20.glVertexAttribPointer(mColorHandle, COLORS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false, colorStride, triColBuffer);\n }\n else\n {\n mColorHandle = GLES20.glGetUniformLocation(chopperProgram, \"vColor\");\n\t\t\tGLES20.glUniform4f(mColorHandle,color[0] * 0.9f,color[1] * 0.9f,color[2] * 0.9f,color[3]);\n }\n\n // Pass the projection and view transformation to the shader\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);\n\n\t\tGLES20.glLineWidth(lineWidth);\n GLES20.glDrawElements(GLES20.GL_LINES, lineDrawListBuffer.capacity(),\n\t\t\t\t\t\t\t GLES20.GL_UNSIGNED_INT, lineDrawListBuffer);\n int drawError = GLES20.glGetError();\n if (drawError != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper: Line Draw Elements Error: \" + drawError + \", color: \" + vertexColor + \", text: \" + textures);\n }\n\n // Disable vertex array\n GLES20.glDisableVertexAttribArray(mPositionHandle);\n if (vertexColor)\n {\n GLES20.glDisableVertexAttribArray(mColorHandle);\n }\n\t}", "public static ArrayList<String> getYield(){\n int NumNegativeExpectations = 0;\n int index = 0;\n boolean endpoint = false;\n ArrayList<String> yieldInfo = new ArrayList();\n String StartNStop = \"\";\n while(index<Trendline.expectationsChange.size()){\n //System.out.println(\"EPISODE NUM IS:\"+(index+1)+\" and NumNegative is \"+NumNegativeExpectations+\" and my expecatation is: \"+Trendline.expectationsChange.get(index));\n if(Trendline.expectationsChange.get(index)<0){\n NumNegativeExpectations++;\n if(NumNegativeExpectations == Trendline.yieldAfterNumNegative){\n endpoint = true;\n StartNStop += index-Trendline.yieldAfterNumNegative+2+\"\\t\";\n }\n else if(NumNegativeExpectations == Trendline.avoidAfterNumNegative){\n StartNStop += Trendline.expectationsChange.size();\n yieldInfo.add(StartNStop);\n return yieldInfo;\n }\n }\n else{\n if(endpoint){\n StartNStop += (index);\n yieldInfo.add(StartNStop);\n StartNStop = \"\";\n endpoint = false;\n }\n NumNegativeExpectations = 0;\n }\n index++;\n }\n //System.out.println(yieldInfo);\n return yieldInfo;\n }", "public String[] getSubscribedLines() {// otan patas unsubscribe sto menu , print lista me ta lines pou eisai subscribed\n int length = subscribedLists.size();\n\n if (length == 0) {\n return null;\n } else {\n String[] array = new String[length];\n\n int i = 0;\n\n for (Map.Entry<Integer, String> pair : databaseLineIDToTitle.entrySet()) {\n if (subscribedLists.contains(pair.getKey())) {\n array[i++] = String.format(\"%03d - %s \\n \", pair.getKey(), pair.getValue());\n }\n }\n\n return array;\n }\n }" ]
[ "0.70732254", "0.6747281", "0.65842587", "0.6494471", "0.6312607", "0.621861", "0.615394", "0.6086641", "0.6068507", "0.6010119", "0.59999126", "0.5975974", "0.5953338", "0.5949502", "0.5915241", "0.59145427", "0.58987355", "0.58875847", "0.58860517", "0.5882012", "0.58410054", "0.5805471", "0.57544875", "0.5754408", "0.57181317", "0.571086", "0.56982815", "0.568082", "0.5677495", "0.56753224", "0.56720424", "0.56507134", "0.5621714", "0.56209886", "0.5613853", "0.56125945", "0.5607091", "0.5590613", "0.55893606", "0.55830353", "0.55688566", "0.5566365", "0.55623275", "0.55565524", "0.555169", "0.5529693", "0.55211717", "0.5517989", "0.54916155", "0.5465138", "0.54618645", "0.5461529", "0.54603666", "0.5456034", "0.54550517", "0.542396", "0.54219085", "0.54203", "0.5410168", "0.54001015", "0.5392099", "0.5386629", "0.53855896", "0.537694", "0.53744775", "0.5374358", "0.53733975", "0.53684163", "0.5363474", "0.5345186", "0.5343702", "0.53416646", "0.5339765", "0.53319806", "0.53199005", "0.5313066", "0.53046775", "0.53029907", "0.529628", "0.5293082", "0.5292142", "0.5291105", "0.52851325", "0.5279359", "0.52670234", "0.5265333", "0.525292", "0.5251748", "0.5242073", "0.5230262", "0.5229547", "0.52253133", "0.5216168", "0.52154577", "0.52108157", "0.5207623", "0.51957273", "0.5193369", "0.5193127", "0.5187773" ]
0.56421715
32
Determine whether this will print before image only
public boolean isBeforeImage() { return beforeImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Boolean isImage(PrintDocument printDocument) {\n String url = printDocument.getUrl();\n String filename = url.substring(url.lastIndexOf(\"/\") + 1);\n\n return filename.matches(\"^.*\\\\.(jpg|jpeg|png|gif)$\");\n }", "public void isImagePresent() {\r\n\t\t\t\r\n\t\t}", "boolean isImageDisplayed();", "boolean isAutomaticHeaderImageEnabled();", "@Override\n\tpublic boolean getPrint() {\n\t\treturn false;\n\t}", "public boolean isRatingShownBefore() { return false /* after */; }", "public boolean shouldImageProcess() {\r\n\t\treturn table.getBoolean(SHOULD_IMAGE_PROCESS_KEY, false);\r\n\t}", "@Override\n\tpublic boolean isMyImage() {\n\t\treturn false;\n\t}", "public boolean isRandomStartImage() {\n return randomStatImage;\n }", "public void setBeforeImage(boolean beforeImage)\n\t{\n\t\tthis.beforeImage = beforeImage;\n\t}", "public boolean isPrintHeader()\n\t{\n\t\treturn printHeader;\n\t}", "public boolean isEnabledPrint() {\n return enabledPrint;\n }", "public boolean generateImageFromText();", "public void printImage() {\n\t System.out.print(\"\\n\");\n for (int i=0; i<width*height; i++) {\n if (i % width==0) System.out.print(\"\\n\");\n System.out.print(image[i]+ \" \");\n }\n System.out.print(\"\\n\\n\");\n }", "private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }", "public abstract boolean isRendered();", "public boolean isPic(){\n return this.isPic;\n }", "public boolean visualizeLastGeneration ();", "public void displayImageToConsole();", "public boolean isSprinting ( ) {\n\t\treturn extract ( handle -> handle.isSprinting ( ) );\n\t}", "private Boolean isRaw(PrintDocument printDocument) {\n return printDocument.getRawContent() != null && !printDocument.getRawContent().isEmpty();\n }", "@Override\n public void printExistFigure() {\n if (!isRealFigure()) {\n System.out.println(\"Triangular prism is not exist\");\n } else {\n System.out.println(\"Triangular prism is exist\");\n }\n }", "private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}", "public boolean getToPrint() {\r\n return this.toPrint;\r\n }", "public void debugPrint() {\n System.out.println(\"### Image Handler ###\");\n System.out.println(\"Handling: \" + images.size());\n }", "private boolean enablePrint(boolean found)\n {\n if(found)\n {\n printJMenuItem.setEnabled(true);\n }\n else\n {\n printJMenuItem.setEnabled(false);\n }\n \n return found;\n }", "private boolean printing_status() {\n\t\treturn _status_line != null;\n\t}", "public static boolean usePrinting() {\n\t\treturn (isWindows() || isSolaris() || isMac());\n\t}", "@Override\n public void run() {\n\n if (PrinterInstance.mPrinter == null) {\n Toast.makeText(mContext, getString(R.string.not_support), Toast.LENGTH_LONG).show();\n } else {\n mPrinter.printImage(monoChromeBitmap, PAlign.NONE, 0, false);\n }\n }", "boolean isDisplay();", "boolean isDisplay();", "private boolean fireAutoFlashFrontScreen() {\n final int iso_threshold = 750;\n return capture_result_has_iso && capture_result_iso >= iso_threshold;\n }", "boolean hasImageByTransform();", "public boolean isHorizontalMode() throws PDFNetException {\n/* 627 */ return IsHorizontalMode(this.a);\n/* */ }", "public boolean canBuildPrinter() {\r\n return isPrinter(getFormatter());\r\n }", "public boolean hasImage() {\n\t\treturn false;\n\t}", "public boolean preparedAppearance() {\r\n return preparedAppearance;\r\n }", "void enableAutomaticHeaderImage();", "private boolean isCurrent(){\n return (getPageTitle().size() > 0);\n }", "@Override\n protected boolean isAppropriate() {\n return true; // always show\n }", "@Override\n public boolean isOpen(){\n boolean statement = isElementPresent(czDppButon); //TODO - zmena na pozdejsi stranku\n if(!statement){ DriverSettings.takeScreenshot(); }\n return statement;\n }", "public boolean isMakeImage() {\n return makeImage;\n }", "boolean hasPicture();", "public boolean isAttachmentPainting ()\r\n {\r\n return constants.attachmentPainting.getValue();\r\n }", "boolean getScreen() throws IOException,URISyntaxException ;", "private boolean no_output() {\n\t\treturn _outcaptures.size() > 0 || _outhides.size() > 0;\n\t}", "public native boolean isMonochromeImage() throws MagickException;", "public boolean captureImage(int[][] image_pos) {\r\n\t\tbuttonListener.displayMessage(\"Capturing image at \" + Arrays.toString(getPosition()) + \" now\", 1);\r\n\t\tSystem.out.println(\"Capturing Image\");\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(2);\r\n\t\t}\r\n\t\tcatch (Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tprotected boolean traceDisplayerContentApplicable() {\n\t\treturn true;\n\t}", "@Override\n public boolean isSetupToBeDrawn() {\n return !(designParameters == null || slabStrip == null || graphicsContext == null || colour == null || slabImageScale == 0);\n }", "protected boolean isRoll(PrintAttributes.MediaSize size){\n return size.getId().contains(\"roll_current\");\n }", "public boolean okToDisplay() {\n return this.mDisplayId == 0 ? !this.mWmService.mDisplayFrozen && this.mWmService.mDisplayEnabled && this.mWmService.mPolicy.isScreenOn() : this.mDisplayInfo.state == 2;\n }", "public boolean isMarkerImageLabelPresent() {\r\n\t\treturn isElementPresent(vehicleName.replace(\"Vehicle Name\", \"Marker Image\"), SHORTWAIT);\r\n\t}", "public void printScreen() {\n Graphics g;\n try {\n g = this.getGraphics();\n g.setColor(Color.red);\n if (dbImage != null) {\n g.drawImage(dbImage, 0, 0, null);\n String text = \"Score:\" + gameData.score.score;//text of displated score\n g.drawString(text, 50, 50);\n } else {\n System.out.println(\"printScreen:graphic is null\");\n }\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n } catch (Exception e) {\n System.out.println(\"Graphics error: \" + e);\n }\n }", "boolean isThumbnail();", "public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }", "public boolean VerifyProductDisplayed_OrderConfirmation() {\n\t\t\n\t\tboolean flag = false;\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.PRODUCTIMAGE).isDisplayed();\n\t\tif(flag){\n\t\t\textentLogs.pass(\"VerifyProductImageDisplayedInConfirmationPage\", \"Displayed\");\n\t\t}else{extentLogs.fail(\"VerifyProductImageDisplayedInConfirmationPage\", \"NotDisplayed\");\t\t}\n\treturn flag;\n\t\t}", "public void testStyleWhenCaretIsBeforeImage()\n {\n deferTest(new Command()\n {\n public void execute()\n {\n doTestStyleWhenCaretIsBeforeImage();\n }\n });\n }", "private void displayNoImage() {\n\t\tGRect imageRect = new GRect(LEFT_MARGIN, nameY + IMAGE_MARGIN,\n\t\t\t\tIMAGE_WIDTH, IMAGE_HEIGHT);\n\t\tadd(imageRect);\n\t\tGLabel noImage = new GLabel(\"No Image\");\n\t\tnoImage.setFont(PROFILE_IMAGE_FONT);\n\t\tdouble labelWidth = LEFT_MARGIN + IMAGE_WIDTH / 2 - noImage.getWidth()\n\t\t\t\t/ 2;\n\t\tdouble labelHeight = nameY + IMAGE_MARGIN + IMAGE_HEIGHT / 2;\n\t\tadd(noImage, labelWidth, labelHeight);\n\t}", "public void skipPrint()\n {\n skipPrint(0);\n }", "public void renderImage()\n {\n for (int i = 0; i < _imageWriter.getNx(); i++)\n {\n for (int j = 0; j < _imageWriter.getNy(); j++)\n {\n Ray ray;\n ray = new Ray(_scene.getCamera().constructRayThroughPixel(_imageWriter.getNx(), _imageWriter.getNy(),j,i,\n _scene.getScreenDistance(), _imageWriter.getWidth(),_imageWriter.getHeight()));\n\n if(i==255 && j==255)\n System.out.print(\"111\");\n Map<Geometry, List<Point3D>> intersectionPoints = new HashMap<>(getSceneRayIntersections(ray));\n\n if(intersectionPoints.isEmpty())\n _imageWriter.writePixel(j, i, _scene.getBackground());\n else\n {\n Map<Geometry, Point3D> closestPoint = getClosestPoint(intersectionPoints);\n Map.Entry<Geometry,Point3D> entry;\n Iterator<Entry<Geometry, Point3D>> it = closestPoint.entrySet().iterator();\n entry = it.next();\n _imageWriter.writePixel(j, i, calcColor(entry.getKey(), entry.getValue(), ray));\n }\n\n }\n }\n //printGrid(1);\n\n }", "private boolean visible() {\r\n return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();\r\n }", "public boolean loadCurrentImage()\n\t{\n\t\timgPlus = WindowManager.getCurrentImage();\n\t\tif ( imgPlus == null )\n\t\t{\n\t\t\tIJ.error( \"There must be an active, open window!\" );\n\t\t\treturn false;\n\t\t}\n\t\t// final int[] dims = imgPlus.getDimensions(); // width, height,\n\t\t// nChannels, nSlizes, nFrames\n\t\t// if ( dims[ 3 ] > 1 || dims[ 4 ] < 1 ) {\n\t\t// IJ.error(\n\t\t// \"The active, open window must contain an image with multiple frames, but no slizes!\"\n\t\t// );\n\t\t// return;\n\t\t// }\n\t\treturn true;\n\t}", "public void verifyPrintPageOpenedInNewWindow() {\n\t Assert.assertTrue(printPreviewApp.isDisplayed());\n\t}", "@Override\n public boolean isToBeRendered()\n {\n return true;\n }", "boolean hasFirstFrame();", "boolean hasCaptureProbabilities();", "public boolean isDisplayed() \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public static void lukisImej(BufferedImage image_dest) {\n int w = image_dest.getWidth();\n int h = image_dest.getHeight();\n\n//\t\tfor(int y=0; y<h;y++)\n//\t\t{\n//\t\t\tfor(int x =0 ; x<w; x++)\n//\t\t\t{\n//\t\t\t\tif(image_dest.getRGB(x, y)==-1)\n//\t\t\t\t\tSystem.out.print(\"1\");\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\t//System.err.print(\"X\"+x+\" Y : \"+y);\n//\t\t\t\t\t//return;\n//\t\t\t\t\tSystem.out.print(\"0\");\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tSystem.out.println(\"\");\n//\t\t}\n\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public boolean isDrawn();", "private boolean getNeedTitle()\r\n\t{\n\t\tif (new EditionSpeService().ficheProducteurNeedEngagement()==false)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Si on interdit d'afficher un des deux blocs : pas de titre\r\n\t\tif ((peMesContrats.canPrintContrat==ImpressionContrat.JAMAIS) || (peMesContrats.canPrintContratEngagement==ImpressionContrat.JAMAIS))\r\n\t\t{\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Sinon, il faut un titre\r\n\t\treturn true;\r\n\t}", "public boolean translateImageToText();", "@Override\n public boolean detect() {\n QQRobot.findWindowLocation(RGB_SCREEN);\n if (QQTetris.QQCoord.x != -1) {\n return true;\n } else {\n return false;\n }\n }", "private void printImage(PrintDocument printDocument) throws PrinterException, IOException {\n logger.debug(\"printImage::\" + printDocument);\n\n String filename = DocumentService.getFileFromUrl(printDocument.getUrl()).getPath();\n\n long timeStart = System.currentTimeMillis();\n\n DocPrintJob docPrintJob = getDocPrintJob(printDocument.getType());\n\n PrinterJob job = PrinterJob.getPrinterJob();\n job.setPrintService(docPrintJob.getPrintService());\n PageFormat pageFormat = getPageFormat(job);\n\n Image image = ImageIO.read(new File(filename));\n\n Book book = new Book();\n AnnotatedPrintable printable = new AnnotatedPrintable(new ImagePrintable(image));\n\n for (AnnotatedPrintable.AnnotatedPrintableAnnotation printDocumentExtra : printDocument.getExtras()) {\n printable.addAnnotation(printDocumentExtra);\n }\n\n book.append(printable, pageFormat);\n\n job.setPageable(book);\n job.setJobName(\"WebApp Hardware Bridge Image\");\n job.setCopies(printDocument.getQty());\n job.print();\n\n long timeFinish = System.currentTimeMillis();\n logger.info(\"Document \" + filename + \" printed in \" + (timeFinish - timeStart) + \"ms\");\n }", "public void doAutoDetect()\r\n {\r\n Graphics g = this.getGraphics(); \r\n // Create the off-screen drawing area\r\n offscreenImage = createImage(getWidth(), getHeight());\r\n offscreenGraphics = offscreenImage.getGraphics();\r\n long start;\r\n long end;\r\n\r\n // Tally the number of times we were able to draw direct and buffered\r\n int directCount = 0;\r\n int bufferedCount = 0;\r\n\r\n g.setColor(getBackground());\r\n // Mark what time we started\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns directly to the screen, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(g);\r\n end = System.currentTimeMillis();\r\n directCount++;\r\n }\r\n g.setColor(getForeground());\r\n\r\n // record the total time spent drawing directly\r\n long directTime = end - start;\r\n\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns to the offscreen graphics, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(offscreenGraphics);\r\n end = System.currentTimeMillis();\r\n bufferedCount++;\r\n }\r\n\r\n long bufferedTime = end - start;\r\n\r\n // If we were able to draw more times using the buffered graphics,\r\n // or if the drawing counts are the same, but the total time for\r\n // the buffering was less, buffering is faster.\r\n if ((bufferedCount > directCount) ||\r\n ((bufferedCount == directCount) &&\r\n (bufferedTime < directTime))) {\r\n drawDirect = false;\r\n } else {\r\n // If we want to draw direct, free the space taken up by the\r\n // offscreen image and graphics context.\r\n offscreenImage.flush();\r\n offscreenImage = null;\r\n offscreenGraphics = null;\r\n drawDirect = true;\r\n }\r\n }", "@MediumTest\n public void test_1314_3() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/if_without_false.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "public boolean hasOrderButtons() {\n return orderButtonImageCount == 4;\n }", "private boolean isScreenFull(){\n for(int i = 0; i < mPixelX.length; i++){\n if(i % 10 == 0 && mPixelX[i] == 0){\n return false;\n }\n }\n for(int i = 0; i < mPixelY.length; i++){\n if(i % 10 == 0 && mPixelY[i] == 0){\n return false;\n }\n }\n return true;\n }", "void energyImageDisplay(BufferedImage imgToEnergize, String label,\n boolean doWePrintSeam, ImageView myImage, Label seamPrintingLabel,\n Label energyPrintingLabel) {\n seamPrintingLabel.setTextFill(javafx.scene.paint.Color.BLACK);\n if (this.tempImg.equals(\"Energy computation\")\n || this.tempImg.equals(\"Show next seam\")) {\n seamPrintingLabel\n .setTextFill(javafx.scene.paint.Color.PALEVIOLETRED);\n myImage.setImage(SwingFXUtils.toFXImage(imgToEnergize, null));\n this.tempImg = \"null\";\n } else {\n if (imgToEnergize != null)\n energyPrintingLabel.setTextFill(javafx.scene.paint.Color.GREEN);\n assert imgToEnergize != null;\n BufferedImage bImageEnergized = SeamCarver\n .energizedImage(imgToEnergize);\n if (doWePrintSeam) {\n int totalRedRgb = 255 << 16;\n int[] seamToPrint = SeamCarver.bestSeam(bImageEnergized,\n this.getDirection());\n if (this.getDirection().equals(\"H\")) {\n for (int y = 0; y < seamToPrint.length; y++)\n bImageEnergized.setRGB(seamToPrint[y], y, totalRedRgb);\n } else {\n for (int x = 0; x < seamToPrint.length; x++)\n bImageEnergized.setRGB(x, seamToPrint[x], totalRedRgb);\n }\n }\n myImage.setImage(SwingFXUtils.toFXImage(bImageEnergized, null));\n this.tempImg = label;\n }\n }", "public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }", "@Override\n public boolean shouldPaint() {\n return false;\n }", "public boolean isPrintHiddenFields()\n\t{\n\t\treturn printHiddenFields;\n\t}", "@MediumTest\n public void test_1314_4() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/if_without_true.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "public void beforeDraw()\n {\n INDirector.setProjection(ProjectionFormat.DirectorProjection2D);\n this.grabber.beforeRender();\n }", "@Override\n\tpublic void printBefore() {\n\t\tSystem.out.println(\"############################\");\n\t\tSystem.out.println(\"# App de Chat #\");\n\t\tSystem.out.println(\"############################\");\n\t\tSystem.out.println(\"\");\n\t}", "public static boolean getIsDrawing() {\n\t\treturn isDrawing;\n\t}", "public void logScreen(String imageName) {\n this.logScreen(imageName, imageName, thumbHeight, thumbWidth);\n }", "@Override\r\n protected boolean isFinished() {\r\n return RobotMap.colorEncoder.getPosition() >= 27;\r\n }", "interface PrintInterface{\n void display();\n boolean isDisplayed();\n\n}", "public boolean printUsedBy() {\n return !matchMajorVersionOnly;\n }", "public void setToPrint(Boolean toPrint) {\r\n this.toPrint = toPrint;\r\n }", "public boolean isActiveImageOn() {\n\t\tif (isActiveImageOn == true) return true;\n\t\treturn false;\n\t}", "public void setPrintHeader(boolean printHeader)\n\t{\n\t\tthis.printHeader = printHeader;\n\t}", "public boolean isShowfps() {\r\n\t\treturn showfps;\r\n\t}", "public boolean isRender()\r\n/* 284: */ {\r\n/* 285:307 */ if (this.tipoReporte.ordinal() == 1) {\r\n/* 286:308 */ this.render = true;\r\n/* 287: */ } else {\r\n/* 288:310 */ this.render = false;\r\n/* 289: */ }\r\n/* 290:311 */ return this.render;\r\n/* 291: */ }", "public boolean isSprinting(){\n return this.sprint;\n }", "boolean isCrouching();", "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 }", "public boolean getStrokeOnTop() { return false; }" ]
[ "0.60679454", "0.59789157", "0.5955035", "0.5885646", "0.583217", "0.5831438", "0.58191", "0.57374054", "0.5665099", "0.5642573", "0.56168705", "0.5560852", "0.5544443", "0.55335784", "0.55095714", "0.54964095", "0.5483965", "0.5467258", "0.5459204", "0.54472405", "0.5409327", "0.5400098", "0.5368548", "0.5366866", "0.536681", "0.5362505", "0.53443635", "0.5339306", "0.5338455", "0.53377354", "0.53377354", "0.5306029", "0.5301342", "0.5294355", "0.5289203", "0.5283674", "0.52573234", "0.52542937", "0.5250482", "0.5249595", "0.5233947", "0.52315104", "0.5224197", "0.52218026", "0.5221757", "0.5205788", "0.51867306", "0.5175001", "0.5161099", "0.5140872", "0.51325387", "0.511846", "0.51072246", "0.5101428", "0.51004136", "0.50981194", "0.50897264", "0.50607926", "0.5053661", "0.5044837", "0.5042823", "0.504256", "0.5040632", "0.5038023", "0.5031779", "0.50231713", "0.50098723", "0.5009663", "0.5004223", "0.49995282", "0.49994716", "0.4997675", "0.4994717", "0.49946997", "0.49870467", "0.49812493", "0.4975795", "0.49656337", "0.49640942", "0.49618334", "0.49581948", "0.49567664", "0.4952428", "0.49522725", "0.49284294", "0.49281493", "0.4926353", "0.49200827", "0.4914661", "0.49075654", "0.49067876", "0.49054104", "0.49033606", "0.49023145", "0.49020708", "0.49009532", "0.49002674", "0.48965552", "0.48929715", "0.48902407" ]
0.64470357
0
Set whether to print before image only
public void setBeforeImage(boolean beforeImage) { this.beforeImage = beforeImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setToPrint(Boolean toPrint) {\r\n this.toPrint = toPrint;\r\n }", "public Render setDebugPrint() {\r\n\t\t_print = true;\r\n\t\treturn this;\r\n\t}", "public void setPrintHeader(boolean printHeader)\n\t{\n\t\tthis.printHeader = printHeader;\n\t}", "public void changePrintingAll()\n {\n printingAll = !printingAll;\n }", "@Override\n\tpublic boolean getPrint() {\n\t\treturn false;\n\t}", "public boolean isBeforeImage()\n\t{\n\t\treturn beforeImage;\n\t}", "void enableAutomaticHeaderImage();", "private boolean enablePrint(boolean found)\n {\n if(found)\n {\n printJMenuItem.setEnabled(true);\n }\n else\n {\n printJMenuItem.setEnabled(false);\n }\n \n return found;\n }", "void disableAutomaticHeaderImage();", "public void setPrimaryPrintIndicator(java.lang.String param){\n localPrimaryPrintIndicatorTracker = true;\n \n this.localPrimaryPrintIndicator=param;\n \n\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "public boolean isRatingShownBefore() { return false /* after */; }", "public void printImage() {\n\t System.out.print(\"\\n\");\n for (int i=0; i<width*height; i++) {\n if (i % width==0) System.out.print(\"\\n\");\n System.out.print(image[i]+ \" \");\n }\n System.out.print(\"\\n\\n\");\n }", "private void setPrintFullTree(final boolean printTree)\r\n {\r\n this.printFullTree = printTree;\r\n }", "public void setPreparedAppearance(boolean prepared) {\r\n this.preparedAppearance = prepared;\r\n }", "public void beforeDraw()\n {\n INDirector.setProjection(ProjectionFormat.DirectorProjection2D);\n this.grabber.beforeRender();\n }", "public boolean getToPrint() {\r\n return this.toPrint;\r\n }", "public boolean isEnabledPrint() {\n return enabledPrint;\n }", "public void setMakeImage(boolean value) {\n this.makeImage = value;\n }", "@ImageOptions(flipRtl = true)\r\n\t\tImageResource simplePagerFastForwardDisabled();", "public void updatePrintFigures() {\n\n\t}", "@ImageOptions(flipRtl = true)\r\n\t\tImageResource simplePagerFirstPageDisabled();", "@Override\n public void run() {\n\n if (PrinterInstance.mPrinter == null) {\n Toast.makeText(mContext, getString(R.string.not_support), Toast.LENGTH_LONG).show();\n } else {\n mPrinter.printImage(monoChromeBitmap, PAlign.NONE, 0, false);\n }\n }", "public void displayImageToConsole();", "public void debugPrint() {\n System.out.println(\"### Image Handler ###\");\n System.out.println(\"Handling: \" + images.size());\n }", "boolean isAutomaticHeaderImageEnabled();", "@Override\n\tpublic void printBefore() {\n\t\tSystem.out.println(\"############################\");\n\t\tSystem.out.println(\"# App de Chat #\");\n\t\tSystem.out.println(\"############################\");\n\t\tSystem.out.println(\"\");\n\t}", "private void printImage(PrintDocument printDocument) throws PrinterException, IOException {\n logger.debug(\"printImage::\" + printDocument);\n\n String filename = DocumentService.getFileFromUrl(printDocument.getUrl()).getPath();\n\n long timeStart = System.currentTimeMillis();\n\n DocPrintJob docPrintJob = getDocPrintJob(printDocument.getType());\n\n PrinterJob job = PrinterJob.getPrinterJob();\n job.setPrintService(docPrintJob.getPrintService());\n PageFormat pageFormat = getPageFormat(job);\n\n Image image = ImageIO.read(new File(filename));\n\n Book book = new Book();\n AnnotatedPrintable printable = new AnnotatedPrintable(new ImagePrintable(image));\n\n for (AnnotatedPrintable.AnnotatedPrintableAnnotation printDocumentExtra : printDocument.getExtras()) {\n printable.addAnnotation(printDocumentExtra);\n }\n\n book.append(printable, pageFormat);\n\n job.setPageable(book);\n job.setJobName(\"WebApp Hardware Bridge Image\");\n job.setCopies(printDocument.getQty());\n job.print();\n\n long timeFinish = System.currentTimeMillis();\n logger.info(\"Document \" + filename + \" printed in \" + (timeFinish - timeStart) + \"ms\");\n }", "public void setDisplayed(boolean show);", "public void figure() {\n this.isMap = false;\n System.out.println(\"Switch to figure mode\");\n }", "@Override\n\tpublic boolean isMyImage() {\n\t\treturn false;\n\t}", "public void setSecondaryPrintIndicator(java.lang.String param){\n localSecondaryPrintIndicatorTracker = true;\n \n this.localSecondaryPrintIndicator=param;\n \n\n }", "public void setPrintHiddenFields(boolean printHiddenFields)\n\t{\n\t\tthis.printHiddenFields = printHiddenFields;\n\t}", "public void setSprinting ( boolean sprinting ) {\n\t\texecute ( handle -> handle.setSprinting ( sprinting ) );\n\t}", "void isPrintable(boolean b) {\n\t\tm.isPrintable=b;\n\t}", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "private void init() {\n File file1 = new File(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n if (file1.exists()) file1.delete();\n PrintView<JianyiChuliTongzhidanListBean.DataListBean> printView1 = new PrintView<>(this,entity);\n String path1 = FileUtil.getInstance().save2Local(printView1.getcacheBitmap(), file1.getAbsolutePath());\n if (((User) SPUtils.getInstance().getObjectData(Constance.USER_OBJECT)).getZt() == 1) {\n saveAndStartPrintShare(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n return;\n }\n phandler.sendEmptyMessage(104);\n while (true){\n BorisPrint bPrint = new BorisPrint(MyApplication.getContext(), null,phandler);\n int code = bPrint.print(path1, 2);\n if (code==0){\n break;\n }\n }\n }", "protected void setPic() {\n }", "public boolean isPrintHeader()\n\t{\n\t\treturn printHeader;\n\t}", "public void testStyleWhenCaretIsBeforeImage()\n {\n deferTest(new Command()\n {\n public void execute()\n {\n doTestStyleWhenCaretIsBeforeImage();\n }\n });\n }", "@Override\n protected boolean isAppropriate() {\n return true; // always show\n }", "public void printScreen() {\n\t\tBrowser.printScreen(this.getClass().getSimpleName());\n\t}", "public void pre() {\r\n if(!isTiling) return;\r\n if(firstFrame) firstFrame=false;\r\n else if(secondFrame) {\r\n secondFrame=false;\r\n tileInc();\r\n }\r\n setupCamera();\r\n }", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "void energyImageDisplay(BufferedImage imgToEnergize, String label,\n boolean doWePrintSeam, ImageView myImage, Label seamPrintingLabel,\n Label energyPrintingLabel) {\n seamPrintingLabel.setTextFill(javafx.scene.paint.Color.BLACK);\n if (this.tempImg.equals(\"Energy computation\")\n || this.tempImg.equals(\"Show next seam\")) {\n seamPrintingLabel\n .setTextFill(javafx.scene.paint.Color.PALEVIOLETRED);\n myImage.setImage(SwingFXUtils.toFXImage(imgToEnergize, null));\n this.tempImg = \"null\";\n } else {\n if (imgToEnergize != null)\n energyPrintingLabel.setTextFill(javafx.scene.paint.Color.GREEN);\n assert imgToEnergize != null;\n BufferedImage bImageEnergized = SeamCarver\n .energizedImage(imgToEnergize);\n if (doWePrintSeam) {\n int totalRedRgb = 255 << 16;\n int[] seamToPrint = SeamCarver.bestSeam(bImageEnergized,\n this.getDirection());\n if (this.getDirection().equals(\"H\")) {\n for (int y = 0; y < seamToPrint.length; y++)\n bImageEnergized.setRGB(seamToPrint[y], y, totalRedRgb);\n } else {\n for (int x = 0; x < seamToPrint.length; x++)\n bImageEnergized.setRGB(x, seamToPrint[x], totalRedRgb);\n }\n }\n myImage.setImage(SwingFXUtils.toFXImage(bImageEnergized, null));\n this.tempImg = label;\n }\n }", "public void setRandomStartImage(final boolean randomStartImage) {\n this.randomStatImage = randomStartImage;\n }", "@Override\r\npublic void setOnScreen(boolean os) {\n}", "private Boolean isImage(PrintDocument printDocument) {\n String url = printDocument.getUrl();\n String filename = url.substring(url.lastIndexOf(\"/\") + 1);\n\n return filename.matches(\"^.*\\\\.(jpg|jpeg|png|gif)$\");\n }", "public void prepare() {\r\n\t\tsuper.prepare();\r\n\t\tSystem.out.println(\" - Gather the grains\");\r\n\t\tSystem.out.println(\" - Shape into circles\");\r\n\t\tSystem.out.println(\" - Randomly color circles\");\r\n\t\tSystem.out.println(\" - Let circles dry\");\r\n\t}", "protected boolean setSkipToPage(int num) {\n\t\tif (mControlView != null) {\n\t\t\tString result = \"\";\n\t\t\tint currentPos = num;\n\t\t\tint count = getTotalPage();\n\t\t\tif (currentPos > 0 && count > 0 && num <= count) {\n\t\t\t\tresult = currentPos + \"/\" + count;\n\t\t\t\tmControlView.setPhotoTimeType(result);\n\t\t\t\treturn true;\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public void setPrint(String yorn) {\n print = yorn.trim().equals(\"y\");\n }", "public void setImageVisible(boolean aFlag) {\n this.pictureBox.setVisible(aFlag);\n }", "public void logScreen(String imageName) {\n this.logScreen(imageName, imageName, thumbHeight, thumbWidth);\n }", "@ImageOptions(flipRtl = true)\r\n\t\tImageResource simplePagerPreviousPageDisabled();", "public void setShowThumbNail(boolean value) {\n getChart().setShowThumb(value);\n }", "public static void traceOn() {\r\n\t\ttraceOn = true;\r\n\t}", "@Override\n public void setToBeRendered(boolean arg0)\n {\n \n }", "public boolean preparedAppearance() {\r\n return preparedAppearance;\r\n }", "public static void preCrawling() {\n\t\ttry {\n\t\t\tHelper.directoryCheck(getOutputFolder());\n\t\t\toutput = new PrintStream(getOutputFolder() + getFilename());\n\n\t\t\t// Add opening bracket around whole trace\n\t\t\tPrintStream oldOut = System.out;\n\t\t\tSystem.setOut(output);\n\t\t\tSystem.out.println(\"{\");\n\t\t\tSystem.setOut(oldOut);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void changeToPhotoBurstView(Boolean bl) {\n this.changeLayoutTo(DefaultLayoutPattern.BURST_SHOOTING);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n super.setSceneNotificationIndicatorsInvisible(false);\n if (bl == false) return;\n this.startCaptureFeedbackAnimation();\n }", "@Override\n public boolean shouldPaint() {\n return false;\n }", "public void printThisFrame(int xoff, int yoff, boolean makeBorder) {\r\n\r\n java.util.Properties printprefs = new java.util.Properties();\r\n Toolkit toolkit = this.getToolkit();\r\n PrintJob job = toolkit.getPrintJob(this,\"Java Print\",printprefs);\r\n if (job == null) {return;}\r\n Graphics g = job.getGraphics();\r\n g.translate(xoff,yoff); // Offset from upper left corner\r\n Dimension size = this.getSize();\r\n if (makeBorder) { // Rectangular border\r\n g.drawRect(-1,-1,size.width+2,size.height+2);\r\n }\r\n g.setClip(0,0,size.width,size.height);\r\n this.printAll(g);\r\n g.dispose();\r\n job.end();\r\n }", "public void setPreview(boolean preview) {\r\n this.preview = preview;\r\n }", "public void preShow() {\n this.mIterationShowCounter++;\n this.mSessionShowCounter++;\n if (isCappedPerSession()) {\n setMediationState(MEDIATION_STATE.CAPPED_PER_SESSION);\n } else if (isExhausted()) {\n setMediationState(MEDIATION_STATE.EXHAUSTED);\n }\n }", "public boolean isPic(){\n return this.isPic;\n }", "static void visible() {\n int x, y;\n int[][] res = deepClone( pgmInf.img );\n\n System.out.print(\"Enter reference point: \");\n y = scan.nextInt();\n x = scan.nextInt();\n scan.nextLine(); // flush\n \n System.out.printf(\"Marking all pixels visible from %d,%d as white.\\n\", x, y);\n // mark visible points\n for (int i=0 ; i < pgmInf.width ; i++) {\n for (int j=0 ; j < pgmInf.height ; j++) {\n if ( lineBetween(x, y, i, j) ) res[j][i] = 9;\n }\n }\n pgmInf.img = res;\n System.out.println(\"Done.\");\n }", "private void updateUseFakePrecaptureMode(String flash_value) {\n if (MyDebug.LOG)\n Log.d(TAG, \"useFakePrecaptureMode: \" + flash_value);\n boolean frontscreen_flash = flash_value.equals(\"flash_frontscreen_auto\") || flash_value.equals(\"flash_frontscreen_on\");\n if (frontscreen_flash) {\n use_fake_precapture_mode = true;\n } else if (burst_type != BurstType.BURSTTYPE_NONE)\n use_fake_precapture_mode = true;\n else {\n use_fake_precapture_mode = use_fake_precapture;\n }\n if (MyDebug.LOG)\n Log.d(TAG, \"use_fake_precapture_mode set to: \" + use_fake_precapture_mode);\n }", "public void setCaptureOutput(boolean captureOutput)\r\n\t{\r\n\t\tthis.captureOutput = captureOutput;\r\n\t}", "private void changeToPhotoIdleView(boolean bl) {\n this.changeLayoutTo(DefaultLayoutPattern.PREVIEW);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n super.changeScreenButtonImage(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY, false);\n if (bl) {\n this.mFocusRectangles.clearExceptTouchFocus();\n } else {\n this.mFocusRectangles.onUiComponentRemoved();\n }\n this.mFocusRectangles.onRecordingStop();\n if (this.mCameraDevice.getCameraId() == 0) {\n super.setSceneIndicatorVisibleAllNotificationIndicators(1);\n }\n this.getBaseLayout().showLeftIconContainer();\n this.setOrientation(this.getOrientation());\n }", "int wkhtmltoimage_init(int use_graphics);", "void debug() {\n this.renderer.debug = !this.renderer.debug;\n reload();\n }", "public boolean visualizeLastGeneration ();", "public void setShowFilename(boolean showFilename) {\n\t\tthis.showFilename = showFilename;\n\t}", "public void isImagePresent() {\r\n\t\t\t\r\n\t\t}", "public void printOptions() {\n\t\t\n\t}", "public void setMonochrome(boolean monochrome) {\n this.monochrome = monochrome;\n }", "public void setDebug(boolean isDebug)\n {\n this.isDebug = isDebug;\n this.repaint();\n }", "public static void setTrace(boolean traceOn) {\r\n\t\ttrace = traceOn;\r\n\t}", "public void startPrinting()\n {\n printerSimulator.startPrintingProcess();\n }", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "private static void displayLog() {\n if (!consoleDisplayed) {\n splitter.setDividerLocation(defaultSliderPosition);\n consoleDisplayed=true;\n }\n }", "public void setStartingImages() {\n\t\t\n\t}", "public static void normalDebug(){\n enableVerbos = false;\n }", "void setThumbnail(boolean thumbnail);", "public void printBackground() {\n\t\tthis.gc.setFill(Color.BLACK);\n\t\tthis.gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\t}", "public boolean isRandomStartImage() {\n return randomStatImage;\n }", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void printScreen() {\n Graphics g;\n try {\n g = this.getGraphics();\n g.setColor(Color.red);\n if (dbImage != null) {\n g.drawImage(dbImage, 0, 0, null);\n String text = \"Score:\" + gameData.score.score;//text of displated score\n g.drawString(text, 50, 50);\n } else {\n System.out.println(\"printScreen:graphic is null\");\n }\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n } catch (Exception e) {\n System.out.println(\"Graphics error: \" + e);\n }\n }", "@attribute(value = \"\", required = false)\r\n\tpublic void setPrintCreateTable(Boolean printCreateTable) {\r\n\t\tthis.printCreateTable = printCreateTable;\r\n\t}", "public void renderedInicio() {\r\n sessionProyecto.setRenderedInicio(Boolean.FALSE);\r\n if (sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n sessionProyecto.setRenderedInicio(Boolean.TRUE);\r\n }\r\n }", "public boolean isMakeImage() {\n return makeImage;\n }", "@Override\n public void onCameraPreviewStarted() {\n enableTorchButtonIfPossible();\n }", "private static void print(int[][] image) {\n for(int i = 0; i < image.length; i++) {\n for(int j = 0; j < image[0].length; j++) {\n System.out.print(image[i][j] + \" \");\n }\n System.out.println(\"\\n\");\n }\n }", "public void onStartPage(PdfWriter writer, Document document) {\r\n\t\tpagenumber++;\r\n\r\n\t\tImage image;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-hrader.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, document.getPageSize().getHeight() + document.topMargin() - image.getHeight());\r\n\t\t\tdocument.add(image);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void displayNoImage() {\n\t\tGRect imageRect = new GRect(LEFT_MARGIN, nameY + IMAGE_MARGIN,\n\t\t\t\tIMAGE_WIDTH, IMAGE_HEIGHT);\n\t\tadd(imageRect);\n\t\tGLabel noImage = new GLabel(\"No Image\");\n\t\tnoImage.setFont(PROFILE_IMAGE_FONT);\n\t\tdouble labelWidth = LEFT_MARGIN + IMAGE_WIDTH / 2 - noImage.getWidth()\n\t\t\t\t/ 2;\n\t\tdouble labelHeight = nameY + IMAGE_MARGIN + IMAGE_HEIGHT / 2;\n\t\tadd(noImage, labelWidth, labelHeight);\n\t}", "public void setIsPrettyPrinted(boolean isPrettyPrinted) {\r\n this.isPrettyPrinted = isPrettyPrinted;\r\n }", "@Override\n\tpublic void setPaint() {\n\t\tisPaint = true;\n\t}", "boolean isImageDisplayed();", "public void showDraw(){\n\t\tdraw = new Document( drawFilePath);\n\t}", "@Override\n protected void afterDraw(UI ui, PGraphics pg) {\n noLights();\n hint(DISABLE_DEPTH_TEST);\n }" ]
[ "0.6063374", "0.59929985", "0.58147323", "0.5810589", "0.5804026", "0.57589155", "0.57405984", "0.55789626", "0.5507803", "0.5468928", "0.5462368", "0.5420458", "0.5413157", "0.5400343", "0.53859365", "0.5366049", "0.53615975", "0.5269178", "0.5231634", "0.5223072", "0.52099884", "0.51941264", "0.51886535", "0.51832736", "0.5172726", "0.5158511", "0.51502424", "0.5119124", "0.51159334", "0.5106621", "0.51054484", "0.5059341", "0.5056766", "0.5056176", "0.50490147", "0.50351256", "0.502964", "0.5025579", "0.5012671", "0.5003415", "0.4996527", "0.49861118", "0.49786085", "0.49768743", "0.4973452", "0.49660236", "0.4963797", "0.49637854", "0.49619836", "0.496134", "0.49547225", "0.49514082", "0.49509767", "0.49306253", "0.49248117", "0.49129814", "0.49075443", "0.49069548", "0.4902695", "0.49016115", "0.48982707", "0.48909363", "0.4880393", "0.4878746", "0.48771605", "0.48658586", "0.48596936", "0.48535833", "0.4852712", "0.48524147", "0.48477706", "0.48471648", "0.48401752", "0.48332292", "0.48295203", "0.48282433", "0.48168528", "0.4813178", "0.48122147", "0.4808409", "0.48078015", "0.48077708", "0.4803576", "0.4803511", "0.48019585", "0.4798898", "0.47976005", "0.47862527", "0.47794497", "0.4778544", "0.47763318", "0.47761554", "0.47592908", "0.47587103", "0.4750316", "0.47492775", "0.47480536", "0.47455332", "0.47446418", "0.474135" ]
0.642237
0
Determine whether to print blank lines
public boolean isPrintBlankLine() { return printBlankLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrintBlankLine(boolean printBlankLine)\n\t{\n\t\tthis.printBlankLine = printBlankLine;\n\t}", "private boolean isBlank() {\n\t\tchar currentChar = data[index];\n\t\tif (currentChar == '\\r' || currentChar == '\\n' || currentChar == '\\t' || currentChar == ' ') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean getHideEmptyLines() {\n return hideEmptyLines;\n }", "public boolean isEmpty() {\n\n \tif (numLines == 0) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\t\n }", "public static void printBlankLine () {\n\t\t\n\t\t// First part before the +\n\t\tSystem.out.print(\"\\n\\u2012\\u2012\\u2012\\u2012\");\n\t\tSystem.out.print(\"+\");\n\t\t// Loops through and prints the rest\n\t\tfor (int i = 0; i < 89; i++) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\u2012\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "public boolean inVerticalBlank();", "private void skipBlankSpaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tchar c = data[currentIndex];\n\t\t\tif(c == ' ' || c == '\\t' || c =='\\n' || c == '\\r') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void nonEmptyMultiLine() {\n\t\tString s = \" \\n\" + \"Nothing\";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "private void skipEmptyLines() throws IOException {\n for (;;) {\n if (nextChar != ';') {\n do {\n readNextChar();\n } while (isWhitespace(nextChar));\n if (nextChar != ';') return;\n }\n do {\n readNextChar();\n if (nextChar == -1) return;\n } while (nextChar != '\\n');\n }\n }", "public boolean noNl()\n \t{\n \t\treturn !isAfterNL();\n \t}", "public void addEmptyLine() {\n addLine(\"\");\n }", "public boolean isEmpty() {\n return top == ' ';\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "public boolean isEmpty() {\n return cursor==-1 && lines.isEmpty();\n }", "private void skipBlankSpaces() {\n while (currentIndex < this.data.length) {\n if (!Character.isWhitespace(data[currentIndex])) {\n break;\n }\n currentIndex++;\n }\n }", "protected boolean checkEmpty(String line) {\n return line == null || line.isBlank();\n }", "public boolean hasLine(){\r\n\t\tif (getLine().equals(\"\"))\r\n\t\t\treturn false;\r\n\t\telse return true;\r\n\t}", "public boolean skipWhitespace()\r\n {\r\n String str = feed.findWithinHorizon( WHITESPACE_PATTERN, 0 );\r\n \r\n if( str == null )\r\n return false;\r\n else\r\n return true;\r\n }", "@Test\n\tpublic void testEmptyLine() {\n\t\tString s = \" \\n\";\n\t\tassertTrue(\"Empty string with line ending\", StringUtil.isEmpty(s));\n\t}", "private boolean skipNewline() {\n\t\tif (nextChar == '\\n') {\n\n\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\tif (nextChar == '\\r') {\n\t\t\tlineNumber++;\n\t\t\tcolumnNumber = 1;\n\t\t\tnextChar = getChar();\n\n\t\t\t// skip over next char if '\\n'\n\t\t\tif (nextChar == '\\n')\n\t\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\t// newline char not found\n\t\treturn false;\n\t}", "public boolean noSeparator(){\n return separator == EMPTY_CHAR;\n }", "private boolean printing_status() {\n\t\treturn _status_line != null;\n\t}", "public boolean isEmpty(String line){\n char[] lineChars = line.toCharArray();\n if(lineChars.length == 0){return true;}\n\n boolean lineIsEmpty = true;\n for (char c : lineChars){\n if (!Character.isWhitespace(c)){\n return false;\n }\n }\n return lineIsEmpty;\n }", "@Override\n public void println ()\n {\n if (text != null)\n {\n text.append (Out.NL);\n col = 0;\n }\n else\n super.println ();\n }", "public boolean getNeedLineBreak() {\n\t\treturn true;\n\t}", "@Test\n public final void testNewlineIsNotEmpty() {\n Document testDoc = TestDocHelper.createDocument(\n \"<a>text</a>\");\n \n Node text1 = testDoc.createTextNode(\"\\r\");\n Node text2 = testDoc.createTextNode(\"\\r\\n\");\n Node text3 = testDoc.createTextNode(\"\\n\");\n \n assertFalse(NodeOps.nodeIsEmptyText(text1));\n assertEquals(1, text1.getNodeValue().length());\n assertFalse(NodeOps.nodeIsEmptyText(text2));\n assertEquals(2, text2.getNodeValue().length());\n assertFalse(NodeOps.nodeIsEmptyText(text3));\n assertEquals(1, text3.getNodeValue().length());\n }", "public boolean isWhiteSpace() {\n return node.getNodeType() == Node.TEXT_NODE && node.getTextContent().trim().length() == 0;\n }", "static public final boolean ccIsAllNoneSpace(String pxLine){\n return VcStringUtility.ccNulloutString(pxLine)\n .matches(\"^\\\\S+$\");\n }", "public synchronized boolean skipLineBreak() throws IOException {\n\t\tchar current = current();\n\t\tif ('\\r' == current && '\\n' == peek(1)) {\n\t\t\tskip(2);\n\t\t\treturn true;\n\t\t} else if (isNewLine(current)) {\n\t\t\tskip(1);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isEndLineSpace(final String message) {\n\t\treturn message.contains(\"A line should not end with blank space\"); //$NON-NLS-1$\n\t}", "private boolean isNewLine(int nextVal) {\n\t\treturn nextVal == CR || nextVal == LF || nextVal == EOF;\n\t}", "private void skipConsoleLine(){\n\t\tSystem.out.println();\n\t}", "public void spaces() {\n System.out.println(\"\");\n System.out.println(\"\");\n }", "public static void viewEmptyBooths() {\n\r\n for (int i=0; i < firstName.length; i++) {\r\n if (firstName[i].equals(\"empty\")) {\r\n System.out.println(\"Booth number \" + i + \" is empty.\"); //Check whether the booth is empty or not\r\n }\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"Note: If all the booths are occupied nothing will display.\");\r\n }", "private boolean getReplaceNonBreakingSpace() {\n return false;\n }", "public void printBuffer()\r\n\t{\r\n\t\tint stop;\r\n\t\t\r\n\t\tif (prvsize > 0) {\r\n\t\t\tstop = (buffer[1-currentbuf][prvsize-1] == '\\n' ? prvsize-1 : prvsize);\r\n\t\t\tif (stop != 0) \r\n\t\t\t\tsyserr.println(new String(buffer[1-currentbuf], 0, stop));\r\n\t\t\telse\r\n\t\t\t\tsyserr.println(\"(blank line)\");\r\n\t\t}\r\n\t\tif (bufpos > 0) {\r\n\t\t\tstop = (buffer[currentbuf][bufpos-1] == '\\n' ? bufpos-1 : bufpos);\r\n\t\t\tif (stop != 0) \r\n\t\t\t\tsyserr.println(new String(buffer[currentbuf], 0, stop));\r\n\t\t\telse\r\n\t\t\t\tsyserr.println(\"(blank line)\");\r\n\t\t}\r\n\t}", "public static boolean presentLine() {\n\t\treturn presentLine(\"\\n\");\n\t}", "private static void printNos() {\n\t\tfor(int i=0; i<=10; i++) { //this is a single line comment\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t/*\n\t\t * this is a multiline comment\n\t\t */\n\t}", "public void waitForEndOfVerticalBlank();", "protected abstract boolean isMultiLine();", "public boolean isNewline() {\n // -- if we need to add indentation, we are on a new line\n return addIndentation;\n }", "private void printSeparator() {\r\n\t\tthis.printLineGap();\r\n\t}", "private void newline() {}", "public boolean isLineCountNull() {\n\t\treturn lineCount == null;\n\t}", "public void testRemoveBlankLines() {\n File testFile = new File(\"src/test/data/dataset20.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Event type count not correct.\", 1, jvmRun.getEventTypes().size());\n Assert.assertTrue(\"Log line not recognized as \" + JdkUtil.LogEventType.PAR_NEW.toString() + \".\",\n jvmRun.getEventTypes().contains(JdkUtil.LogEventType.PAR_NEW));\n Assert.assertTrue(Analysis.WARN_PRINT_GC_APPLICATION_CONCURRENT_TIME + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_PRINT_GC_APPLICATION_CONCURRENT_TIME));\n\n }", "public static boolean checkBlank(Token token) throws Exception\r\n\t{\r\n\t\tchar currentChar; \r\n\t\t\r\n\t\t//if(nextToken.primClassif == 6)\t//end of file \r\n\t\tif(token.primClassif == 6)\t\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tif(Scanner.textCharM.length == 0)\r\n\t\t\treturn true;\r\n\t\r\n\t\telse\r\n\t\t\tcurrentChar = Scanner.textCharM[0];\r\n\t\t\r\n\t\t\r\n\t\t//get the first character, if you reach the end of the line, the line contains \r\n\t\t//only spaces or tabs and is therefore blank \r\n\t\twhile(currentChar == ' ' || currentChar == '\\t' || currentChar == '\\n')\r\n\t\t{\r\n\t\t\ttoken.iColPos++;\r\n\t\t\t\r\n\t\t\tif(token.iColPos == Scanner.textCharM.length)\r\n\t\t\t\treturn true;\r\n\t\t\telse\t\r\n\t\t\t\tcurrentChar = Scanner.textCharM[token.iColPos];\r\n\t\t}\r\n\t\t\r\n\t\t//Line is not blank, check for comments \r\n\t\tif(currentChar == '/')\r\n\t\t{\r\n\t\t\tif(Scanner.textCharM[token.iColPos + 1] == '/')\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t//Line is not blank \r\n\t\treturn false;\r\n\t}", "private boolean endline() {\r\n return (CHAR('\\r') || true) && CHAR('\\n');\r\n }", "public static void printLine() {\r\n if (!isDisabled()) {\r\n print(LINE_SEPARATOR);\r\n }\r\n }", "char skipSpaces () {\n char c = getChar ();\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') {\n if (c == '\\n') { m_nbLines++; }\n c = getNextChar ();\n }\n return c;\n }", "private boolean isBoardEmpty() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n if (board[i][j].equals(\" \"))\n return false;\n }\n }\n return true;\n }", "private static void empty() {\n\t\t// 행과 열을 상수로\n\t\tfinal int ROW_COUNT = 5, COL_COUNT = 8;\n\t\t// 5행\n\t\tfor (int rowIdx = 0; rowIdx < ROW_COUNT; rowIdx++) {\n\t\t\t// 8열 만들기\n\t\t\tfor (int colIdx = 0; colIdx < COL_COUNT; colIdx++) {\n\t\t\t\tif (rowIdx == 0 || rowIdx == ROW_COUNT - 1) {\n\t\t\t\t\t// 첫 행과 마지막 행은 경계\n\t\t\t\t\tSystem.out.print('*');\n\t\t\t\t} else if (colIdx == 0 || colIdx == COL_COUNT - 1){\n\t\t\t\t\t// 첫 열과 마지막 열은 경계\n\t\t\t\t\tSystem.out.print('*');\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// 가운데 공간 채우기\n\t\t\t\t\tSystem.out.print('-');\n\t\t\t\t}\n\t\t\t}\t\n\t\t\t// 행을 나누기\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public boolean isTerminal(){\n for(int row=0; row<8; row++)\n {\n for(int col=0; col<8; col++)\n {\n if(gameboard[row][col] == EMPTY)\n {\n return false;\n }\n }\n }\n return true;\n\n }", "public void dump(){\n int address = 0;\n String lastline = new String(\"junk\");\n String nextline;\n boolean star = false, needNewline = false;\n for (int i = 0; i < memory.length; i+=8){\n nextline = buildLine(i);\n if (! lastline.equals(nextline)){\n star = false;\n if (needNewline) System.out.println(); \n System.out.print(Tools.pad(Integer.toHexString(address), 4, \"0\",\n Direction.RIGHT) + \":\\t\");\n System.out.print(nextline); \n needNewline = true;\n } \n\t\t\telse if (lastline.equals(nextline) && (star == false)){\n System.out.println(\" *\");\n needNewline = false;\n star = true;\n } \n address = address + 32;\n lastline = nextline;\n }\n System.out.println();\n }", "@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }", "public boolean isBlank()\n\t\t{\n\t\t\treturn m_isBlank;\n\t\t}", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "private boolean spaces() {\r\n return OPT(GO() && space() && spaces());\r\n }", "public static void noSavingsPrinter() {\n System.out.println(line);\n System.out.println(NO_ACHIEVED_SAVINGS_MSG);\n System.out.println(line);\n }", "public boolean noFill(){\n return fillCharacter == EMPTY_CHAR;\n }", "public boolean is_empty() \n\t{\n\t\tif (this.nb_disk == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private void newline() {\n if (enableSplitting) {\n if (out.length() != 0) {\n out.append(System.lineSeparator());\n }\n out.append(\" \".repeat(depth)); // two spaces indent is sufficient\n } else {\n out.append(\" \"); // just a separator between two tokens\n }\n }", "public boolean isValid() {\n\t\treturn !lines.isEmpty();\n\t}", "private void boardPrint(){\t\t\n\t\tfor (int i=0;i<size;i++) {\n\t for (int j=0;j<size;j++) {\n\t System.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t for (int j=0;j<size;j++) {\n\t \tint value = (i*size) + j + 1;\n\t \tif(board[i][j] == '\\u0000'){\n\t \t\tif(value < 10)\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t\telse\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t}\n\t \telse\n\t \t\tSystem.out.print(\"| \"+ board[i][j] + \" |\");\n\t }\n\t System.out.println();\n\t }\n\n\t for (int i=0;i<size;i++){\n\t \tSystem.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t}", "static void getNonBlank() throws IOException{\n while(curr_char == 32)\n {\n curr_char = pbIn.read();\n }\n }", "public void clean() {\n\t\tfor(int i = 0; i <= 20; i++) {\n\t\t\tSystem.out.println(\" \");\n\t\t}\n\t}", "private void checkEmptyLine(String line) {\n if (line.substring(5).replace('\\t', ' ')\n .replace('\\n', ' ').trim().length() != 0) {\n throw new IllegalArgumentException(\"Invalid characters after tag.\");\n }\n }", "private static void addEmptyLine(Paragraph paragraph, int number) {\r\n for ( int i = 0 ; i < number; i++) {\r\n paragraph.add( new Paragraph( \" \" ));\r\n }\r\n }", "protected Convention.Key getBlankLinesAfterKey()\n {\n return ConventionKeys.BLANK_LINES_AFTER_HEADER;\n }", "private int skipWhitespace() {\n int prev = '\\n';\n while (position < length) {\n int c = data.charAt(position);\n switch (c) {\n case '\\t': case ' ':\n prev = c;\n position++;\n break;\n case '\\n':\n // handle \\r\\n\n if (prev != '\\r') {\n lineNumber++;\n }\n prev = c;\n position++;\n break;\n case '\\r':\n prev = c;\n position++;\n lineNumber++;\n break;\n default:\n return prev;\n }\n }\n return prev;\n }", "private void printLines() {\n for (String L: testLines) {\n print.write(L);\n }\n }", "boolean hasIndispensableYn();", "boolean hasIndispensableYn();", "private boolean isSpotBlank(int row, int column){\n\t\t\n\t\tif (getDisc(row, column) == null) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "@Test(timeout=100)\r\n\tpublic void testSkipEmptyLines() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"AAA\",\"BBB\"};\r\n\t\tString [] r3 = {\"the-end\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteline(\"\"); // empty line\r\n\t\twriteline(\"\"); // another empty line\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteline(\"\");\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "private void space() {\n if (wereTokens && !spaceSuppressed) {\n out.print(' ');\n }\n }", "private static boolean noWhiteSpace(String password) {\n\t\tint whitespaces = 0;\n\t\tfor (int i = 0; i < password.length(); i++) {\n\t\t char c = password.charAt(i);\n\t\t if ( Character.isWhitespace(c) ) {\n\t\t \t whitespaces++;\n\t\t }\n\t\t}\n\t\tif (whitespaces >= 1) {\n\t\t\tSystem.out.println(\"no whitespaces!\");\n\t\t\treturn false;\n\t\t} else return true;\n\t}", "private static void addEmptyLine(Paragraph paragraph, int number) {\r\n\t\tfor (int i = 0; i < number; i++) {\r\n\t\t\tparagraph.add(new Paragraph(\" \"));\r\n\t\t}\r\n\t}", "public boolean checkLine(String line) {\n int len = line.length();\n return !(len > 0 && Character.isWhitespace(line.charAt(len-1)));\n }", "public abstract void dump(PrintWriter pw, boolean skipEmptyComponents);", "private static boolean isBlank(CharSequence str) {\n int strLen;\n if (str == null || (strLen = str.length()) == 0) {\n return true;\n }\n for (int i = 0; i < strLen; i++) {\n if ((Character.isWhitespace(str.charAt(i)) == false)) {\n return false;\n }\n }\n return true;\n }", "public boolean getBlank(){\n return blank;\n }", "public boolean ContainerEmpty(){\r\n\t\tif(containerLine.isEmpty()){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isFilled(){\n\t\tfor(int i=0;i<size;i++){\n\t\t\tfor(int j=0;j<size;j++){\n\t\t\t\tif(board[i][j] == '\\u0000')\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isBlank(CharSequence seq) {\n if (seq == null || seq.length() == 0) {\n return true;\n }\n return is(seq, Character::isWhitespace);\n }", "private boolean isLineFull(int rowNumber) {\n\t\tfor (int i = 0; i < matrixWidth; i++) {\n\t\t\tif (boardTiles[rowNumber][i].equals(backgroundColor)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isEmpty( )\n {\n return header.next == null;\n }", "@Override\n\tpublic boolean getPrint() {\n\t\treturn false;\n\t}", "public ReportParameters setHideEmptyLines(boolean hideEmptyLines) {\n this.hideEmptyLines = hideEmptyLines;\n return this;\n }", "public boolean isEmpty( ){\r\n\t\treturn beginMarker.next==endMarker;\r\n\t}", "private String skipEmptyLines(String line, Scanner myReader){\n while (myReader.hasNextLine()){\n if (line.length() == 0){\n line = myReader.nextLine();\n }\n else{\n String[] tokens = line.split(\" \");\n if (tokens.length > 0){\n return line;\n }\n }\n }\n return \"\";\n }", "private void skipSpaces() {\r\n\t\twhile (currentIndex < expression.length && (expression[currentIndex] == ' ' || expression[currentIndex] == '\\t'\r\n\t\t\t\t|| expression[currentIndex] == '\\n' || expression[currentIndex] == '\\r')) {\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\t}", "boolean separatorLine(String mode);", "private boolean isWhitespace(char c) {\r\n if (c==' ' || c=='\\n' || c=='\\t' || c=='\\r' ){\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isFilled() {\n return(!this.getText().trim().equals(\"\"));\n }", "public void blankremover(String args) {\r\n\r\n Scanner file;\r\n PrintWriter writer;\r\n\r\n try {\r\n\r\n file = new Scanner(new File(args));\r\n writer = new PrintWriter(\"gpstest100.txt\");\r\n\r\n while (file.hasNext()) {\r\n String line = file.nextLine();\r\n if (!line.isEmpty()) {\r\n writer.write(line);\r\n writer.write(\"\\n\");\r\n }\r\n }\r\n\r\n file.close();\r\n writer.close();\r\n\r\n } catch (FileNotFoundException ex) {\r\n //Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);\r\n \t \r\n } \r\n \r\n}", "private static void addEmptyLine(Paragraph paragraph, int number) {\r\n for (int i = 0; i < number; i++) {\r\n paragraph.add(new Paragraph(\" \"));\r\n }\r\n }", "private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}", "protected boolean skipBlankValues() {\n return true;\n }", "private boolean comment() {\r\n return STRING(\"--\") && visibles() && newline();\r\n }", "public boolean is_empty() {\n\t\treturn false;\n\t}" ]
[ "0.70021075", "0.6914997", "0.68593484", "0.6711538", "0.6583801", "0.6479785", "0.6457505", "0.6430067", "0.63467824", "0.63107985", "0.6138589", "0.6096367", "0.60910416", "0.6086155", "0.60535336", "0.6053434", "0.6051462", "0.60412955", "0.60370374", "0.60201305", "0.6009634", "0.60010785", "0.5995242", "0.59936136", "0.59839857", "0.59575427", "0.594412", "0.591855", "0.58899367", "0.58635056", "0.5861633", "0.5842039", "0.58384985", "0.5834012", "0.58208716", "0.58161676", "0.5806062", "0.58056206", "0.5794307", "0.5784111", "0.57508534", "0.5738561", "0.57259256", "0.57215047", "0.5721376", "0.57069016", "0.5694867", "0.56830233", "0.5651997", "0.5622622", "0.5611064", "0.5606515", "0.56002766", "0.55994993", "0.5576255", "0.5530227", "0.5522836", "0.55117196", "0.5509308", "0.55080104", "0.54951084", "0.5488818", "0.5480846", "0.5480275", "0.54759634", "0.5471904", "0.5464482", "0.54634076", "0.5461102", "0.54606205", "0.54603964", "0.54603964", "0.54580855", "0.5455035", "0.5443084", "0.5442055", "0.543565", "0.5435239", "0.5432234", "0.5419323", "0.5415396", "0.5410867", "0.5401538", "0.5400052", "0.53942543", "0.53875685", "0.5385817", "0.5384237", "0.537043", "0.5365879", "0.5364891", "0.53647375", "0.5359211", "0.53539747", "0.5353684", "0.5353055", "0.53527105", "0.5351405", "0.5346313", "0.53406" ]
0.8331856
0
Set whether to print blank lines
public void setPrintBlankLine(boolean printBlankLine) { this.printBlankLine = printBlankLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPrintBlankLine()\n\t{\n\t\treturn printBlankLine;\n\t}", "public boolean getHideEmptyLines() {\n return hideEmptyLines;\n }", "public static void printBlankLine () {\n\t\t\n\t\t// First part before the +\n\t\tSystem.out.print(\"\\n\\u2012\\u2012\\u2012\\u2012\");\n\t\tSystem.out.print(\"+\");\n\t\t// Loops through and prints the rest\n\t\tfor (int i = 0; i < 89; i++) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\u2012\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void addEmptyLine() {\n addLine(\"\");\n }", "@Override\n public void println ()\n {\n if (text != null)\n {\n text.append (Out.NL);\n col = 0;\n }\n else\n super.println ();\n }", "public static void printLine() {\r\n if (!isDisabled()) {\r\n print(LINE_SEPARATOR);\r\n }\r\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "public ReportParameters setHideEmptyLines(boolean hideEmptyLines) {\n this.hideEmptyLines = hideEmptyLines;\n return this;\n }", "public boolean isEmpty() {\n\n \tif (numLines == 0) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\t\n }", "public void spaces() {\n System.out.println(\"\");\n System.out.println(\"\");\n }", "private void skipConsoleLine(){\n\t\tSystem.out.println();\n\t}", "public void makeWhite() {\n\t\t// make all the lines white\n\t\tfor (int i = 0; i < NUM_LINES; i++) {\n\t\t\toutLine[i].setColor(Color.white);\n\t\t}\n\t}", "public void println() {\n\t\tprintln(\"\"); //$NON-NLS-1$\n\t}", "public boolean getNeedLineBreak() {\n\t\treturn true;\n\t}", "@Override\n\tpublic String Pretty_Prints() {\n\t\treturn \"!=\";\n\t}", "@Override\n\tpublic boolean getPrint() {\n\t\treturn false;\n\t}", "public static void noSavingsPrinter() {\n System.out.println(line);\n System.out.println(NO_ACHIEVED_SAVINGS_MSG);\n System.out.println(line);\n }", "private void newline() {}", "private void newline() {\n if (enableSplitting) {\n if (out.length() != 0) {\n out.append(System.lineSeparator());\n }\n out.append(\" \".repeat(depth)); // two spaces indent is sufficient\n } else {\n out.append(\" \"); // just a separator between two tokens\n }\n }", "public void setPrint(String yorn) {\n print = yorn.trim().equals(\"y\");\n }", "public SourceGenerator forceNewline(){\r\n\t\tm_writer.append(m_newline);\r\n\t\treturn this;\r\n\t}", "private void printSeparator() {\r\n\t\tthis.printLineGap();\r\n\t}", "private void printLines() {\n for (String L: testLines) {\n print.write(L);\n }\n }", "@Override\n protected void setMultiline(boolean multiline) {\n }", "public boolean inVerticalBlank();", "public void clean() {\n\t\tfor(int i = 0; i <= 20; i++) {\n\t\t\tSystem.out.println(\" \");\n\t\t}\n\t}", "private static void printNos() {\n\t\tfor(int i=0; i<=10; i++) { //this is a single line comment\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t/*\n\t\t * this is a multiline comment\n\t\t */\n\t}", "private static void addEmptyLine(Paragraph paragraph, int number) {\r\n\t\tfor (int i = 0; i < number; i++) {\r\n\t\t\tparagraph.add(new Paragraph(\" \"));\r\n\t\t}\r\n\t}", "private boolean getReplaceNonBreakingSpace() {\n return false;\n }", "private static void addEmptyLine(Paragraph paragraph, int number) {\r\n for ( int i = 0 ; i < number; i++) {\r\n paragraph.add( new Paragraph( \" \" ));\r\n }\r\n }", "private void displayLine()\n {\n System.out.println(\"#################################################\");\n }", "public boolean noNl()\n \t{\n \t\treturn !isAfterNL();\n \t}", "static public void clear(){\n System.out.println(\"\\n\".repeat(3));\n }", "private static void addEmptyLine(Paragraph paragraph, int number) {\r\n for (int i = 0; i < number; i++) {\r\n paragraph.add(new Paragraph(\" \"));\r\n }\r\n }", "private boolean isBlank() {\n\t\tchar currentChar = data[index];\n\t\tif (currentChar == '\\r' || currentChar == '\\n' || currentChar == '\\t' || currentChar == ' ') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void printBuffer()\r\n\t{\r\n\t\tint stop;\r\n\t\t\r\n\t\tif (prvsize > 0) {\r\n\t\t\tstop = (buffer[1-currentbuf][prvsize-1] == '\\n' ? prvsize-1 : prvsize);\r\n\t\t\tif (stop != 0) \r\n\t\t\t\tsyserr.println(new String(buffer[1-currentbuf], 0, stop));\r\n\t\t\telse\r\n\t\t\t\tsyserr.println(\"(blank line)\");\r\n\t\t}\r\n\t\tif (bufpos > 0) {\r\n\t\t\tstop = (buffer[currentbuf][bufpos-1] == '\\n' ? bufpos-1 : bufpos);\r\n\t\t\tif (stop != 0) \r\n\t\t\t\tsyserr.println(new String(buffer[currentbuf], 0, stop));\r\n\t\t\telse\r\n\t\t\t\tsyserr.println(\"(blank line)\");\r\n\t\t}\r\n\t}", "@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }", "public void linefeed() {\r\n\t\tconsole.print(LINESEP);\r\n\t}", "private void skipEmptyLines() throws IOException {\n for (;;) {\n if (nextChar != ';') {\n do {\n readNextChar();\n } while (isWhitespace(nextChar));\n if (nextChar != ';') return;\n }\n do {\n readNextChar();\n if (nextChar == -1) return;\n } while (nextChar != '\\n');\n }\n }", "public void clear_console() {\n\t\tfor(int i = 0;i<50;i++) {\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "public boolean noSeparator(){\n return separator == EMPTY_CHAR;\n }", "@Override\n\tpublic void setEmpty() {\n\t\t\n\t}", "private static void empty() {\n\t\t// 행과 열을 상수로\n\t\tfinal int ROW_COUNT = 5, COL_COUNT = 8;\n\t\t// 5행\n\t\tfor (int rowIdx = 0; rowIdx < ROW_COUNT; rowIdx++) {\n\t\t\t// 8열 만들기\n\t\t\tfor (int colIdx = 0; colIdx < COL_COUNT; colIdx++) {\n\t\t\t\tif (rowIdx == 0 || rowIdx == ROW_COUNT - 1) {\n\t\t\t\t\t// 첫 행과 마지막 행은 경계\n\t\t\t\t\tSystem.out.print('*');\n\t\t\t\t} else if (colIdx == 0 || colIdx == COL_COUNT - 1){\n\t\t\t\t\t// 첫 열과 마지막 열은 경계\n\t\t\t\t\tSystem.out.print('*');\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// 가운데 공간 채우기\n\t\t\t\t\tSystem.out.print('-');\n\t\t\t\t}\n\t\t\t}\t\n\t\t\t// 행을 나누기\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\n\tpublic void printBefore() {\n\t\tSystem.out.println(\"############################\");\n\t\tSystem.out.println(\"# App de Chat #\");\n\t\tSystem.out.println(\"############################\");\n\t\tSystem.out.println(\"\");\n\t}", "private ConfigurationHTMLPrinter print0ln(final String s) {\n sb.append(s).append('\\n');\n return this;\n }", "public TreePrinter<T> setFlush(boolean flush) { this.flush = flush; return this; }", "public void newLine()\n\t{\n\t\toutput.append(\"\\n\");\n\t}", "public void setReportWhitespace (boolean reportWhitespace)\n {\n mReportWhitespace = reportWhitespace;\n }", "public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}", "public void setOneLine (String var)\r\n\t{\r\n\t\tm_oneLine = \"Y\".equals(var);\r\n\t}", "private void linefeed() {\n try {\n out.write(lineSeparator);\n } catch (java.io.IOException ioe) {\n }\n ;\n }", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "public void markAsBlank(boolean isBlank)\n\t\t{\n\t\t\tm_isBlank = isBlank;\n\t\t}", "public void setToPrint(Boolean toPrint) {\r\n this.toPrint = toPrint;\r\n }", "private void space() {\n if (wereTokens && !spaceSuppressed) {\n out.print(' ');\n }\n }", "public static void oneLineHellos()\r\n {\r\n System.out.print(\"Hello! \");\r\n System.out.print(\"Hello! \");\r\n System.out.println(\"Hello! \"); // skips to next line after this one\r\n }", "static void clear_console_screen()\n\t{\n\t\tfor (int lines=0; lines<200; lines++)\n\t\t{\n\t\t\tSystem.out.println(\" \");\n\t\t}// end for (int lines=0; lines<200; lines++)\n\t\t\n\t}", "private void printline(Object o) {\n\t\tprint(o + newline);\n\t}", "private static void printSeparatorLine() {\r\n System.out.print(\"\\n----------------------------------------------------------\" +\r\n \"----------------------------------------------------------\");\r\n }", "public void newLine() {\n text.append(\"\\n\");\n }", "public void indentNone() {\n\t\tindentLevel = 0;\n\t}", "public void printGrid()\n\t{\n\t\tfor(int i = 0; i < numRows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < numColumns; j++)\n\t\t\t{\n\t\t\t\tif(grid[i][j] == null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"[ ]\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(grid[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\t\t\t\n\t\t}\n\t\tSystem.out.println(\"\\n\\n\");\n\t}", "public boolean getBlank(){\n return blank;\n }", "public void setEmpty(){this.empty = true;}", "private void skipBlankSpaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tchar c = data[currentIndex];\n\t\t\tif(c == ' ' || c == '\\t' || c =='\\n' || c == '\\r') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private static void clear() {\n\t\tfor(int i = 0 ; i < 100 ; i++) System.out.println();\n\t}", "private boolean printing_status() {\n\t\treturn _status_line != null;\n\t}", "private void boardPrint(){\t\t\n\t\tfor (int i=0;i<size;i++) {\n\t for (int j=0;j<size;j++) {\n\t System.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t for (int j=0;j<size;j++) {\n\t \tint value = (i*size) + j + 1;\n\t \tif(board[i][j] == '\\u0000'){\n\t \t\tif(value < 10)\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t\telse\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t}\n\t \telse\n\t \t\tSystem.out.print(\"| \"+ board[i][j] + \" |\");\n\t }\n\t System.out.println();\n\t }\n\n\t for (int i=0;i<size;i++){\n\t \tSystem.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t}", "public void printPerFloorLine() {\r\n\t\tgetPerFloor();\r\n\t\tgetPerLine();\r\n\t\tprintPerFloor();\r\n\t\tSystem.out.println(\"\");\r\n\t\tprintPerLine();\r\n\t}", "public void print() {\n\t\tif (cs213.isEmpty()) {\n\t\t\tSystem.out.println(\"List is empty!\");\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tcs213.print();\n\t\t}\n\t\treturn;\n\t\t}", "public void newLine()\n {\n rst += NEW_LINE;\n }", "public java.lang.Boolean getStrictLineBreaking() {\r\n return strictLineBreaking;\r\n }", "public static void viewEmptyBooths() {\n\r\n for (int i=0; i < firstName.length; i++) {\r\n if (firstName[i].equals(\"empty\")) {\r\n System.out.println(\"Booth number \" + i + \" is empty.\"); //Check whether the booth is empty or not\r\n }\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"Note: If all the booths are occupied nothing will display.\");\r\n }", "private void displayEmpty() {\n if (strokeWeight == 0)\r\n noStroke();\r\n else\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "public boolean isShowLineNumbers() { return _showLineNumbers; }", "public void showLine() {\n System.out.print(LINE_SEPARATOR);\n }", "void showsame() {\n\t\tint count;\n\t\tprintstatus = idle;\n\t\tif (newinfo.other[printnewline] != printoldline) {\n\t\t\tSystem.err.println(\"BUG IN LINE REFERENCING\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tcount = blocklen[printoldline];\n\t\tprintoldline += count;\n\t\tprintnewline += count;\n\t}", "public void writeln () {\n pw.println();\n }", "private void cmdMultiLine() {\n fMultiLineMode = true;\n }", "public void setStrictLineBreaking(java.lang.Boolean strictLineBreaking) {\r\n this.strictLineBreaking = strictLineBreaking;\r\n }", "public void newLine() {\n\t\tcommandLine.append(\"\\n\");\n\t}", "@Override\n\tpublic boolean isMyLine() {\n\t\treturn false;\n\t}", "@Test\n\tpublic void nonEmptyMultiLine() {\n\t\tString s = \" \\n\" + \"Nothing\";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "public SourceGenerator writeNewline(){\r\n\t\tif (m_style == CodeStyle.PRETTY){\r\n\t\t\tm_writer.append(m_newline);\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public void oddPrinter()\n {\n oddPrinter(0);\n }", "public void setNoTokensByLine(final int noTokensByLine) {\r\n\t\tthis.noTokensByLine = noTokensByLine;\r\n\t}", "public boolean isEmpty() {\n return top == ' ';\n }", "protected boolean checkEmpty(String line) {\n return line == null || line.isBlank();\n }", "void setLeading(boolean leading);", "void isPrintable(boolean b) {\n\t\tm.isPrintable=b;\n\t}", "protected Convention.Key getBlankLinesAfterKey()\n {\n return ConventionKeys.BLANK_LINES_AFTER_HEADER;\n }", "public void outputActualIndentation() {\n\t\tfor (int steps = 1; steps <= indentLevel; steps++) {\n\t\t\toutputJALPrintStream.print(\" \");\n\t\t}\n\t\tif (showMarkerFlag) {\n\t\t\toutputJALPrintStream.print(\"|\");\n\t\t}\n\t}", "public abstract void dump(PrintWriter pw, boolean skipEmptyComponents);", "private void blank() {\n tgl_pengobatanField.setText(null);\n waktu_pengobatanField.setText(null);\n keluhan_pasienField.setText(null);\n hasil_diagnosaField.setText(null);\n biayaField.setText(null);\n }", "protected void emitLine(String line) {\n if (writer == null) {\n super.emitLine(line);\n return;\n }\n line = line.replaceAll(\"\\t\", \" \");\n writer.println(line);\n }", "public boolean isBlank()\n\t\t{\n\t\t\treturn m_isBlank;\n\t\t}", "public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\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 \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }", "public DefaultPrettyPrinter _withSpaces(boolean z) {\n if (this._spacesInObjectEntries == z) {\n return this;\n }\n DefaultPrettyPrinter defaultPrettyPrinter = new DefaultPrettyPrinter(this);\n defaultPrettyPrinter._spacesInObjectEntries = z;\n return defaultPrettyPrinter;\n }" ]
[ "0.7754557", "0.69372123", "0.6568752", "0.65309983", "0.6391379", "0.63766426", "0.62044257", "0.60853595", "0.6051382", "0.60173076", "0.58981055", "0.588293", "0.5858023", "0.58529156", "0.5830235", "0.5818939", "0.5815007", "0.57980335", "0.5792627", "0.5785883", "0.5720778", "0.571883", "0.56889", "0.5644829", "0.5638657", "0.56366634", "0.5619195", "0.5603124", "0.56003666", "0.5600208", "0.5593623", "0.5582782", "0.55689883", "0.5552524", "0.5534225", "0.55089605", "0.54974884", "0.5491867", "0.54820335", "0.54586124", "0.5452652", "0.5434555", "0.54341066", "0.54289883", "0.54242456", "0.541617", "0.5411921", "0.54001546", "0.5396673", "0.5395797", "0.53952575", "0.5384981", "0.5376742", "0.53746265", "0.53634936", "0.53627133", "0.5354873", "0.53543633", "0.5334748", "0.5333324", "0.53309923", "0.53308916", "0.53283584", "0.5319746", "0.5319737", "0.5316487", "0.5313583", "0.5310616", "0.5309941", "0.53078043", "0.530281", "0.52836883", "0.5277147", "0.52760965", "0.52749145", "0.526884", "0.5263763", "0.52612185", "0.5260767", "0.52546287", "0.52513516", "0.5249207", "0.524766", "0.524732", "0.52444834", "0.52443695", "0.52402264", "0.5238573", "0.52242196", "0.5219454", "0.5214707", "0.5210918", "0.5200709", "0.5194753", "0.5184391", "0.51781136", "0.5166951", "0.5161531", "0.5154401", "0.5148507" ]
0.7755134
0
Determine whether to print header
public boolean isPrintHeader() { return printHeader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasHeader();", "public void setPrintHeader(boolean printHeader)\n\t{\n\t\tthis.printHeader = printHeader;\n\t}", "public abstract boolean isFirstLineHeader();", "public boolean isHeader() {\n\t \treturn this == HEADER;\n\t }", "public boolean isHeader() {\n return isHeader;\n }", "boolean isHeader(int position);", "default boolean hasHeader() {\n return true;\n }", "boolean isSetHeader();", "public boolean getHeader() {\n return isHeader;\n }", "private void printHeader () {\n System.out.println(\"COMPLETED HEADER PARSING\");\n System.out.println(\"________________________\");\n for(String header : parseTableHeader.keySet()) {\n System.out.print(header);\n System.out.println(parseTableHeader.get(header));\n }\n }", "boolean hasHeading();", "boolean hasHeading();", "boolean hasHeading();", "@Override\n public boolean getDisplayHeaders() {\n return displayHeaders;\n }", "public boolean hasHeader() {\n return hasHeader;\n }", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "public void setHeader(boolean isHeader) {\n this.isHeader = isHeader;\n }", "public boolean isHeaderView(int i) {\n return haveHeaderView() && i == 0;\n }", "public boolean isHeaderParsed();", "static void printHeader(String fn, PrintWriter out) throws IOException\n{\n\t@SuppressWarnings(\"resource\")\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0) continue;\n\t\tif(line.charAt(0) == '#') out.println(line);\n\t\telse break;\n\t}\n}", "private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }", "abstract protected boolean isHeaderLine(String line);", "public void forceNotInsideHeader() {\n insideHeader = false;\n }", "@Override\n public boolean containsHeader(String arg0) {\n return false;\n }", "public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }", "@Override\n\tpublic boolean containsHeader(String name) {\n\t\treturn false;\n\t}", "public static void printHeader(){\n System.out.println(\"\" +\n \"AuthorCode Number: 879P \\n\" +\n \"Class: CS 342, Fall 2016 \\n\" +\n \"Program: #3, 8 Tiles. \\n\" +\n \"\\n\" +\n \"\\n\" +\n \"Welcome to the 8-tiles puzzle. \\n\" +\n \"Place the tiles in ascending numerical order. For each \\n\" +\n \"move enter the piece to be moved into the blank square, \\n\" +\n \"or 0 to exit the program.\\n\");\n }", "public void\nprintHir( String pHeader );", "protected void writeHeader(PrintStream wps, List listColumn, char cDelim)\n {\n String sData;\n int c = 0;\n for (Iterator iCol = listColumn.iterator(); iCol.hasNext(); )\n {\n ReportColumnView columnView = (ReportColumnView) iCol.next();\n if (columnView != null)\n {\n if (columnView.isVisible())\n {\n if (c != 0)\n {\n wps.print(cDelim);\n }\n c++;\n Object oResult = columnView.getHeader();\n sData = oResult == null ? \"\" : oResult.toString();\n wps.print(sData);\n }\n }\n }\n wps.println();\n // without this line sometimes the header is not printed correctly.\n wps.flush();\n }", "public boolean skipHeader() {\n return skipHeader;\n }", "@Override\n\tpublic synchronized boolean writeHeader() {\n\t\tif(!trailerWritten) \n\t\t{\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tsuper.writeHeader();\n\t\t\tlong diff = System.currentTimeMillis() - startTime;\n\t\t\tlogger.info(\"write header takes {} for rtmp:{}\", diff, getOutputURL());\n\t\t\t\n\t\t\theaderWritten = true;\n\t\t\tsetStatus(IAntMediaStreamHandler.BROADCAST_STATUS_BROADCASTING);\n\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tlogger.warn(\"Trying to write header after writing trailer\");\n\t\t\treturn false;\n\t\t}\n\t}", "public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpage\");\r\n\t}", "abstract public void header();", "private void printHeading()\n {\n System.out.println(\"==============================================\");\n System.out.println(\" Stock Management Application \");\n System.out.println(\" App05: by Haroon Sadiq \");\n System.out.println(\"==============================================\");\n }", "public void printHeaderInfo(String className) {\n outFile.println(\"// Declarations for \" + className);\n outFile.println(\n \"// Declarations written by Chicory \" + LocalDateTime.now(ZoneId.systemDefault()));\n outFile.println();\n\n // Determine comparability string\n String comparability = \"none\";\n if (Runtime.comp_info != null) {\n comparability = \"implicit\";\n }\n outFile.printf(\"decl-version 2.0%n\");\n outFile.printf(\"var-comparability %s%n%n\", comparability);\n }", "public boolean hasHeading() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasHeading() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "boolean containsHeader(String name);", "private static void printHeader(StringBuffer out, String[] header,\n\t\t\tint[] colWidths, String left, String sep) {\n\t\tStringBuffer bf = new StringBuffer(120);\n\n\t\t// Left mark\n\t\tbf.append(left);\n\n\t\tfor (int i = 0; i < header.length; i++) {\n\t\t\tString s = header[i];\n\t\t\tbf.append(s);\n\n\t\t\tfor (int j = 0; j < colWidths[i] - s.length(); j++)\n\t\t\t\tbf.append(' ');\n\n\t\t\tbf.append(sep);\n\t\t}\n\n\t\tout.append(bf + \"\\n\");\n\t}", "public boolean hasHeading() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasHeading() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public abstract String header();", "protected void write_output_header() {\t\t\n\t\tSystem.out.println(\" H Lennard-Jones lattice-switch monte carlo code: hcp v fcc:\");\n\t\tSystem.out.println(\" H \");\n\t\t// Write out the standard parts of the LSMC header:\n\t\tsuper.write_output_header();\n\t\t// Write out LJLS-specific section:\n\t\tSystem.out.println(\" H For the Lennard-Jones Lattice-Switch: \");\n\t\tSystem.out.print(\" H lj_eta = 4*beta = +\"+lj_eta+\"\\n\");\n\t\tif( VIRT_NSWC == 1 ) {\n\t\t\tSystem.out.println(\" H VIRTUAL n-switch, structure \"+INIT_PHASE+\", en_shift = \"+EN_SHIFT);\n\t\t}\n\t\t\n\t\t// Optionally output E v. density:\n\t\tif( OUTPUT_E_V_DENSITY ) calc_e_v_dens();\n\n\t}", "public boolean hasHeading() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasHeading() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "private static String header() {\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "private static void printHeading(){\n\t\tSystem.out.println(\"Your Name\");\n\t\tSystem.out.println(\"Course name and semester\");\n\t\tSystem.out.println(\"Programming Project 1\");\n\t\tSystem.out.println(\"Your Name in Code\");\n\t\tSystem.out.println();\n\n\t}", "public boolean isFixedHeaders() {\n return fixedHeaders;\n }", "private static void printReportHeader(String name, String domain, String license, int fiscalYear) {\r\n\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tCompany name: \" + name);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tDomain: \" + domain);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tLicense: \" + license);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tFiscal Year: \" + fiscalYear);\r\n System.out.println(\"\\n\");\r\n System.out.println(\"\\t\\t\\t\\t\\t\\t\\tProfit Report\\n\\n\");\r\n String format = \"%-15s %-15s %15s %15s %15s %15s %20s\";\r\n System.out.format(format,\"Branch ID\", \"Location\", \"Quarter 1\", \"Quarter 2\",\r\n \"Quarter 3\", \"Quarter 4\", \"Annual Profit\");\r\n printSeparatorLine();\r\n }", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "public final boolean isUseReporting() {\n\t\treturn useHeader;\n\t}", "private boolean printing_status() {\n\t\treturn _status_line != null;\n\t}", "private static String headerSummary() {\r\n\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\usepackage{rotating}\\n\";\r\n output += \"\\\\usepackage{textcomp}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "private void IdentifyHeaderAndFooter() {\n receipt_Header = receipt_lines.length > 0 ? receipt_lines[0] : null;\n receipt_Footer = receipt_lines.length > 1 ? receipt_lines[receipt_lines.length - 1].split(\" \")[0] : null;\n }", "private void skipHeader() throws IOException {\n // The header contains two dashed lines; the data begins\n // immediately after the second dashed line...\n //\n readToDashedLine();\n readToDashedLine();\n }", "@Override\n\tprotected String getHeaderTitle() {\n\t\treturn \"\";\n\t}", "public void Verify_Page_Header_Visibility()\r\n\t{\r\n\t\t if(Page_header.isDisplayed())\r\n\t\t\t System.out.println(\"header visible at webpage\");\r\n\t\t else\r\n\t\t\t System.out.println(\"header not visible at webpage\");\r\n\t\t\r\n\t}", "void displayColumnHeaders() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"|col \" + j);\n\t\tSystem.out.println();\n\t}", "public static void printHeader(int homework, String lastModified) \n\t{\n\t\tSystem.out.println(\"/********************************************\");\n\t\tSystem.out.println(\"* AUTHOR: \" + NAME);\n\t\tSystem.out.println(\"* COURSE: \" + COURSE);\n\t\tSystem.out.println(\"* SECTION: \" + SECTION);\n\t\tSystem.out.println(\"* HOMEWORK #: \" + homework);\n\t\tSystem.out.println(\"* LAST MODIFIED: \" + lastModified);\n\t\tSystem.out.println(\"********************************************/\");\n\t}", "public boolean writeHeader(OutputStream param1) {\n }", "static void processHeader(Scanner s, PrintWriter w) throws Exception {\n for (int i = 0; i < 4; i++) {\n w.println(s.nextLine());\n }\n }", "private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is empty, write a new one (what else???)\n writeHeader();\n } \n */ \n readHeader();\n }", "public void writeHeader(ReporterIonQuantification reporterIonQuantification) throws IOException {\r\n\r\n boolean needSecondLine = false;\r\n ArrayList<String> sampleIndexes = new ArrayList<>(reporterIonQuantification.getSampleIndexes());\r\n Collections.sort(sampleIndexes);\r\n\r\n boolean firstColumn = true;\r\n\r\n if (indexes) {\r\n writer.writeHeaderText(\"\");\r\n writer.addSeparator();\r\n }\r\n\r\n for (ExportFeature exportFeature : identificationFeatures) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.addSeparator();\r\n }\r\n\r\n writer.writeHeaderText(exportFeature.getTitle());\r\n }\r\n\r\n for (ReporterExportFeature exportFeature : quantificationFeatures) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.addSeparator();\r\n }\r\n\r\n writer.writeHeaderText(exportFeature.getTitle(), reporterStyle);\r\n\r\n if (exportFeature.hasChannels()) {\r\n\r\n for (int i = 1; i < sampleIndexes.size(); i++) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.addSeparator();\r\n }\r\n\r\n writer.writeHeaderText(\" \", reporterStyle); // Space used for the excel style\r\n }\r\n\r\n needSecondLine = true;\r\n\r\n }\r\n\r\n }\r\n\r\n if (needSecondLine) {\r\n\r\n writer.newLine();\r\n firstColumn = true;\r\n\r\n if (indexes) {\r\n writer.addSeparator();\r\n }\r\n\r\n for (ExportFeature exportFeature : identificationFeatures) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.writeHeaderText(\"\");\r\n writer.addSeparator();\r\n }\r\n\r\n }\r\n\r\n for (ReporterExportFeature exportFeature : quantificationFeatures) {\r\n\r\n if (exportFeature.hasChannels()) {\r\n\r\n for (String sampleIndex : sampleIndexes) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.writeHeaderText(\"\", reporterStyle);\r\n writer.addSeparator();\r\n }\r\n\r\n writer.write(reporterIonQuantification.getSample(sampleIndex), reporterStyle);\r\n\r\n }\r\n\r\n } else {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.writeHeaderText(\"\", reporterStyle);\r\n writer.addSeparator();\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n writer.newLine();\r\n }", "public boolean isHeaderFile(String ext);", "@Override\n public boolean containsHeader(String name) {\n return this._getHttpServletResponse().containsHeader(name);\n }", "public void printDNSHeader()\n {\n // id should be unsigned\n int idInInt = (this.id & 0xffff);\n System.out.println(\"Header id: \" + idInInt\n + \" flag: \" + String.format(\"0x%04X\", this.flag));\n System.out.println(\"question#: \" + this.questionCount\n + \" answer#: \" + this.answerCount);\n System.out.println(\"authority#: \" + this.nameServerCount\n + \" addition#: \" + this.additionalFullRRCount);\n System.out.println(\" \"); // leave a blank line.\n\n }", "private static void outputHeaderMainPage(SimpleWriter out) {\n out.print(\"<html>\\n\" + \"<head>\\n\" + \"\\t<title>\" + \"Index\" + \"</title>\\n\"\n + \"<font size = '10' >\" + \"Glossary Homepage\" + \"</font>\"\n + \"</head>\\n\" + \"<body>\\n\" + \"<head>\\n\" + \"\\t<h1>\\n\"\n + \"<font size = '6' >\" + \"Index\" + \"</font>\" + \"\\t</h1>\\n\"\n + \"</head>\\n\" + \"</body>\\n\" + \"</html>\");\n }", "public static void printHeader(int homework, String homeworkDescription, \n double project, String projectDescription, String lastModified)\n {\n System.out.println(header(homework, homeworkDescription, project, \n projectDescription, lastModified));\n }", "protected void header(String s, boolean beforeLabel) {\n if (beforeLabel)\n System.out.println(\"before array: \" + s);\n else System.out.println(\"after array: \" + s);\n }", "public static void printTableStatusHeader() {\n\t\tSystem.out.println(\"Table availability status:\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, Object headerValue) {\n return headerValue != null;\n }", "@Override\n\tprotected Boolean isHeader(String[] fields) {\n\t\t//check\n return (isValid(fields) && fields[0].equals(\"event\") && fields[1].equals(\"yes\") && fields[2].equals(\"maybe\") && fields[3].equals(\"invited\") && fields[4].equals(\"no\"));\n\t}", "protected abstract boolean isAddAdapterHeader();", "public boolean isHeading() {\n/* 1381 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static void printHeader(int labNum, int quesNum){\n System.out.println(\"****************************************\");\n System.out.println(\"\\tKanav Gupta\");\n System.out.printf(\"\\tLab #%s Question #%s%n\",labNum,quesNum);\n System.out.println(\"****************************************\\n\");\n }", "private static void outputHeader(XMLTree channel, SimpleWriter out) {\n assert channel != null : \"Violation of: channel is not null\";\n assert out != null : \"Violation of: out is not null\";\n assert channel.isTag() && channel.label().equals(\"channel\") : \"\"\n + \"Violation of: the label root of channel is a <channel> tag\";\n assert out.isOpen() : \"Violation of: out.is_open\";\n\n int start = 0;\n int titleIndex = getChildElement(channel, \"title\");\n int descriptionIndex = getChildElement(channel, \"description\");\n int itemIndex = getChildElement(channel, \"item\");\n int linkIndex = getChildElement(channel, \"link\");\n \n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n // if there's no title print that\n\t\tif(channel.child(titleIndex).numberOfChildren() == 0)\n\t\t{\n\t\t\tout.println(\"<head>\");\n\t\t\tout.println(\"<title> Empty Title </title>\");\n\t\t\tout.println(\"<a href=\" + channel.child(linkIndex).child(0) + \"><h1>\" + channel.child(titleIndex).child(0) + \"</h1>\");\n\t\t\tout.println(\"</head>\");\n\t\t}\n\t\t// else print title\n\t\telse\n\t\t{\n\t\t\tout.println(\"<head>\");\n\t\t\tout.println(\"<title>\" + channel.child(titleIndex).child(0) + \"</title>\");\n \t\tout.println(\"<a href=\\\"\" + channel.child(linkIndex).child(0) +\"\\\"><h1> \" + channel.child(titleIndex).child(0) + \"</h1></a>\");\n \t\tout.println(\"</head>\");\n\t\t}\n\t\t\n\t\t// if no description\n\t\tif(channel.child(descriptionIndex).numberOfChildren() == 0)\n\t\t{\n\t\t\tout.println(\"<p>\");\n\t\t\tout.println(\"No description\");\n\t\t\tout.println(\"</p>\");\n\t\t}\n\t\t// else print description\n\t\telse\n\t\t{\n\t\t\tout.println(\"<p>\");\n\t\t\tout.println(channel.child(descriptionIndex).child(0));\n\t\t\tout.println(\"</p>\");\n\t\t} \n\t\t\n\t\t// print out basic setup for the table\n\t\tout.println(\"<table border=\\\"1\\\">\");\n\t\tout.println(\"<tr>\");\n \tout.println(\"<th>Date</th>\");\n \tout.println(\"<th>Source</th>\");\n \tout.println(\"<th>News</th>\");\n \tout.println(\"</tr>\");\n \t\n \tfor(int i = 0; i < channel.numberOfChildren() - itemIndex; i++)\n \t{\n \t\tprocessItem(channel.child(itemIndex + i), out);\n \t}\n }", "private void writeHeaders(final DataOutput out) throws IOException {\n for (final Map.Entry<String, List<String>> entry : headers.entrySet()) {\n if (entry.getValue().size() == 1) {\n writeHeader(out, entry.getKey(), entry.getValue().get(0));\n } else if (entry.getValue().size() > 1) {\n for (final String val : entry.getValue()) {\n writeHeader(out, entry.getKey(), val);\n }\n }\n }\n }", "public static void printHeader(int homework, double project, String lastModified)\n {\n System.out.println(header(homework, project, lastModified));\n }", "public String getHeader();", "@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}", "@Deprecated\n/* */ public boolean isHeading() {\n/* 3013 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }", "private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}", "public Boolean getCanSelectHeaders() {\r\n return getAttributeAsBoolean(\"canSelectHeaders\");\r\n }", "public LandingPage doCheckHeaderMenu() {\n if (EXPECTED_HEADER.length != HEADER_MENU.size()) {\n System.out.println(\"Not all headers were found on the page\");\n }\n for (int i = 0; i < HEADER_MENU.toArray().length; i++) {\n HEADER_MENU.get(i).click();\n final String headerName = HEADER_MENU.get(i).getText();\n if (headerName.equals(EXPECTED_HEADER[i])) {\n // exit\n } else {\n // exit\n }\n }\n return this;\n }", "private boolean isProgramHeader() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\t// Check if current token matches given syntax.\n\t\tif(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\t// Update scope key.\n\t\t\ttheSymbolTable.AddToScopeKey(theCurrentToken.TokenValue);\n\t\t\ttheTranslator = new Translator(theCurrentToken.TokenValue);\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(theCurrentToken.TokenType == TokenType.IS)\n\t\t\t{\n\t\t\t\t// Update current symbol line number to be end of header. Header of program is position 0 (always).\n\t\t\t\ttheSymbolTable.CURR_SYMBOL.setLineNumber(theCurrentToken.TokenLineNumber);\n\t\t\t\t\n\t\t\t\t// Put symbol in table.\n\t\t\t\ttheTranslator.AddHeaderStrings(\"define i32 @main() {\");\n\t\t\t\ttheSymbolTable.PutSymbolInTable();\n\t\t\t\tisValid = true;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttheLogger.LogParseError(theCurrentToken);\n\t\t}\n\t\telse\n\t\t\ttheLogger.LogParseError(theCurrentToken);\n\t\treturn isValid;\n\t}", "private static void displayHeaders( float t ) {\n\t\t/** Traverse the list of all outputs and display their\n\t\t * names and then scheduling the first output display event.\n\t\t * All names are output in a 5-space field.\n\t\t * Following the headers, display the associated values.\n\t\t */\n\t\tfor (Output o: outputList) {\n\t\t\tString n = o.name;\n\n\t\t\t// long names must be truncated\n\t\t\tif (n.length() > 4) {\n\t\t\t\tn = n.substring( 0, 4 );\n\t\t\t}\n\n\t\t\t// output leading blank\n\t\t\tSystem.out.append( ' ' );\n\n\t\t\t// output edited name\n\t\t\tSystem.out.append( n );\n\n\t\t\t// output padding up to next column\n\t\t\tif (n.length() < 4) {\n\t\t\t\tSystem.out.append(\n\t\t\t\t\t\" \".substring( 0, 4 - n.length() )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\n\t\t// headers preceed first output of values\n\t\tdisplayOutput( t );\n\t}", "boolean isAutomaticHeaderImageEnabled();", "public void setWriteHeader(boolean writeHeader) {\n this.writeHeader = writeHeader;\n }", "PageHeader getPageHeader();", "PageHeader getPageHeader();", "private boolean isChildHeader(List<String> row) {\n\t\tif(row.get(4).isEmpty()&&!row.get(5).isEmpty()&&row.get(6).isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "private boolean isProcedureHeader() throws IOException\n\t{\n\t\t// Initialize return value to false.\n\t\tboolean isValid = false;\n\t\tSymbol aSymbol = new Symbol();\n\t\t\n\t\tif(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\ttheSymbolTable.AddToScopeKey(theCurrentToken.TokenValue);\n\t\t\ttheSymbolTable.CURR_SYMBOL.setLineNumber(theCurrentToken.TokenLineNumber);\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(theCurrentToken.TokenType == TokenType.LEFT_PARENTHESIS)\n\t\t\t{\n\t\t\t\tif(theNextToken.TokenType != TokenType.RIGHT_PARENTHESIS)\n\t\t\t\t{\n\t\t\t\t\tupdateToken();\n\t\t\t\t\tif(isParameterList())\n\t\t\t\t\t{\n\t\t\t\t\t\tupdateToken();\n\t\t\t\t\t\tif(theCurrentToken.TokenType == TokenType.RIGHT_PARENTHESIS)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\ttheSymbolTable.CreateSymbolsForProcedureParameters();\n\t\t\t\t\t\t\taSymbol = theSymbolTable.CURR_SYMBOL;\n\t\t\t\t\t\t\ttheSymbolTable.PutSymbolInTable();\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tupdateToken();\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TODO: Revisit.\n\t\t\t\ttheTranslator.HoldIncompleteData();\n\t\t\t\ttheTranslator.ProcedureDeclarationBuilder(theSymbolTable.ReturnScopeKeyForTranslation(), aSymbol);\n\t\t\t\t// TODO: add parameters to proc body.\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "public boolean getShowHeaderRowBottomLine() {\n return config.showHeaderRowBottomLine;\n }", "static public String generateHeaderAndBodyLineForPrinting(Imprimable imprimable)\r\n\t{\r\n\t\tStringBuffer buf = new StringBuffer();\r\n\t\t\r\n\t\tbuf.append(\"<!DOCTYPE html>\");\r\n\t\tbuf.append(\"<html>\");\r\n\t\tbuf.append(\"<head>\");\r\n\t\tbuf.append(\"<meta charset=\\\"utf-8\\\">\");\r\n\t\tbuf.append(\"<title></title>\");\r\n\t\tbuf.append(\"</head>\");\r\n\t\tbuf.append(generateBodyLineForPrinting(imprimable));\r\n\t\t\r\n\t\treturn buf.toString();\r\n\t}", "public void createDisplayHeader()\r\n\t{\r\n\t\tboolean isEType;\r\n\t\tint currentK, lowestJValue, highestJValue;\r\n\r\n\t\t// redundant now\r\n\t\tisEType = getIsEType();\r\n\t\tcurrentK = getCurrentK();\r\n\t\tlowestJValue = getLowestJValue();\r\n\t\thighestJValue = getHighestJValue();\r\n\r\n\t\tString symmetry;\r\n\t\tString kOutput;\r\n\r\n\t\tif (isEType) {\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput = currentK + \"\";\r\n\t\t\t\tsymmetry = \"E1\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\t\tsymmetry = \"E2\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\tsymmetry = \"A\";\r\n\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput += \"+\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput += \"-\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ls = System.lineSeparator();\r\n\t\tmainHeader = \"================================================================\"\r\n\t\t\t\t+ ls + \"Symmetry type:\\t\\t\\t\\t\\t\" + symmetry + ls\r\n\t\t\t\t+ \"The K of the lower energy is:\\t\\t\\t\" + kOutput + ls + \"The input \"\r\n\t\t\t\t+ INPUT_BRANCH_TYPE + \" branch was flipped:\\t\\t\\t\" + inputIsFlipped + ls\r\n\t\t\t\t+ \"The input \" + INPUT_BRANCH_TYPE + \" branch used a J range of:\\t\\t\"\r\n\t\t\t\t+ lowestJValue + \" to \" + highestJValue\r\n\t\t\t\t+ ls + ls + \"Results for these selections are...\" + ls;\r\n\r\n\t\tsetHeaderDisplayState(true);\r\n\t}", "public void setHeaderFlag(boolean flag) {\n configuration.put(ConfigTag.HEADER, flag);\n }", "protected String getPageHeader()\n {\n if (this.pageHeader == null) {\n String title = (this.privateLabel != null)? this.privateLabel.getPageTitle() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<span style='font-size:14pt;'><b>\" + title + \"</b></span>\");\n sb.append(\"<hr>\");\n sb.append(\"</center>\");\n this.pageHeader = sb.toString();\n }\n return this.pageHeader;\n }", "@Test\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }" ]
[ "0.73915154", "0.73898417", "0.7230033", "0.72163385", "0.72031516", "0.7119589", "0.70002925", "0.6914207", "0.6881897", "0.6850722", "0.67292094", "0.67292094", "0.67292094", "0.67208177", "0.6714601", "0.6643221", "0.6567903", "0.6492801", "0.6461452", "0.64490104", "0.6442807", "0.64403915", "0.638474", "0.63349307", "0.63254946", "0.6263635", "0.6249353", "0.62296855", "0.6185371", "0.6163356", "0.6159083", "0.6148354", "0.6134798", "0.6128274", "0.6121904", "0.61099637", "0.61099637", "0.6108013", "0.61029464", "0.6095154", "0.60915196", "0.60373837", "0.60300744", "0.6028811", "0.60213274", "0.60198045", "0.5937523", "0.59341764", "0.59238946", "0.59174186", "0.5907198", "0.5906017", "0.58931774", "0.58728176", "0.5856052", "0.5850734", "0.58488196", "0.58428687", "0.58284146", "0.5794293", "0.5764816", "0.57622755", "0.57552296", "0.5740972", "0.5738508", "0.5725641", "0.5687652", "0.5686821", "0.5676438", "0.56701463", "0.5666543", "0.56635827", "0.5660675", "0.5637692", "0.5631442", "0.56206256", "0.56017643", "0.55922365", "0.5587741", "0.5583743", "0.5579394", "0.55749786", "0.5568097", "0.553945", "0.55337167", "0.5527103", "0.55261534", "0.5522041", "0.55218863", "0.55109304", "0.55109304", "0.5506391", "0.54997534", "0.54956424", "0.54937804", "0.5485663", "0.54844457", "0.54746765", "0.54486614", "0.54468924" ]
0.8380298
0
Set whether to print header
public void setPrintHeader(boolean printHeader) { this.printHeader = printHeader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPrintHeader()\n\t{\n\t\treturn printHeader;\n\t}", "public void setHeader(boolean isHeader) {\n this.isHeader = isHeader;\n }", "public void setHeaderFlag(boolean flag) {\n configuration.put(ConfigTag.HEADER, flag);\n }", "private void printHeader () {\n System.out.println(\"COMPLETED HEADER PARSING\");\n System.out.println(\"________________________\");\n for(String header : parseTableHeader.keySet()) {\n System.out.print(header);\n System.out.println(parseTableHeader.get(header));\n }\n }", "@attribute(value = \"\", required = false, defaultValue = \"default value is false\")\r\n\tpublic void setHeader(Boolean isHeader) {\r\n\t\tthis.header = isHeader;\r\n\t}", "public void setWriteHeader(boolean writeHeader) {\n this.writeHeader = writeHeader;\n }", "@Override\n public boolean getDisplayHeaders() {\n return displayHeaders;\n }", "private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }", "public void forceNotInsideHeader() {\n insideHeader = false;\n }", "public void setPageHeader(String header)\n {\n // ignore\n }", "public final void setUseReporting(final boolean cuseHeader) {\n\t\tthis.useHeader = cuseHeader;\n\t}", "protected void writeHeader(PrintStream wps, List listColumn, char cDelim)\n {\n String sData;\n int c = 0;\n for (Iterator iCol = listColumn.iterator(); iCol.hasNext(); )\n {\n ReportColumnView columnView = (ReportColumnView) iCol.next();\n if (columnView != null)\n {\n if (columnView.isVisible())\n {\n if (c != 0)\n {\n wps.print(cDelim);\n }\n c++;\n Object oResult = columnView.getHeader();\n sData = oResult == null ? \"\" : oResult.toString();\n wps.print(sData);\n }\n }\n }\n wps.println();\n // without this line sometimes the header is not printed correctly.\n wps.flush();\n }", "public boolean isHeader() {\n return isHeader;\n }", "boolean isSetHeader();", "private static void outputHeaderMainPage(SimpleWriter out) {\n out.print(\"<html>\\n\" + \"<head>\\n\" + \"\\t<title>\" + \"Index\" + \"</title>\\n\"\n + \"<font size = '10' >\" + \"Glossary Homepage\" + \"</font>\"\n + \"</head>\\n\" + \"<body>\\n\" + \"<head>\\n\" + \"\\t<h1>\\n\"\n + \"<font size = '6' >\" + \"Index\" + \"</font>\" + \"\\t</h1>\\n\"\n + \"</head>\\n\" + \"</body>\\n\" + \"</html>\");\n }", "protected void write_output_header() {\t\t\n\t\tSystem.out.println(\" H Lennard-Jones lattice-switch monte carlo code: hcp v fcc:\");\n\t\tSystem.out.println(\" H \");\n\t\t// Write out the standard parts of the LSMC header:\n\t\tsuper.write_output_header();\n\t\t// Write out LJLS-specific section:\n\t\tSystem.out.println(\" H For the Lennard-Jones Lattice-Switch: \");\n\t\tSystem.out.print(\" H lj_eta = 4*beta = +\"+lj_eta+\"\\n\");\n\t\tif( VIRT_NSWC == 1 ) {\n\t\t\tSystem.out.println(\" H VIRTUAL n-switch, structure \"+INIT_PHASE+\", en_shift = \"+EN_SHIFT);\n\t\t}\n\t\t\n\t\t// Optionally output E v. density:\n\t\tif( OUTPUT_E_V_DENSITY ) calc_e_v_dens();\n\n\t}", "public void\nprintHir( String pHeader );", "public void setHeader() {\n tvHeader.setText(getResources().getString(R.string.text_skill));\n tvDots.setVisibility(View.INVISIBLE);\n }", "public void setHeader(String header) {\n this.header = header;\n }", "public boolean getHeader() {\n return isHeader;\n }", "private void printHeading()\n {\n System.out.println(\"==============================================\");\n System.out.println(\" Stock Management Application \");\n System.out.println(\" App05: by Haroon Sadiq \");\n System.out.println(\"==============================================\");\n }", "public void setColumnHeaderVisible(boolean show) {\n\t\ttableViewer.getTable().setHeaderVisible(show);\n\t}", "public boolean isHeader() {\n\t \treturn this == HEADER;\n\t }", "abstract void setHeaderPadding(boolean headerPadding);", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t}", "public static void printHeader(){\n System.out.println(\"\" +\n \"AuthorCode Number: 879P \\n\" +\n \"Class: CS 342, Fall 2016 \\n\" +\n \"Program: #3, 8 Tiles. \\n\" +\n \"\\n\" +\n \"\\n\" +\n \"Welcome to the 8-tiles puzzle. \\n\" +\n \"Place the tiles in ascending numerical order. For each \\n\" +\n \"move enter the piece to be moved into the blank square, \\n\" +\n \"or 0 to exit the program.\\n\");\n }", "public void setHeader(String header) {\n\t\t_header = header;\n\t}", "public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t\tthis.handleConfig(\"header\", header);\n\t}", "public void showHeader(boolean show) {\n\t\tif (show) {\n\t\t\tscroll.setOffset(0, 0);\n\t\t} else {\n\t\t\tscroll.setOffset(0, -header.getHeight());\n\t\t}\n\n\t}", "private static void printReportHeader(String name, String domain, String license, int fiscalYear) {\r\n\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tCompany name: \" + name);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tDomain: \" + domain);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tLicense: \" + license);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tFiscal Year: \" + fiscalYear);\r\n System.out.println(\"\\n\");\r\n System.out.println(\"\\t\\t\\t\\t\\t\\t\\tProfit Report\\n\\n\");\r\n String format = \"%-15s %-15s %15s %15s %15s %15s %20s\";\r\n System.out.format(format,\"Branch ID\", \"Location\", \"Quarter 1\", \"Quarter 2\",\r\n \"Quarter 3\", \"Quarter 4\", \"Annual Profit\");\r\n printSeparatorLine();\r\n }", "public void writeHeader(PrintWriter out, RequestProperties reqState)\n throws IOException\n {\n out.write(this.getPageHeader());\n }", "abstract public void header();", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is empty, write a new one (what else???)\n writeHeader();\n } \n */ \n readHeader();\n }", "public boolean hasHeader() {\n return hasHeader;\n }", "private static String header() {\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "default boolean hasHeader() {\n return true;\n }", "public void setHeader(String _header) {\n\t\tthis.header = _header;\n\t}", "private static void printHeader(StringBuffer out, String[] header,\n\t\t\tint[] colWidths, String left, String sep) {\n\t\tStringBuffer bf = new StringBuffer(120);\n\n\t\t// Left mark\n\t\tbf.append(left);\n\n\t\tfor (int i = 0; i < header.length; i++) {\n\t\t\tString s = header[i];\n\t\t\tbf.append(s);\n\n\t\t\tfor (int j = 0; j < colWidths[i] - s.length(); j++)\n\t\t\t\tbf.append(' ');\n\n\t\t\tbf.append(sep);\n\t\t}\n\n\t\tout.append(bf + \"\\n\");\n\t}", "public static void header(String s) {\n\t\t// header2.set(s);\n\t}", "public abstract boolean isFirstLineHeader();", "void setPageHeader(PageHeader pageHeader);", "void setPageHeader(PageHeader pageHeader);", "@Override\n\tprotected String getHeaderTitle() {\n\t\treturn \"\";\n\t}", "public void printHeaderInfo(String className) {\n outFile.println(\"// Declarations for \" + className);\n outFile.println(\n \"// Declarations written by Chicory \" + LocalDateTime.now(ZoneId.systemDefault()));\n outFile.println();\n\n // Determine comparability string\n String comparability = \"none\";\n if (Runtime.comp_info != null) {\n comparability = \"implicit\";\n }\n outFile.printf(\"decl-version 2.0%n\");\n outFile.printf(\"var-comparability %s%n%n\", comparability);\n }", "boolean hasHeader();", "public void writeHeader(ReporterIonQuantification reporterIonQuantification) throws IOException {\r\n\r\n boolean needSecondLine = false;\r\n ArrayList<String> sampleIndexes = new ArrayList<>(reporterIonQuantification.getSampleIndexes());\r\n Collections.sort(sampleIndexes);\r\n\r\n boolean firstColumn = true;\r\n\r\n if (indexes) {\r\n writer.writeHeaderText(\"\");\r\n writer.addSeparator();\r\n }\r\n\r\n for (ExportFeature exportFeature : identificationFeatures) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.addSeparator();\r\n }\r\n\r\n writer.writeHeaderText(exportFeature.getTitle());\r\n }\r\n\r\n for (ReporterExportFeature exportFeature : quantificationFeatures) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.addSeparator();\r\n }\r\n\r\n writer.writeHeaderText(exportFeature.getTitle(), reporterStyle);\r\n\r\n if (exportFeature.hasChannels()) {\r\n\r\n for (int i = 1; i < sampleIndexes.size(); i++) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.addSeparator();\r\n }\r\n\r\n writer.writeHeaderText(\" \", reporterStyle); // Space used for the excel style\r\n }\r\n\r\n needSecondLine = true;\r\n\r\n }\r\n\r\n }\r\n\r\n if (needSecondLine) {\r\n\r\n writer.newLine();\r\n firstColumn = true;\r\n\r\n if (indexes) {\r\n writer.addSeparator();\r\n }\r\n\r\n for (ExportFeature exportFeature : identificationFeatures) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.writeHeaderText(\"\");\r\n writer.addSeparator();\r\n }\r\n\r\n }\r\n\r\n for (ReporterExportFeature exportFeature : quantificationFeatures) {\r\n\r\n if (exportFeature.hasChannels()) {\r\n\r\n for (String sampleIndex : sampleIndexes) {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.writeHeaderText(\"\", reporterStyle);\r\n writer.addSeparator();\r\n }\r\n\r\n writer.write(reporterIonQuantification.getSample(sampleIndex), reporterStyle);\r\n\r\n }\r\n\r\n } else {\r\n\r\n if (firstColumn) {\r\n firstColumn = false;\r\n } else {\r\n writer.writeHeaderText(\"\", reporterStyle);\r\n writer.addSeparator();\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n writer.newLine();\r\n }", "private static void printHeading(){\n\t\tSystem.out.println(\"Your Name\");\n\t\tSystem.out.println(\"Course name and semester\");\n\t\tSystem.out.println(\"Programming Project 1\");\n\t\tSystem.out.println(\"Your Name in Code\");\n\t\tSystem.out.println();\n\n\t}", "public static void printHeader(int homework, double project, String lastModified)\n {\n System.out.println(header(homework, project, lastModified));\n }", "public static void printHeader(int homework, String lastModified) \n\t{\n\t\tSystem.out.println(\"/********************************************\");\n\t\tSystem.out.println(\"* AUTHOR: \" + NAME);\n\t\tSystem.out.println(\"* COURSE: \" + COURSE);\n\t\tSystem.out.println(\"* SECTION: \" + SECTION);\n\t\tSystem.out.println(\"* HOMEWORK #: \" + homework);\n\t\tSystem.out.println(\"* LAST MODIFIED: \" + lastModified);\n\t\tSystem.out.println(\"********************************************/\");\n\t}", "static void printHeader(String fn, PrintWriter out) throws IOException\n{\n\t@SuppressWarnings(\"resource\")\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0) continue;\n\t\tif(line.charAt(0) == '#') out.println(line);\n\t\telse break;\n\t}\n}", "private static void displayHeaders( float t ) {\n\t\t/** Traverse the list of all outputs and display their\n\t\t * names and then scheduling the first output display event.\n\t\t * All names are output in a 5-space field.\n\t\t * Following the headers, display the associated values.\n\t\t */\n\t\tfor (Output o: outputList) {\n\t\t\tString n = o.name;\n\n\t\t\t// long names must be truncated\n\t\t\tif (n.length() > 4) {\n\t\t\t\tn = n.substring( 0, 4 );\n\t\t\t}\n\n\t\t\t// output leading blank\n\t\t\tSystem.out.append( ' ' );\n\n\t\t\t// output edited name\n\t\t\tSystem.out.append( n );\n\n\t\t\t// output padding up to next column\n\t\t\tif (n.length() < 4) {\n\t\t\t\tSystem.out.append(\n\t\t\t\t\t\" \".substring( 0, 4 - n.length() )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\n\t\t// headers preceed first output of values\n\t\tdisplayOutput( t );\n\t}", "public static void printHeader(int labNum, int quesNum){\n System.out.println(\"****************************************\");\n System.out.println(\"\\tKanav Gupta\");\n System.out.printf(\"\\tLab #%s Question #%s%n\",labNum,quesNum);\n System.out.println(\"****************************************\\n\");\n }", "void displayColumnHeaders() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"|col \" + j);\n\t\tSystem.out.println();\n\t}", "protected void updateHeader() {\n\t}", "public static void printHeader(int homework, String homeworkDescription, \n double project, String projectDescription, String lastModified)\n {\n System.out.println(header(homework, homeworkDescription, project, \n projectDescription, lastModified));\n }", "private static void outputHeader(XMLTree channel, SimpleWriter out) {\n assert channel != null : \"Violation of: channel is not null\";\n assert out != null : \"Violation of: out is not null\";\n assert channel.isTag() && channel.label().equals(\"channel\") : \"\"\n + \"Violation of: the label root of channel is a <channel> tag\";\n assert out.isOpen() : \"Violation of: out.is_open\";\n\n int start = 0;\n int titleIndex = getChildElement(channel, \"title\");\n int descriptionIndex = getChildElement(channel, \"description\");\n int itemIndex = getChildElement(channel, \"item\");\n int linkIndex = getChildElement(channel, \"link\");\n \n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n // if there's no title print that\n\t\tif(channel.child(titleIndex).numberOfChildren() == 0)\n\t\t{\n\t\t\tout.println(\"<head>\");\n\t\t\tout.println(\"<title> Empty Title </title>\");\n\t\t\tout.println(\"<a href=\" + channel.child(linkIndex).child(0) + \"><h1>\" + channel.child(titleIndex).child(0) + \"</h1>\");\n\t\t\tout.println(\"</head>\");\n\t\t}\n\t\t// else print title\n\t\telse\n\t\t{\n\t\t\tout.println(\"<head>\");\n\t\t\tout.println(\"<title>\" + channel.child(titleIndex).child(0) + \"</title>\");\n \t\tout.println(\"<a href=\\\"\" + channel.child(linkIndex).child(0) +\"\\\"><h1> \" + channel.child(titleIndex).child(0) + \"</h1></a>\");\n \t\tout.println(\"</head>\");\n\t\t}\n\t\t\n\t\t// if no description\n\t\tif(channel.child(descriptionIndex).numberOfChildren() == 0)\n\t\t{\n\t\t\tout.println(\"<p>\");\n\t\t\tout.println(\"No description\");\n\t\t\tout.println(\"</p>\");\n\t\t}\n\t\t// else print description\n\t\telse\n\t\t{\n\t\t\tout.println(\"<p>\");\n\t\t\tout.println(channel.child(descriptionIndex).child(0));\n\t\t\tout.println(\"</p>\");\n\t\t} \n\t\t\n\t\t// print out basic setup for the table\n\t\tout.println(\"<table border=\\\"1\\\">\");\n\t\tout.println(\"<tr>\");\n \tout.println(\"<th>Date</th>\");\n \tout.println(\"<th>Source</th>\");\n \tout.println(\"<th>News</th>\");\n \tout.println(\"</tr>\");\n \t\n \tfor(int i = 0; i < channel.numberOfChildren() - itemIndex; i++)\n \t{\n \t\tprocessItem(channel.child(itemIndex + i), out);\n \t}\n }", "private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}", "void setHeader(java.lang.String header);", "public void createDisplayHeader()\r\n\t{\r\n\t\tboolean isEType;\r\n\t\tint currentK, lowestJValue, highestJValue;\r\n\r\n\t\t// redundant now\r\n\t\tisEType = getIsEType();\r\n\t\tcurrentK = getCurrentK();\r\n\t\tlowestJValue = getLowestJValue();\r\n\t\thighestJValue = getHighestJValue();\r\n\r\n\t\tString symmetry;\r\n\t\tString kOutput;\r\n\r\n\t\tif (isEType) {\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput = currentK + \"\";\r\n\t\t\t\tsymmetry = \"E1\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\t\tsymmetry = \"E2\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\tsymmetry = \"A\";\r\n\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput += \"+\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput += \"-\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ls = System.lineSeparator();\r\n\t\tmainHeader = \"================================================================\"\r\n\t\t\t\t+ ls + \"Symmetry type:\\t\\t\\t\\t\\t\" + symmetry + ls\r\n\t\t\t\t+ \"The K of the lower energy is:\\t\\t\\t\" + kOutput + ls + \"The input \"\r\n\t\t\t\t+ INPUT_BRANCH_TYPE + \" branch was flipped:\\t\\t\\t\" + inputIsFlipped + ls\r\n\t\t\t\t+ \"The input \" + INPUT_BRANCH_TYPE + \" branch used a J range of:\\t\\t\"\r\n\t\t\t\t+ lowestJValue + \" to \" + highestJValue\r\n\t\t\t\t+ ls + ls + \"Results for these selections are...\" + ls;\r\n\r\n\t\tsetHeaderDisplayState(true);\r\n\t}", "private void writeHeaders(final DataOutput out) throws IOException {\n for (final Map.Entry<String, List<String>> entry : headers.entrySet()) {\n if (entry.getValue().size() == 1) {\n writeHeader(out, entry.getKey(), entry.getValue().get(0));\n } else if (entry.getValue().size() > 1) {\n for (final String val : entry.getValue()) {\n writeHeader(out, entry.getKey(), val);\n }\n }\n }\n }", "protected void setHeadFlag(boolean headFlag) {\n this.headFlag = headFlag;\n }", "public void displayHeader(AbstractAccount theAccount, LocalDate theDay) { \n mySB.delete(0, mySB.length());\n mySB.append(Main.LINE_BREAK);\n mySB.append(\"Urban Parks | \");\n mySB.append(theDay.getMonthValue());\n mySB.append(\"/\");\n mySB.append(theDay.getDayOfMonth());\n mySB.append(\"/\");\n mySB.append(theDay.getYear());\n mySB.append(Main.LINE_BREAK);\n mySB.append(\"Welcome \");\n mySB.append(theAccount.getRealName());\n mySB.append(\" (\");\n mySB.append(theAccount.AccountType());\n mySB.append(')');\n mySB.append(Main.LINE_BREAK);\n mySB.append(\"-----------------------------------------------------------------\");\n mySB.append(Main.LINE_BREAK);\n System.out.print(mySB.toString());\n }", "protected void header(String s, boolean beforeLabel) {\n if (beforeLabel)\n System.out.println(\"before array: \" + s);\n else System.out.println(\"after array: \" + s);\n }", "public final void setTableHeader() {\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.date\"));\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.percent.solved\"));\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.log.type\"));\n }", "@Override\n\tpublic synchronized boolean writeHeader() {\n\t\tif(!trailerWritten) \n\t\t{\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tsuper.writeHeader();\n\t\t\tlong diff = System.currentTimeMillis() - startTime;\n\t\t\tlogger.info(\"write header takes {} for rtmp:{}\", diff, getOutputURL());\n\t\t\t\n\t\t\theaderWritten = true;\n\t\t\tsetStatus(IAntMediaStreamHandler.BROADCAST_STATUS_BROADCASTING);\n\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tlogger.warn(\"Trying to write header after writing trailer\");\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean writeHeader(OutputStream param1) {\n }", "public void setHeaderText(String headerText) {\n this.headerText = headerText;\n }", "public void setupDataTableHeader() {\r\n\t\tif (this.dataTableTabItem != null && !this.dataTableTabItem.isDisposed()) this.dataTableTabItem.setHeader();\r\n\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "public void printDNSHeader()\n {\n // id should be unsigned\n int idInInt = (this.id & 0xffff);\n System.out.println(\"Header id: \" + idInInt\n + \" flag: \" + String.format(\"0x%04X\", this.flag));\n System.out.println(\"question#: \" + this.questionCount\n + \" answer#: \" + this.answerCount);\n System.out.println(\"authority#: \" + this.nameServerCount\n + \" addition#: \" + this.additionalFullRRCount);\n System.out.println(\" \"); // leave a blank line.\n\n }", "private void insertHeader(StringBuilder sb) {\n String id = \"ID\";\n String name = \"Name\";\n String objects = \"Objects collected\";\n sb.append(id);\n insertSpacing(sb, id);\n sb.append(name);\n insertSpacing(sb, name);\n sb.append(objects);\n insertSpacing(sb, objects);\n sb.append(NEWLINE);\n sb.append(\"---------------------------------------------------------------\");\n sb.append(NEWLINE);\n }", "public boolean skipHeader() {\n return skipHeader;\n }", "void xsetHeader(org.apache.xmlbeans.XmlString header);", "private ConfigurationHTMLPrinter doHeaderRow() {\n println(\"<tr>\").incrementIndent();\n doHeaderCell(\"Name\");\n doHeaderCell(\"Default value\");\n doHeaderCell(\"Aliases\");\n doHeaderCell(\"Value type\");\n doHeaderCell(\"Description\");\n return decrementIndent().println(\"</tr>\");\n }", "@Override\r\n public void display(PrintWriter out) {\r\n if (this.nrBasic > 0) {\r\n out.println(\"Basic\");\r\n } else {\r\n super.display(out);\r\n }\r\n }", "public void createHeader() {\n\t\tHBox box = new HBox();\n\t\tButton printBtn = new Button(\"Print\");\n\t\tprintBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton printAllBtn = new Button(\"Print allemaal\");\n\t\tprintAllBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton cancelBtn = new Button(\"Annuleer\");\n\t\tcancelBtn.getStyleClass().addAll(\"btn\", \"btn-danger\");\n\t\tbox.getChildren().addAll(createTitle(), printBtn, printAllBtn, cancelBtn);\n\t\t\n\t\tprintBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printSelected(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tprintAllBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printAll(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tcancelBtn.setOnAction(e -> {\n\t\t\tprintController.cancel();\n\t\t});\n\t\t\n\t\tsetTop(box);\n\t}", "protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }", "@Override\n public void setHeaderIndices() {\n }", "public void setHeaderLabel() {\n\t\t\tlblGameBoard\n\t\t\t\t\t.setText(LABEL);\n\t}", "void setHeaderMargin(double headermargin);", "private void emitHeader(OutputStream stream) throws IOException {\n int header = 0x0;\n header |= WORKBUF_PROTOCOL_VERSION;\n stream.write(TfWorkbufProtocol.intToFourBytes(header));\n }", "protected void writeHeaderMessage( String headerMessage ) {\r\n\t\tPrintWriter writer = new PrintWriter( outStream, true );\r\n\t\twriter.println( headerMessage );\r\n\t}", "void printList() {\n Entry<T> node = header;\n while(node!=null){\n System.out.print(node.element+\" \");\n node = node.next;\n }\n }", "public void addHeaderField(String name, String value) {\n writer.append(name + \": \" + value).append(LINE_FEED);\n writer.flush();\n }", "public void addHeaderField(String name, String value) {\n writer.append(name + \": \" + value).append(LINE_FEED);\n writer.flush();\n }", "public void addHeaderField(String name, String value) {\n writer.append(name + \": \" + value).append(LINE_FEED);\n writer.flush();\n }", "public void setColumnName(Vector header) {\r\n numberOfcolumns = header.size();\r\n columnNames = header;\r\n /**\r\n * create new column to handle status of row. You can hide or visible it by comment or not the line code follow.\r\n */\r\n //columnNames.add(\"RecordStatus\");\r\n }", "@Override\n public void setHeader(String arg0, String arg1) {\n\n }", "private static String headerSummary() {\r\n\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\usepackage{rotating}\\n\";\r\n output += \"\\\\usepackage{textcomp}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "public final boolean isUseReporting() {\n\t\treturn useHeader;\n\t}", "public void start() {\n \tupdateHeader();\n }", "private void resetHeaderSmoothly() {\n if (null != mViewHandler) {\n isChanging = true;\n Message message = new Message();\n message.what = ViewHandler.SMOOTH_CHANGE_START;\n message.arg1 = ViewHandler.SMOOTH_TYPE_HEADER;\n mViewHandler.sendMessage(message);\n } else\n resetHeaderState();\n }", "static void headerFormat(FileWriter fw) throws IOException { \r\n\t\t//fw.append(\"\\n\");\r\n\t\tfw.append(\"levelId\");\r\n fw.append(',');\r\n fw.append(\"rideName\");\r\n fw.append(',');\r\n fw.append(\"ridestartEndLocation\");\r\n fw.append(',');\r\n fw.append(\"rideData\");\r\n fw.append('\\n');\r\n\t}", "void setHeader(String headerName, String headerValue);", "@Override\n protected void bindSectionHeader(View view, int position, boolean displaySectionHeader) {\n if (displaySectionHeader) {\n view.findViewById(R.id.section_header).setVisibility(View.VISIBLE);\n TextView lSectionTitle = (TextView) view.findViewById(R.id.section_header);\n lSectionTitle.setText(\"\" + getSections()[getSectionForPosition(position)]);\n } else {\n view.findViewById(R.id.section_header).setVisibility(View.GONE);\n }\n }", "public void buildClassHeader() {\n\t\tString key;\n\t\tif (isInterface) {\n\t\t\tkey = \"doclet.Interface\";\n\t\t} else if (isEnum) {\n\t\t\tkey = \"doclet.Enum\";\n\t\t} else {\n\t\t\tkey = \"doclet.Class\";\n\t\t}\n\n\t\twriter.writeHeader(configuration.getText(key) + \" \" + classDoc.name());\n\t}", "public static void printTableStatusHeader() {\n\t\tSystem.out.println(\"Table availability status:\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "private void initializeKnownHeaders() {\r\n needParceHeader = true;\r\n \r\n addMainHeader(\"city\", getPossibleHeaders(DataLoadPreferences.NH_CITY));\r\n addMainHeader(\"msc\", getPossibleHeaders(DataLoadPreferences.NH_MSC));\r\n addMainHeader(\"bsc\", getPossibleHeaders(DataLoadPreferences.NH_BSC));\r\n addMainIdentityHeader(\"site\", getPossibleHeaders(DataLoadPreferences.NH_SITE));\r\n addMainIdentityHeader(\"sector\", getPossibleHeaders(DataLoadPreferences.NH_SECTOR));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_CI, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_CI));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_LAC, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_LAC));\r\n addMainHeader(INeoConstants.PROPERTY_LAT_NAME, getPossibleHeaders(DataLoadPreferences.NH_LATITUDE));\r\n addMainHeader(INeoConstants.PROPERTY_LON_NAME, getPossibleHeaders(DataLoadPreferences.NH_LONGITUDE));\r\n // Stop statistics collection for properties we will not save to the sector\r\n addNonDataHeaders(1, mainHeaders);\r\n \r\n // force String types on some risky headers (sometimes these look like integers)\r\n useMapper(1, \"site\", new StringMapper());\r\n useMapper(1, \"sector\", new StringMapper());\r\n \r\n // Known headers that are sector data properties\r\n addKnownHeader(1, \"beamwidth\", getPossibleHeaders(DataLoadPreferences.NH_BEAMWIDTH), false);\r\n addKnownHeader(1, \"azimuth\", getPossibleHeaders(DataLoadPreferences.NH_AZIMUTH), false);\r\n }" ]
[ "0.7611861", "0.7535222", "0.7023996", "0.6974855", "0.6869734", "0.68034464", "0.6741995", "0.66521597", "0.65666085", "0.6458079", "0.6374829", "0.6311062", "0.626263", "0.62496275", "0.62132186", "0.6158358", "0.6142255", "0.61245686", "0.61203414", "0.6112204", "0.6108453", "0.6103391", "0.6092237", "0.60791653", "0.6043545", "0.60335636", "0.6018216", "0.6000455", "0.5979882", "0.5975682", "0.5963491", "0.59546137", "0.59183425", "0.5915463", "0.5894223", "0.58852273", "0.5884379", "0.58731997", "0.58534163", "0.58510214", "0.5833907", "0.5817727", "0.58154804", "0.58154804", "0.5809412", "0.5805688", "0.5799299", "0.57946485", "0.57910323", "0.57812876", "0.5774671", "0.5752851", "0.57411295", "0.5733856", "0.57244855", "0.5711381", "0.57018477", "0.5688633", "0.568769", "0.56717724", "0.56512976", "0.56387407", "0.56351334", "0.5627886", "0.56261355", "0.56167704", "0.56113815", "0.5602418", "0.55998933", "0.5575711", "0.5573372", "0.5573001", "0.5572958", "0.55625135", "0.55430204", "0.5539357", "0.5538973", "0.55354106", "0.55235785", "0.55228096", "0.55055594", "0.5499442", "0.5497018", "0.5496484", "0.5492674", "0.54875183", "0.54875183", "0.54875183", "0.5483187", "0.54805815", "0.5475383", "0.54516006", "0.5451268", "0.5448598", "0.5445539", "0.5438889", "0.5434356", "0.54224956", "0.54220325", "0.54014826" ]
0.8311318
0
Determine whether to print hidden fields (as per field's visible property)
public boolean isPrintHiddenFields() { return printHiddenFields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrintHiddenFields(boolean printHiddenFields)\n\t{\n\t\tthis.printHiddenFields = printHiddenFields;\n\t}", "public boolean isHideFields() {\n\t\treturn hideFields;\n\t}", "public boolean isHidden();", "public boolean isHidden() {\n\t\treturn false;\n\t}", "public boolean isHidden() {\n return false;\n }", "public boolean isHidden() {\r\n return hidden;\r\n }", "@Override\n public boolean isVisible(Field field) {\n return true;\n }", "public boolean isLabeledFieldEmptyOrHidden() {\n return labeledFieldEmptyOrHidden;\n }", "public Boolean isHidden() {\n return m_hidden;\n }", "public final boolean isHidden() {\n\t\treturn m_info.isHidden();\n\t}", "public boolean isHiddenAttribute() {\n return hiddenAttribute;\n }", "boolean isHiddenFromList();", "private boolean visibles() {\r\n return OPT(GO() && visible() && visibles());\r\n }", "public boolean isShowHidden() {\n\t\treturn showHidden;\n\t}", "public Expression getHiddenField() {\n\t\treturn hiddenField;\n\t}", "public boolean visible_SOPField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_SOP_txtBx);\r\n\t}", "public boolean isShowHidden() {\n\t\t\treturn showHidden;\n\t\t}", "@attribute(value = \"\", required = false)\t\r\n\tpublic void setPrintFieldValue(Boolean printFieldValue) {\r\n\t\tthis.printFieldValue = printFieldValue;\r\n\t}", "public boolean getVisible() {\n\t\treturn visible;\n\t}", "public boolean getVisible() {\n\t\treturn visible;\n\t}", "public boolean isHidden() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"isHidden()\");\n Via via=(Via)sipHeader;\n return via.isHidden();\n }", "public void setHidden(boolean value) {\r\n this.hidden = value;\r\n }", "public boolean onlyVisible()\n\t{\n\t\treturn visible;\n\t}", "public boolean getIsIshidden() {\n return ishidden;\n }", "public boolean shouldHide() {\n\t\treturn hide;\n\t}", "public boolean getVisible() {\r\n return visible;\r\n }", "public void setHideFields(boolean hideFields) {\n\t\tthis.hideFields = hideFields;\n\t}", "public boolean visible_SetupNameField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_SetupName_txtBx);\r\n\t}", "protected static boolean display(DecisionVariableDeclaration decl) {\n return ModelAccess.isVisibleType(decl.getType()) && !ConstraintType.isConstraint(decl.getType());\n }", "public boolean visible_Comments_Field() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_Cmnts_txtBx);\r\n\t}", "@Override\n\tpublic boolean getPrint() {\n\t\treturn false;\n\t}", "public boolean visible_LoadDescField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_LoadDesc_txtBx);\r\n\t}", "public Integer getHidden() {\n return hidden;\n }", "public Integer getHidden() {\n return hidden;\n }", "public boolean displayNamedParameters() {\n return this.displayNamedParameters;\n }", "public boolean isVisible() { return _visible; }", "public void setHiddenOrReadOnly() {\n if(getField_type().toLowerCase().matches(\"view|vfunction\")) {\n if(!getType().toLowerCase().matches(\"hidden\")){\n setSaveRequired(\"read\");\n }\n }\n }", "private void togglePostControls(boolean hidePostFields)\n {\n }", "public boolean isVisible(){\n\t\treturn this.visible;\n\t}", "@Override\n public boolean whetherHidden(Where where) {\n return false;\n }", "public boolean isVisible(){ return visible; }", "public boolean isHiddenOnReports() {\n return hiddenOnReports;\n }", "@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}", "private boolean show(AttributeModel am) {\n\t\t// never show invisible or LOB attributes\n\t\tif (!am.isVisible() || AttributeType.LOB.equals(am.getAttributeType())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// show multiple value attributes only if they would normally show up in a table\n\t\tif (AttributeType.DETAIL.equals(am.getAttributeType())\n\t\t || AttributeType.ELEMENT_COLLECTION.equals(am.getAttributeType())) {\n\t\t\treturn am.isVisibleInTable();\n\t\t}\n\t\treturn true;\n\t}", "public boolean isVisible(){\n \t\treturn visible;\n \t}", "void isPrintable(boolean b) {\n\t\tm.isPrintable=b;\n\t}", "@Override\r\n\tpublic boolean isVisible() {\n\t\treturn false;\r\n\t}", "@Override\n public void setVisible (boolean f)\n { \n }", "public boolean isVisible()\n {\n return visible;\n }", "protected boolean isShowFormatterSetting() {\n \t\treturn true;\n \t}", "public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }", "public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }", "public boolean isHidden()\n {\n // return hidden state of node associated with\n // menu option if defined\n if (getNode() != null)\n {\n return getNode().isHidden();\n }\n return false;\n }", "public void setVisible(boolean b) {\n\t\t\n\t}", "public void setHidden(boolean arg0) {\n\n\t}", "public boolean isSetDisplay() {\n return this.display != null;\n }", "public boolean isVisible() {\n\t\treturn true;\n\t}", "public final native boolean getShowHidden() /*-{\n return this.getShowHidden();\n }-*/;", "private boolean visible() {\r\n return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();\r\n }", "public void setHidden(Boolean hidden){\n m_hidden = hidden;\n }", "public boolean isPrivate() {\n return (this.mDisplay.getFlags() & 4) != 0;\n }", "public boolean isMakeVisible()\r\n {\r\n return myMakeVisible;\r\n }", "public boolean visible() {\n \treturn model.isVisible();\n }", "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 Boolean getDisplay() {\n return display;\n }", "public void setHiddenAttribute(boolean hiddenAttribute) {\n this.hiddenAttribute = hiddenAttribute;\n }", "@Override\n public void setVisible(boolean arg0)\n {\n \n }", "public boolean getToPrint() {\r\n return this.toPrint;\r\n }", "public void setInfoVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_info_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_info_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setInfoVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void show() {\n hidden = false;\n }", "public JTextField getVisibleTextField(){\n \n if(txt_fee_no.isVisible()){\n return txt_fee_no; \n }else\n return null; \n}", "private boolean setVisible(boolean b) {\n\t\treturn b;\n\t}", "public boolean isVisible()\n {\n return visible;\n }", "public boolean isShowDescAsValue()\n\t{\n\t\treturn showDescAsValue;\n\t}", "public java.lang.String getFieldShowValue() {\n return fieldShowValue;\n }", "public void setLabeledFieldEmptyOrHidden(boolean labeledFieldEmptyOrHidden) {\n this.labeledFieldEmptyOrHidden = labeledFieldEmptyOrHidden;\n }", "public String getIsdisplay() {\n return isdisplay;\n }", "public void setHiddenField(Expression hiddenField) {\n\t\tthis.hiddenField = hiddenField;\n\t}", "@Override\r\n\tpublic boolean isVisible()\r\n\t{\n\t\treturn !getFormScreen().getMode().equals(Mode.LIST_VIEW);\r\n\t}", "public boolean isShowing() {\n return visible;\n }", "public boolean isVisible() {\n return true;\n }", "@Override\n\tpublic boolean isFormField()\n\t{\n\t\treturn isFormField;\n\t}", "public boolean isVisible() {\n\t\treturn visible;\n\t}", "public void setVisible(boolean val);", "public boolean getLblVisible() {\n return lblVisible;\n }", "private void refreshFieldsVisibility()\n {\n \n }", "public boolean isVisible() {\r\n return visible;\r\n }", "public boolean isVisible() {\n return true;\n }", "public boolean visible_SetupAssetIDField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_AssetID_txtBx);\r\n\t}", "public void setVisible(boolean v) {\n }", "public void setHidden(boolean hidden) {\n\tif (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setHidden() \" + hidden);\n Via via=(Via)sipHeader;\n if (hidden) {\n if ( ! this.hasParameter(Via.HIDDEN) ) \n via.setParameter(Via.HIDDEN,\"hidden\");\n }\n else via.removeParameter(Via.HIDDEN); \n }", "public boolean isSetShowNarration()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(SHOWNARRATION$18) != null;\n }\n }", "@Override\n public boolean isVisible()\n {\n return true;\n }", "@Override\n\tpublic void printDataHidden() {\n\t\tSystem.out.println(\"Account Number: \" + this.getAccountNumber());\n\t}", "private void hideAdvanceFeatures() {\n sourceLabel.setVisible(false);\n sourceTextField.setVisible(false);\n threadsTextField.setEnabled(false);\n adminLabel.setVisible(false);\n adminTextField.setVisible(false);\n tracerPanel.setVisible(false);\n simulateCheckBox.setVisible(false);\n useScriptCheckBox.setVisible(false);\n editScriptButton.setVisible(false);\n batchImportCheckBox.setVisible(false);\n numResourceToCopyLabel.setVisible(false);\n numResourceToCopyTextField.setVisible(false);\n recordURIComboBox.setVisible(false);\n paramsLabel.setVisible(false);\n paramsTextField.setVisible(false);\n viewRecordButton.setVisible(false);\n testRecordButton.setVisible(false);\n basicUIButton.setVisible(false);\n\n isBasicUI = true;\n }", "public boolean isTrulyVisible() {\n return trulyVisible;\n }", "public boolean isVisible () {\n return visible;\n }", "public void setVisible(Boolean visible);", "public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadPersonnelIdentification())\n\t\t\tpersonnel_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCentreDiagTraitDescription())\n\t\t\tcdt_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationRegionApprobation())\n\t\t\tapprouveeRegionFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationGtcApprobation())\n\t\t\tapprouveeGTCFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadDistrictSanteDescription())\n\t\t\tdistrictsante_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}", "public boolean isDisplayDebug() {\n return displayDebug;\n }" ]
[ "0.7548982", "0.7257052", "0.6913391", "0.6731868", "0.65743333", "0.651244", "0.6503171", "0.63893217", "0.6364949", "0.6334448", "0.63174874", "0.62954336", "0.6273851", "0.6268975", "0.6184815", "0.6163229", "0.6145412", "0.61221313", "0.61141163", "0.61141163", "0.60804033", "0.60778415", "0.607392", "0.60620666", "0.60591805", "0.6055018", "0.60544395", "0.6028224", "0.6012902", "0.60113645", "0.59833467", "0.59449595", "0.58989054", "0.58989054", "0.5893514", "0.5870096", "0.5835851", "0.58095455", "0.57829285", "0.5782678", "0.578115", "0.5762877", "0.57151127", "0.56959695", "0.56939274", "0.5687316", "0.56868625", "0.5664382", "0.56632435", "0.5655457", "0.56536204", "0.56536204", "0.56452346", "0.56396157", "0.56376934", "0.56308126", "0.5621555", "0.56198454", "0.5616638", "0.5616484", "0.56125224", "0.5611979", "0.5608991", "0.5595808", "0.5594228", "0.5593388", "0.55910456", "0.5581718", "0.55761", "0.55719376", "0.55692524", "0.55689615", "0.55557746", "0.55509084", "0.5539107", "0.5529102", "0.5526392", "0.55203307", "0.55142474", "0.55012983", "0.5490895", "0.5486257", "0.54847956", "0.5483434", "0.5476471", "0.5472158", "0.5468551", "0.54666704", "0.5461508", "0.546098", "0.5443322", "0.5442929", "0.54422444", "0.54393244", "0.542966", "0.54286", "0.5427771", "0.5424364", "0.5422209", "0.5416188" ]
0.8540976
0
Set whether to print hidden fields (as per field's visible property)
public void setPrintHiddenFields(boolean printHiddenFields) { this.printHiddenFields = printHiddenFields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPrintHiddenFields()\n\t{\n\t\treturn printHiddenFields;\n\t}", "public void setHidden(boolean value) {\r\n this.hidden = value;\r\n }", "public void setHidden(Boolean hidden){\n m_hidden = hidden;\n }", "public void setHidden(boolean hidden) {\n\tif (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setHidden() \" + hidden);\n Via via=(Via)sipHeader;\n if (hidden) {\n if ( ! this.hasParameter(Via.HIDDEN) ) \n via.setParameter(Via.HIDDEN,\"hidden\");\n }\n else via.removeParameter(Via.HIDDEN); \n }", "@attribute(value = \"\", required = false)\t\r\n\tpublic void setPrintFieldValue(Boolean printFieldValue) {\r\n\t\tthis.printFieldValue = printFieldValue;\r\n\t}", "public void setHidden(boolean arg0) {\n\n\t}", "public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }", "public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }", "public void setVisible(boolean val);", "@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}", "public void setVisible(boolean b) {\n\t\t\n\t}", "@Override\n public void setVisible(boolean arg0)\n {\n \n }", "@Override\n public void setVisible (boolean f)\n { \n }", "public void setVisible(boolean v) {\n }", "public void setHiddenOrReadOnly() {\n if(getField_type().toLowerCase().matches(\"view|vfunction\")) {\n if(!getType().toLowerCase().matches(\"hidden\")){\n setSaveRequired(\"read\");\n }\n }\n }", "public void setHideFields(boolean hideFields) {\n\t\tthis.hideFields = hideFields;\n\t}", "public boolean isHideFields() {\n\t\treturn hideFields;\n\t}", "public void setVisible(boolean visible);", "public void setHiddenAttribute(boolean hiddenAttribute) {\n this.hiddenAttribute = hiddenAttribute;\n }", "public void setVisible(Boolean visible);", "public void setVisible(boolean value) {\n\t\tvisible = value;\n\t}", "void setVisible(boolean visible);", "void setVisible(boolean visible);", "@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);", "public void setIshidden(boolean ishidden) {\n this.ishidden = ishidden;\n }", "public void setHiddenField(Expression hiddenField) {\n\t\tthis.hiddenField = hiddenField;\n\t}", "private void togglePostControls(boolean hidePostFields)\n {\n }", "public void setInfoVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_info_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_info_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setInfoVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "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 void show() {\n hidden = false;\n }", "public abstract void setVisible(boolean visible);", "public void setVisible(Boolean isVisible);", "public void setVisible(boolean visible){\r\n\t\tthis.visible = visible;\r\n\t}", "private boolean setVisible(boolean b) {\n\t\treturn b;\n\t}", "public void setVisible(boolean visible)\n {\n this.visible = visible;\n }", "public boolean isHidden() {\n\t\treturn false;\n\t}", "public void setDisplayed(boolean show);", "@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}", "@Override\n\tpublic void setVisible(boolean visibility) {\n\t\t//do nothing\n\t}", "public Render setDebugPrint() {\r\n\t\t_print = true;\r\n\t\treturn this;\r\n\t}", "public void setVisible(boolean value)\n {\n super.setVisible(value);\n\n // Set the focus\n if (value && !errorFound())\n {\n setCurrentFocus(amountField);\n }\n }", "public boolean isHidden() {\n return false;\n }", "public void setEditButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_editButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_editButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setEditButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void hide() {\n hidden = true;\n }", "public void setExportButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_exportButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_exportButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setExportButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void setVisible(boolean visible) {\r\n this.visible = visible;\r\n }", "public boolean isHidden() {\r\n return hidden;\r\n }", "public void setVisible (boolean visible) {\n this.visible = visible;\n }", "@Override\n public boolean isVisible(Field field) {\n return true;\n }", "public void setVisible( boolean v) {\r\n visible = v;\r\n }", "public boolean isHidden();", "public void setInvisible(boolean b)\n\t{\n\t\t_invisible = b;\n\t}", "public static void setVisible() {\r\n\t\tfrmMfhEmailer.setVisible(true);\r\n\t}", "public boolean isHiddenAttribute() {\n return hiddenAttribute;\n }", "private void setVis(boolean b) {\n this.setVisible(b);\n }", "public void show() {\n\t\thidden = false;\n\t}", "public void setDeleteButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_deleteButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_deleteButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setDeleteButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public static void setInvisible() {\r\n\t\tfrmMfhEmailer.setVisible(false);\r\n\t}", "public void setVisible(boolean a){\n \t\tvisible = a;\n \t}", "public boolean getIsIshidden() {\n return ishidden;\n }", "final void setVisible(boolean visible) {\n this.visible = visible;\n }", "public void setToPrint(Boolean toPrint) {\r\n this.toPrint = toPrint;\r\n }", "public void hide() {\n\t\thidden = true;\n\t}", "private void setVisible(JTextField a, boolean b) {\n\t\ta.setVisible(b);\r\n\t}", "public void setVisible()\r\n\t{\r\n\t\tthis.setVisible(true);\r\n\t}", "void isPrintable(boolean b) {\n\t\tm.isPrintable=b;\n\t}", "public Boolean isHidden() {\n return m_hidden;\n }", "@Override\n\tpublic boolean getPrint() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void setVisible (boolean visible)\n\t{\n\t\tif (visible)\n\t\t{\n\t\t\t//this.updateLayerList();\n\t\t\t//this.updateConstrainedLayerList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Update the amount of deformation.\n\t\t\tmCartogramWizard.setAmountOfDeformation(\n\t\t\t\tmDeformationSlider.getValue());\n\t\t\t\t\n\t\t}\n\t\t\n\t\tsuper.setVisible(visible);\n\t}", "private void setFormVisible(boolean value){\r\n vb_form.setVisible(value); //Establece el estado grafico del formulario\r\n// if(value){ //Si el estado es visible entonces \r\n// vb_table.relocate(30, 439);\r\n// vb_table.setPrefHeight(133);\r\n// }else{\r\n// vb_table.relocate(30, 64);\r\n// vb_table.setPrefHeight(508);\r\n// }\r\n }", "public final native void setShowHidden(boolean showHidden) /*-{\n this.setShowHidden(showHidden);\n }-*/;", "public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadPersonnelIdentification())\n\t\t\tpersonnel_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCentreDiagTraitDescription())\n\t\t\tcdt_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationRegionApprobation())\n\t\t\tapprouveeRegionFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationGtcApprobation())\n\t\t\tapprouveeGTCFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadDistrictSanteDescription())\n\t\t\tdistrictsante_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}", "public void setDisplay(boolean val) {\n \tdisplay = val; \n }", "public boolean isShowHidden() {\n\t\treturn showHidden;\n\t}", "private void hideAdvanceFeatures() {\n sourceLabel.setVisible(false);\n sourceTextField.setVisible(false);\n threadsTextField.setEnabled(false);\n adminLabel.setVisible(false);\n adminTextField.setVisible(false);\n tracerPanel.setVisible(false);\n simulateCheckBox.setVisible(false);\n useScriptCheckBox.setVisible(false);\n editScriptButton.setVisible(false);\n batchImportCheckBox.setVisible(false);\n numResourceToCopyLabel.setVisible(false);\n numResourceToCopyTextField.setVisible(false);\n recordURIComboBox.setVisible(false);\n paramsLabel.setVisible(false);\n paramsTextField.setVisible(false);\n viewRecordButton.setVisible(false);\n testRecordButton.setVisible(false);\n basicUIButton.setVisible(false);\n\n isBasicUI = true;\n }", "public Expression getHiddenField() {\n\t\treturn hiddenField;\n\t}", "public void setSearchButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void setVisible(boolean val)\r\n\t{\r\n\t\t_isOn = val;\r\n\t}", "public void setActionItemInfoVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_actionItemInfo_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_actionItemInfo_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setActionItemInfoVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public boolean isShowHidden() {\n\t\t\treturn showHidden;\n\t\t}", "public boolean setVisible(boolean visible) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "public void setNewButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_newButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_newButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setNewButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private void refreshFieldsVisibility()\n {\n \n }", "public boolean getVisible() {\n\t\treturn visible;\n\t}", "public boolean getVisible() {\n\t\treturn visible;\n\t}", "public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\ttypeFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tobjetFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tmessageFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}", "public Integer getHidden() {\n return hidden;\n }", "public Integer getHidden() {\n return hidden;\n }", "@JSProperty(\"visible\")\n void setVisible(boolean value);", "public boolean getVisible() {\r\n return visible;\r\n }", "public void setVisible(boolean visible)\n\t{\n\t\tsuper.setVisible(visible);\n\t\trequestFocus();\n\t}", "public void setRrVisible(boolean value) {\n rrVisible = value;\n }", "public void changePrintingAll()\n {\n printingAll = !printingAll;\n }", "public void setLabeledFieldEmptyOrHidden(boolean labeledFieldEmptyOrHidden) {\n this.labeledFieldEmptyOrHidden = labeledFieldEmptyOrHidden;\n }", "public void setIsVisible(boolean isVisible);", "public void setTrailVisible(boolean visible) {\n }", "public void setVisible(boolean b) {\n\t\tframe.setVisible(b);\t\n\t}", "public void setLanguageGermanButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_languageGermanButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_languageGermanButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setLanguageGermanButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public boolean shouldHide() {\n\t\treturn hide;\n\t}", "@Override\r\n \tpublic void setVisible(boolean visible) {\r\n \t\tsessionBeanPkgNameditor\r\n \t\t\t\t.setValue(\"org.domain.\" //$NON-NLS-1$\r\n \t\t\t\t\t\t+ model\r\n \t\t\t\t\t\t\t\t.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME)\r\n \t\t\t\t\t\t+ \".session\"); //$NON-NLS-1$\r\n \t\tentityBeanPkgNameditor\r\n \t\t\t\t.setValue(\"org.domain.\" //$NON-NLS-1$\r\n \t\t\t\t\t\t+ model\r\n \t\t\t\t\t\t\t\t.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME)\r\n \t\t\t\t\t\t+ \".entity\"); //$NON-NLS-1$\r\n \t\ttestsPkgNameditor\r\n \t\t\t\t.setValue(\"org.domain.\" //$NON-NLS-1$\r\n \t\t\t\t\t\t+ model\r\n \t\t\t\t\t\t\t\t.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME)\r\n \t\t\t\t\t\t+ \".test\"); //$NON-NLS-1$\r\n \t\tif (visible) {\r\n \t\t\tITaggedFieldEditor runtimesField = (ITaggedFieldEditor)((CompositeEditor)jBossSeamHomeEditor).getEditors().get(1);\r\n \t\t\tObject oldValue = runtimesField.getValue();\r\n \t\t\tObject newValue = \"\";\r\n \t\t\tList<String> runtimes = getRuntimeNames(model.getProperty(IFacetDataModelProperties.FACET_VERSION_STR).toString());\r\n \t\t\tif(oldValue==null || !runtimes.contains(oldValue)) {\r\n \t\t\t\tObject defaultRnt = getSeamRuntimeDefaultValue();\r\n \t\t\t\tif(defaultRnt!=null && runtimes.contains(defaultRnt)) {\r\n \t\t\t\t\tnewValue = defaultRnt;\r\n \t\t\t\t} else if(runtimes.size()>0) {\r\n \t\t\t\t\tnewValue = runtimes.get(0);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tnewValue = oldValue;\r\n \t\t\t}\r\n \t\t\truntimesField.setValue(newValue);\r\n \t\t\truntimesField.setTags(runtimes.toArray(new String[0]));\r\n \t\t\tvalidate();\r\n \t\t}\r\n \t\tsuper.setVisible(visible);\r\n \t}" ]
[ "0.7926981", "0.7284323", "0.6945936", "0.6929505", "0.6869098", "0.67807376", "0.6761088", "0.6761088", "0.67558974", "0.67213607", "0.6693632", "0.66660595", "0.6653625", "0.664534", "0.66405135", "0.66285646", "0.65706635", "0.65615535", "0.65018874", "0.65004665", "0.64842683", "0.64486563", "0.64486563", "0.64374554", "0.64320225", "0.64268357", "0.6415171", "0.6404713", "0.6392878", "0.6331819", "0.6317361", "0.63060117", "0.6264892", "0.62555593", "0.6248435", "0.6244298", "0.6240832", "0.624048", "0.6232578", "0.6226138", "0.6208334", "0.6203626", "0.61859256", "0.61610144", "0.61603266", "0.61433357", "0.6127062", "0.61197543", "0.6108506", "0.60947996", "0.60703105", "0.6049595", "0.60447365", "0.6026417", "0.6007744", "0.6004371", "0.597135", "0.59701383", "0.59627473", "0.5950269", "0.59482515", "0.5911128", "0.59085643", "0.5904167", "0.5903795", "0.5900672", "0.5885537", "0.58732617", "0.5862721", "0.5858733", "0.585724", "0.5852655", "0.5847079", "0.58452094", "0.5814543", "0.5800847", "0.580038", "0.5796784", "0.5795251", "0.5788999", "0.57534605", "0.57436734", "0.5739481", "0.5720813", "0.5720813", "0.5711672", "0.57114476", "0.57114476", "0.5707404", "0.5705233", "0.57006985", "0.56946164", "0.56940156", "0.5692772", "0.5669466", "0.566821", "0.56484085", "0.5643577", "0.5624971", "0.5622095" ]
0.81099325
0
Return the lines in one string
public String rtvAsString() { // any lines to return? if (lines.size() == 0) { return printerFormatter.rtvJournalNotFound(); } // Concatenate the list StringBuffer str = new StringBuffer(); for (int i = 0; i < lines.size(); i++) { str.append(lines.get(i) + EqDataType.GLOBAL_DELIMETER); } return str.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String readLines() {\n\n String fileAsString;\n fileAsString = read();\n StringBuilder newString = new StringBuilder();\n if (fileAsString != null) {\n if (fromLine == toLine) {\n\n newString = new StringBuilder(fileAsString.split(\"\\n\")[fromLine - 1]);\n return newString.toString();\n } else {\n if (toLine > fileAsString.split(\"\\n\").length) {\n toLine = fileAsString.split(\"\\n\").length;\n }\n ;\n for (int i = fromLine - 1; i < toLine; i++) {\n\n newString.append(fileAsString.split(\"\\n\")[i]).append(\"\\n\");\n\n\n }\n }\n\n }\n\n\n return newString.toString();\n }", "List<String> getLines();", "private String joinLines() {\n StringBuilder S = new StringBuilder();\n for (String L : testLines) {\n S.append(L);\n S.append(NL);\n }\n return S.toString();\n }", "public String asString() {\n StringBuffer result = new StringBuffer();\n\n for (String line : this) {\n result.append(line).append('\\n');\n }\n\n return result.toString();\n }", "ArrayList<String> getLines();", "List<Line> getLines();", "public List<String> getOutput() {\n List<String> toRet = new ArrayList<String>();\n String line = processLinesOut_.poll();\n while (line != null) {\n toRet.add(line);\n line = processLinesOut_.poll();\n }\n return toRet;\n }", "public String[] readAllLines(){\n\t\tArrayList<String> lines=new ArrayList<>();\n\t\twhile (hasNestLine())\n\t\t\tlines.add(readLine());\n\t\treturn lines.toArray(new String[lines.size()]);\n\t}", "public String readAllLines() {\n String ans = \"\";\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"./assets/Instruction.txt\"));\n String str;\n while ((str = br.readLine()) != null) {\n ans += (str + \"\\n\");\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n assert ans != null;\n return ans;\n }", "public String[] getLines() {// otan patas subscribe sto menu , print lista me ta lines\n int length = databaseLineIDToTitle.size();\n\n if (length == 0) {\n return null;\n } else {\n int subs = 0;\n\n for (Map.Entry<Integer, String> pair : databaseLineIDToTitle.entrySet()) { // Entryset, returns the hashmap\n if (subscribedLists.contains(pair.getKey())) {\n subs++;\n }\n }\n\n String[] array = new String[length - subs];\n\n int i = 0;\n\n for (Map.Entry<Integer, String> pair : databaseLineIDToTitle.entrySet()) { // Entryset, returns the hashmap\n if (!subscribedLists.contains(pair.getKey())) {\n array[i++] = String.format(\"%03d - %s \\n \", pair.getKey(), pair.getValue());\n }\n }\n return array;\n }\n }", "protected String[] parseLine() {\n ArrayList<String> lines = new ArrayList<String>();\n StringBuffer line = new StringBuffer(current);\n while (line.length() > style.lineWidth) {\n int index = split(line);\n lines.add(line.substring(0, index));\n line = new StringBuffer(line.substring(index));\n if (line.length() != 0)\n line.insert(0, continueIndentString());\n }\n if (line.length() != 0)\n lines.add(line.toString());\n return lines.toArray(new String[0]);\n }", "private static void bufferedReading2(String str) throws IOException {\n try (BufferedReader reader = new BufferedReader(new StringReader(str))) {\n String result = reader.lines().collect(Collectors.joining(System.lineSeparator()));\n System.out.println(result);\n }\n }", "public List<String> getLines()\n\t{\n\t\treturn lines;\n\t}", "@Override\r\n\tpublic synchronized String toString()\r\n\t{\r\n\t\tsynchronized (lines)\r\n\t\t{\r\n\t\t\tStringBuilder sb = new StringBuilder()\r\n\t\t\t\t.append(lines.size()).append(' ')\r\n\t\t\t\t.append(numberOfClients).append(' ');\r\n\t\t\tfor(int i = size()-1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tsb.append(lines.get(i).toString()).append(' ');\r\n\t\t\t}\r\n\t\t\treturn sb.toString();\r\n\t\t}\r\n\t}", "public String[] textToLines(String text) {\n\t\tString[] subString = text.split(\"\\n\");\n\t\treturn subString;\n\t}", "public static List<List<String>> getLinesAsSentences(String text) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars;\n\t\tchars = text.toCharArray();\n\t\tList<List<String>> lines = new ArrayList<List<String>>();\n\t\tList<String> words = new ArrayList<String>();\n\t\twords.add(\"<s>\");\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == '\\n' || chars[i] == '\\r') {\n\t\t\t\tif (sb.length() > 0) {\n//\t\t\t\t\tSystem.out.println(\"Adding word: \"+sb.toString());\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tif (words.size() > 1) {\n//\t\t\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\t\t\twords.add(\"</s>\");\n\t\t\t\t\tlines.add(words);\n\t\t\t\t}\n\t\t\t\twords = new ArrayList<String>();\n\t\t\t\twords.add(\"<s>\");\n\t\t\t\tsb.setLength(0);\n\t\t\t} else if (chars[i] == ' ') {\n\t\t\t\tif (sb.length() > 0) {\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tsb.setLength(0);\n\t\t\t} else {\n\t\t\t\tsb.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sb.length() > 0) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\twords.add(sb.toString());\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\t\tif (words.size() > 1) {\n//\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\twords.add(\"</s>\");\n\t\t\tlines.add(words);\n\t\t}\n\t\tsb.setLength(0);\n\t\treturn lines;\n\t}", "public String getString() {\t\t\t\n\t\tString result = \"\";\n\t\tfor (int row = 0; row < this.size; row ++) {\n\t\t\tString line = \"\";\n\t\t\tfor (int column = 0; column < this.size; column++) {\n\t\t\t\tline += printToken(this.getTokenAt(new Vector(column, row))) + \" \";\n\t\t\t}\n\t\t\t\n\t\t\tresult += line + System.lineSeparator();\n\t\t}\n\t\treturn result;\n\t}", "public String[] getLines(String input) {\r\n\t\tScanner sc = new Scanner(input);\r\n\t\tArrayList<String> lines = new ArrayList<>();\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\tlines.add(sc.nextLine());\r\n\t\t}\r\n\t\tsc.close();\r\n\r\n\t\treturn lines.toArray(new String[lines.size()]);\r\n\t}", "public CharSequence getLineContents(int line) {\n getLock().getReadLock();\n try {\n return lines.getLineContents(line);\n } finally {\n getLock().relinquishReadLock();\n }\n }", "private String getTextLineFromStream( InputStream is ) throws IOException {\n StringBuffer buffer = new StringBuffer();\n int b;\n\n \twhile( (b = is.read()) != -1 && b != (int) '\\n' ) {\n \t\tbuffer.append( (char) b );\n \t}\n \treturn buffer.toString().trim();\n }", "String[] readLines(Object packet);", "public synchronized String Readline() {\n\t return lines.poll();\n\t}", "@Override\n public String toString() {\n Enumeration lines = this.toLines();\n if (lines == null) {\n return null;\n }\n String str = null;\n while (lines.hasMoreElements()) {\n String line = (String) lines.nextElement();\n if (str == null) {\n str = line;\n } else {\n str += _strNewLine + line;\n }\n }\n return str;\n }", "public String toString(){\n\t\tIterator<Integer> iter = getLines().iterator();\n\t\tString word = getWord() + \"(\" + getLines().size() + \"): \";\n\t\twhile (iter.hasNext()){\n\t\t\tword += iter.next() + \", \";\n\t\t} \n\t\tword = word.substring(0, word.length() - 2);\n\t\treturn word;\n\t}", "public abstract String getFirstLine();", "public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}", "public static String[] readAllLines() {\n ArrayList<String> lines = new ArrayList<String>();\n while (hasNextLine()) {\n lines.add(readLine());\n }\n return lines.toArray(new String[lines.size()]);\n }", "public static String allRows(String filePath) {\n\t\tArrayList<String> allRows = new ArrayList<String>();\n\t\ttry { // to catch IOException from read\n\t\t\tBufferedReader input = new BufferedReader(new FileReader(filePath));\n\t\t\tfor (int i = 0; i < LineCount.lineCount(filePath); i++) {\n\t\t\t\tallRows.add(input.readLine());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tMain.debug.LOGWarning(e.toString());\n\t\t}\n\t\t\n\t\treturn allRows.toString();\n\t}", "public static ArrayList getLines() {\n return lines;\n }", "private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}", "List<String> obtenerlineas(String archivo) throws FileException;", "java.lang.String getContents();", "java.lang.String getContents();", "public String toString()\n\t{\n\t\tString temp = \"\";\n\t\tfor (int i=0; i< lineCount; i++)\n\t\t{\n\t\t\ttemp += (i+1) + \": \" + codeLines[i] + \"\\n\";\n\t\t}\n\t\treturn temp;\n\t}", "public String getLine();", "public static ArrayList<String> getTextLinesString(String textFileAddress,\n\t\t\tBoolean printMessage) {\n\t\tArrayList<String> output = new ArrayList<String>();\n\t\tint lines = 0;\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\treader = getFileBufferReader(textFileAddress);\n\t\t\tString newLine;\n\t\t\twhile ((newLine = reader.readLine()) != null) {\n\t\t\t\toutput.add(newLine);\n\t\t\t\tlines++;\n\t\t\t}\n\t\t\treader.close();\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\tif (printMessage)\n\t\t\tSystem.out.println(tools.util.File.getName(textFileAddress)\n\t\t\t\t\t+ \" have \" + lines + \" Line\");\n\t\treturn output;\n\t}", "public static ArrayList<String> getLines() throws Exception\n {\n \tArrayList<String> lines = new ArrayList<String>();\n \twhile(reader.ready())\n \t{\n \t\tlines.add(reader.readLine());//reads the line and adds them into the arraylist\n \t}\n \treturn lines;\n }", "public static String[] parseLines(String text)\n {\n return StringTools.parseStringArray(text, \"\\r\\n\");\n }", "public String getString() {\n\t\treturn getString(\"\\n\");\n\t}", "public String toStringMultiline() {\n return serialize(true);\n }", "public List<String> getResult()\n {\n while (!readComplete)\n {\n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException ex)\n {\n // swallow and exit;\n }\n }\n return lines;\n }", "String getLine();", "public static String[] wrapToLineArray ( final String in, final int width )\n {\n if (in == null) return null;\n if (width < 1) return new String[] {in};\n return wrap(in, width).split(\"\\n\");\n }", "public String toString()\n\t{\n\t\tString returnString = question;\n\t\tfor (int i = 0; i < numLines; i++)\n\t\t{\n\t\t\treturnString = returnString.concat(\"\\n\");\n\t\t}\n\t\t\n\t\treturn returnString;\n\t}", "public String toString(){\n\t\tStringBuilder output = new StringBuilder();\n\t\tfor (int i=13; i<=16; i++){\n\t\t\toutput.append(linesAndStores[i].makeString());\n\t\t\toutput.append(\"\\n\");\n\t\t}\n\t\treturn output.toString();\n\t}", "public String getContents()\n\t{\n\t\treturn getRawColumn(OFF_LINE_NO, lineLength);\n\t}", "public static String blockTextArrayList(ArrayList<String> str)\n {\n String ret=\"\";\n\n for(int i=0;i<str.size();i++)\n {\n ret+=str.get(i)+\"\\n\";\n }\n return ret;\n }", "int getBrokenLines();", "public String readMultipleFromFiles()\n {\n String result = \"\";\n try\n {\n FileReader fileReader = new FileReader(filename);\n try\n {\n StringBuffer stringBuffer = new StringBuffer();\n Scanner scanner = new Scanner(fileReader);\n while (scanner.hasNextLine())\n {\n stringBuffer.append(scanner.nextLine()).append(\"\\n\");\n }\n stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());\n result = stringBuffer.toString();\n } finally\n {\n fileReader.close();\n }\n } catch (FileNotFoundException e)\n {\n System.out.println(\"There is no such file called \" + filename);\n } catch (IOException e)\n {\n System.out.println(\"read \" + filename + \" error!!!\");\n } catch (NumberFormatException e)\n {\n System.out.println(\"content in file \" + filename + \" is error\");\n }\n return result;\n }", "public static String[] getNextLine(String lines) {\n\n final char CARRIAGE = '\\r';\n final char LINEFEED = '\\n';\n boolean canReturn = false;\n String[] result = new String[2];\n\n //we go through the given string, until we met a break line\n for(int i = 0; i < lines.length(); i++) {\n\n //MACOS and Windows break line\n if(lines.charAt(i) == CARRIAGE){\n //windows second part of break line\n if(i != lines.length() - 1 && lines.charAt(i + 1) == LINEFEED){\n i++;\n }\n canReturn = true;\n } else if(lines.charAt(i) == LINEFEED){ // Linux break line\n canReturn = true;\n }\n\n //if we encounter a break line of the third type, we split the string\n if(canReturn){\n result[0] = lines.substring(0, i + 1);\n result[1] = lines.substring(i + 1);\n\n return result;\n }\n }\n //if no break line were encountered :\n result[0] = \"\";\n result[1] = lines;\n\n return result;\n }", "public String getLineText(int lineNumber) {\n getLock().getReadLock();\n try {\n int start = getLineStartOffset(lineNumber);\n int end = getLineEndOffsetBeforeTerminator(lineNumber);\n return (start == end) ? \"\" : getTextBuffer().subSequence(start, end).toString();\n } finally {\n getLock().relinquishReadLock();\n }\n }", "public ArrayList<String> getLines() {\n\t\tif (cachedocs) {\n\t\t\tif (lines == null)\n\t\t\t\tlines = Config.DB.getLines(docid);\n\t\t\treturn lines;\n\t\t}\n\t\telse {\n\t\t\treturn Config.DB.getLines(docid);\n\t\t}\n\t}", "public String getLine() {\r\n\t\treturn content;\r\n\t}", "public static String blockTextArray(String[] str)\n {\n String ret=\"\";\n\n for(int i=0;i<str.length;i++)\n {\n ret+=str[i]+\"\\n\";\n }\n return ret;\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String toStringMultiline() {\n return Serializer.INSTANCE.serialize(this, true);\n }", "public String getLineContent(int lineNumber) {\n return lines.get(lineNumber-1).getContent();\n }", "protected static String showLineSeparators(String string) {\n\tif (string == null) return null;\n\tStringBuffer buffer = new StringBuffer();\n\tint length = string.length();\n\tfor (int i = 0; i < length; i++) {\n\t\tchar car = string.charAt(i);\n\t\tswitch (car) {\n\t\t\tcase '\\n': \n\t\t\t\tbuffer.append(\"\\\\n\\n\"); //$NON-NLS-1$\n\t\t\t\tbreak;\n\t\t\tcase '\\r':\n\t\t\t\tif (i < length-1 && string.charAt(i+1) == '\\n') {\n\t\t\t\t\tbuffer.append(\"\\\\r\\\\n\\n\"); //$NON-NLS-1$\n\t\t\t\t\ti++;\n\t\t\t\t} else {\n\t\t\t\t\tbuffer.append(\"\\\\r\\n\"); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbuffer.append(car);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn buffer.toString();\n}", "@Override\r\n\tprotected String[] getSpecificLines() {\r\n\t\tString[] lines = new String[4];\r\n\t\tlines[0] = \"\";\r\n\t\tif (items.toString().lastIndexOf('_') < 0) {\r\n\t\t\tlines[1] = items.toString();\r\n\t\t\tlines[2] = \"\";\r\n\t\t} else {\r\n\t\t\tlines[1] = items.toString().substring(0, items.toString().lastIndexOf('_'));\r\n\t\t\tlines[2] = items.toString().substring(items.toString().lastIndexOf('_') + 1);\r\n\t\t}\r\n\t\tlines[3] = String.valueOf(cost);\r\n\t\treturn lines;\r\n\t}", "String getContents();", "public List<String> nextSeveralLines() throws IOException {\n if (StringUtils.isBlank(currentPath)) return null;\n List<String> lista = new ArrayList<String>();\n String sCurrentLine;\n int temp = 1;\n\n bufferReader.mark(10000000);\n while ((sCurrentLine = bufferReader.readLine()) != null) {\n temp++;\n if (temp > counterSeveralLines) {\n for (int i = 0; i < linesAfter; i++) {\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n counterSeveralLines++;\n lista.add(sCurrentLine);\n }\n }\n bufferReader.reset();\n return lista;\n }\n }\n return lista;\n }", "@Override\n\tpublic List<String> getLinesToExport()\n\t{\n\n\t\tList<String> returnList = new ArrayList<>();\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(\"series\");\n\t\tsb.append(\"\\t\");\n\t\tsb.append(\"x\");\n\t\tsb.append(\"\\t\");\n\t\tsb.append(\"y\");\n\t\tsb.append(\"\\t\");\n\t\tsb.append(\"components delimited by ///\");\n\t\treturnList.add(sb.toString());\n\t\tfor (SciomeSeries<Number, Number> seriesData : getSeriesData())\n\t\t{\n\t\t\tfor (SciomeData<Number, Number> xychartData : seriesData.getData())\n\t\t\t{\n\t\t\t\tsb.setLength(0);\n\t\t\t\tDouble X = xychartData.getXValue().doubleValue();\n\t\t\t\tDouble Y = xychartData.getYValue().doubleValue();\n\t\t\t\tList extraValue = (List) xychartData.getExtraValue();\n\n\t\t\t\tStringBuilder components = new StringBuilder();\n\t\t\t\tfor (Object obj : extraValue)\n\t\t\t\t{\n\t\t\t\t\tif (components.length() > 0)\n\t\t\t\t\t\tcomponents.append(\"///\");\n\t\t\t\t\tcomponents.append(obj.toString());\n\t\t\t\t}\n\n\t\t\t\tsb.append(seriesData.getName());\n\t\t\t\tsb.append(\"\\t\");\n\t\t\t\tsb.append(X);\n\t\t\t\tsb.append(\"\\t\");\n\t\t\t\tsb.append(Y);\n\t\t\t\tsb.append(\"\\t\");\n\t\t\t\tsb.append(components.toString());\n\n\t\t\t\treturnList.add(sb.toString());\n\n\t\t\t}\n\t\t}\n\n\t\treturn returnList;\n\n\t}", "private static String readLine(ResettableInputStream in, int maxLength)\n throws IOException {\n\n StringBuilder s = new StringBuilder();\n int c;\n int i = 1;\n while ((c = in.readChar()) != -1) {\n // FIXME: support \\r\\n\n if (c == '\\n') {\n break;\n }\n //System.out.printf(\"seen char val: %c\\n\", (char)c);\n s.append((char)c);\n\n if (i++ > maxLength) {\n System.out.println(\"Output: >\" + s + \"<\");\n throw new RuntimeException(\"Too far!\");\n }\n }\n if (s.length() > 0) {\n s.append('\\n');\n return s.toString();\n } else {\n return null;\n }\n }", "public List<String> nextOneLine() throws IOException {\n counterSeveralLines = linesAfter;\n if (StringUtils.isBlank(currentPath)) return null;\n String sCurrentLine;\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n listBefore = addToArray(sCurrentLine);\n }\n return listBefore;\n }", "public static String concatElementsAsLines(Object... elements) {\n return concatElements(asList(elements), NEW_LINE);\n }", "public String getLine() {\n\t\treturn line.toString();\n\t}", "private List<String> readSrc(){\n //daclarations\n InputStream stream;\n List<String> lines;\n String input;\n BufferedReader reader;\n StringBuilder buf;\n\n //Inlezen van bestand\n stream = this.getClass().getResourceAsStream(RESOURCE);\n lines = new LinkedList<>();\n\n // laad de tekst in \n reader = new BufferedReader(new InputStreamReader(stream));\n buf = new StringBuilder();\n\n if(stream != null){\n try{\n while((input = reader.readLine()) != null){\n buf.append(input);\n System.out.println(input);\n lines.add(input);\n }\n } catch(IOException ex){\n System.out.println(ex);// anders schreeuwt hij in mijn gezicht:\n }\n }\n return lines;\n }", "private String detalhes() {\n\t\tString saida = \"\";\n\t\t\n\t\tfor (String string : detalhes) {\n\t\t\tif(string != null) {\n\t\t\t\tsaida += string + System.lineSeparator();\n\t\t\t} \n\t\t}\n\t\treturn saida.substring(0, saida.length() - 1);\n\t}", "public static String[] getLines(String filename)\n throws IOException {\n\n\n try (\n FileInputStream inStream = new FileInputStream(filename);\n InputStreamReader reader = new InputStreamReader(inStream);\n BufferedReader buffer = new BufferedReader(reader)\n ) {\n List<String> lines = new LinkedList<>();\n for (String line = buffer.readLine();\n line != null;\n line = buffer.readLine()) {\n line = line.trim();\n if (!line.isEmpty()) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[0]);\n }\n }", "public static String[] readLines(String url) throws IOException {\r\n\r\n BufferedReader bufferedReader = new BufferedReader(new FileReader(url));\r\n List<String> lines = null;\r\n try {\r\n lines = new ArrayList();\r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return lines.toArray(new String[lines.size()]);\r\n\r\n }", "private static String formatLog() {\r\n String str = \"\";\r\n\r\n str = log.stream().map((temp) -> temp + \"\\n\").reduce(str, String::concat);\r\n\r\n return str;\r\n }", "String getLine (int line);", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "public String[] getSubscribedLines() {// otan patas unsubscribe sto menu , print lista me ta lines pou eisai subscribed\n int length = subscribedLists.size();\n\n if (length == 0) {\n return null;\n } else {\n String[] array = new String[length];\n\n int i = 0;\n\n for (Map.Entry<Integer, String> pair : databaseLineIDToTitle.entrySet()) {\n if (subscribedLists.contains(pair.getKey())) {\n array[i++] = String.format(\"%03d - %s \\n \", pair.getKey(), pair.getValue());\n }\n }\n\n return array;\n }\n }", "public String readFileBufferedReader() {\n String result = \"\";\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(new File(ALICE_PATH)));\n\n for (String x = in.readLine(); x != null; x = in.readLine()) {\n result = result + x + '\\n';\n }\n\n } catch (IOException e) {\n }\n\n if(in != null)try {\n in.close();\n } catch (IOException e) {\n }\n\n return result;\n }", "public abstract String getLine(int lineNumber);", "private String readLine() throws IOException {\n/* 276 */ String line = null;\n/* */ \n/* */ \n/* 279 */ boolean isLastFilePart = (this.no == 1L);\n/* */ \n/* 281 */ int i = this.currentLastBytePos;\n/* 282 */ while (i > -1) {\n/* */ \n/* 284 */ if (!isLastFilePart && i < ReversedLinesFileReader.this.avoidNewlineSplitBufferSize) {\n/* */ \n/* */ \n/* 287 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ int newLineMatchByteCount;\n/* 292 */ if ((newLineMatchByteCount = getNewLineMatchByteCount(this.data, i)) > 0) {\n/* 293 */ int lineStart = i + 1;\n/* 294 */ int lineLengthBytes = this.currentLastBytePos - lineStart + 1;\n/* */ \n/* 296 */ if (lineLengthBytes < 0) {\n/* 297 */ throw new IllegalStateException(\"Unexpected negative line length=\" + lineLengthBytes);\n/* */ }\n/* 299 */ byte[] lineData = new byte[lineLengthBytes];\n/* 300 */ System.arraycopy(this.data, lineStart, lineData, 0, lineLengthBytes);\n/* */ \n/* 302 */ line = new String(lineData, ReversedLinesFileReader.this.encoding);\n/* */ \n/* 304 */ this.currentLastBytePos = i - newLineMatchByteCount;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 309 */ i -= ReversedLinesFileReader.this.byteDecrement;\n/* */ \n/* */ \n/* 312 */ if (i < 0) {\n/* 313 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ \n/* 319 */ if (isLastFilePart && this.leftOver != null) {\n/* */ \n/* 321 */ line = new String(this.leftOver, ReversedLinesFileReader.this.encoding);\n/* 322 */ this.leftOver = null;\n/* */ } \n/* */ \n/* 325 */ return line;\n/* */ }", "public String listarTemas(){\n String respuesta=\"\";\n for(int i=0;i<temas.length;i++){\n respuesta+=\"\\n\"+temas[i];\n }\n return respuesta;\n }", "private StringBuilder inputStreamToString(InputStream is) {\n \t String line = \"\";\n \t StringBuilder total = new StringBuilder();\n \t \n \t // Wrap a BufferedReader around the InputStream\n \t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n \n \t // Read response until the end\n \t try {\n \t\t\twhile ((line = rd.readLine()) != null) { \n \t\t\t total.append(line); \n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t \n \t // Return full string\n \t return total;\n \t}", "static List<String> readLines(InputStream in) throws IOException {\n\t\tList<String> lines = new ArrayList<String>();\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\tString line = null;\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}", "private ArrayList<char[]> getFileAsResourceByCharsNewLineDelineated(Class c){\n ArrayList<char[]> charLines = new ArrayList<char[]>();\n try{\n s = new Scanner(c.getResourceAsStream(resourceName)); \n while (s.hasNextLine()){\n char[] line = s.nextLine().toCharArray();\n charLines.add(line);\n }\n } catch(Exception e){\n e.printStackTrace();\n }\n return charLines;\n }", "private String[] readLine(BufferedReader r) throws IOException\r\n\t{\r\n\t\tSystem.out.print(\"> \");\r\n\t\tfinal String line = r.readLine();\r\n\t\treturn line != null ? split(line) : null;\r\n\t}", "public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }", "protected String[] splitMVSLine(String raw) {\n if (raw == null) {\n return new String[] {};\n }\n StringTokenizer st = new StringTokenizer(raw);\n String[] rtn = new String[st.countTokens()];\n int i = 0;\n while (st.hasMoreTokens()) {\n String nextToken = st.nextToken();\n rtn[i] = nextToken.trim();\n i++;\n }\n return rtn;\n }", "public String[] parseLine() throws IOException, FHIRException {\n\t\tList<String> res = new ArrayList<String>();\n\t\tStringBuilder b = new StringBuilder();\n\t\tboolean inQuote = false;\n\n\t\twhile (more() && !finished(inQuote, res.size())) {\n\t\t\tchar c = peek();\n\t\t\tnext();\n\t\t\tif (c == '\"' && doingQuotes) {\n\t\t\t\tif (ready() && peek() == '\"') {\n\t b.append(c);\n next();\n\t\t\t\t} else {\n\t\t\t inQuote = !inQuote;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!inQuote && c == delimiter ) {\n\t\t\t\tres.add(b.toString().trim());\n\t\t\t\tb = new StringBuilder();\n\t\t\t}\n\t\t\telse \n\t\t\t\tb.append(c);\n\t\t}\n\t\tres.add(b.toString().trim());\n\t\twhile (ready() && (peek() == '\\r' || peek() == '\\n')) {\n\t\t\tnext();\n\t\t}\n\t\t\n\t\tString[] r = new String[] {};\n\t\tr = res.toArray(r);\n\t\treturn r;\n\t}", "private String read(InputStream in) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(in), 1000);\n for (String line = r.readLine(); line != null; line = r.readLine()) {\n sb.append(line);\n }\n in.close();\n return sb.toString();\n }", "private StringBuilder inputStreamToString(InputStream is) {\n String rLine = \"\";\n StringBuilder answer = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\n try {\n while ((rLine = br.readLine()) != null) {\n answer.append(rLine);\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return answer;\n }", "public List<String> sourceString() {\n // Processing is done here\n return Arrays.asList(\"tomato\", \"carrot\", \"cabbage\");\n }", "private String getLineAt(int linenum) {\n\t\ttry {\n\t\t\tint start = mainTextArea.getLineStartOffset(linenum);\n\t\t\tint end = mainTextArea.getLineEndOffset(linenum);\n\t\t\treturn mainTextArea.getText(start, end - start);\n\t\t} catch (BadLocationException e) {\n\t\t\treturn (\"\");\n\t\t}\n\t}", "public static <E> String concatElementsAsLines(List<E> elements) {\n return concatElements(elements, NEW_LINE);\n }", "static String[] wrapLines(String s) {\n if (s.length() <= 80) {\n return new String[]{s};\n }\n int wc = countWrapSep(s);\n if (wc > 0) {\n int[] break_points = new int[wc];\n int offset = 0;\n for (int i = 0; i < wc; i++) {\n int index = s.indexOf('\\u001c', offset);\n break_points[i] = index;\n offset = index + 1;\n }\n\n int first_break = -1;\n for (int i = 0; i < break_points.length; i++) {\n int possible = break_points[i];\n if (possible > 80) {\n break;\n }\n first_break = possible;\n }\n if ( first_break == -1 ) {\n first_break = s.length();\n }\n\n int ws_length = 0;\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ' ')\n ++ws_length;\n else\n break;\n }\n String leading_ws = s.substring(0, ws_length);\n String head = s.substring(0, first_break);\n String tail = s.substring(first_break);\n //head = head.replaceAll(\"[\u001c]\", \"\");\n //tail = tail.replaceAll(\"[\u001c]\", \"\");\n return new String[]{head, leading_ws + double_indent + tail};\n }\n return null;\n }", "@Test(timeout=100)\r\n\tpublic void testLongLines() {\r\n\t\tString message = \"Write-readable-software\";\r\n\t\tint length = message.length();\r\n\t\tRandom rand = new Random();\r\n\t\tint count = 100;\r\n\t\tString [] r1 = new String[count];\r\n\t\tfor(int k=0; k<count; k++) r1[k] = message.substring(rand.nextInt(length)+1);\r\n\t\tcount = 200;\r\n\t\tString [] r2 = new String[count];\r\n\t\tmessage = \"abcdefghij\";\r\n\t\tr2[0] = Character.toString(message.charAt(0));\r\n\t\tfor(int k=1; k<count; k++) r2[k] = r2[k-1]+message.charAt(k%10);\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "public static String removeLineBreaks(String string)\n {\n String[] lines = string.split(\"\\r\\n|\\r|\\n\");\n\n String oneLiner = \"\";\n\n for (String line : lines) {\n oneLiner += line;\n }\n\n return oneLiner;\n }", "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 }", "static String[] copy(Scanner file, int lines){\t\t\n\t\tString[] array = new String[lines];\n\t\tfor(int i = 0; file.hasNextLine(); i++){\n\t\t array[i] = file.nextLine();\n\t\t}\n\t\treturn array;\n\t}", "public static String readAll() {\n if (!scanner.hasNextLine())\n return \"\";\n\n String result = scanner.useDelimiter(EVERYTHING_PATTERN).next();\n // not that important to reset delimeter, since now scanner is empty\n scanner.useDelimiter(WHITESPACE_PATTERN); // but let's do it anyway\n return result;\n }", "public static List<String> splitText(String text) {\n int startLine = 0;\n int i = 0;\n int n = text.length();\n ArrayList<String> rc = new ArrayList<>();\n while (i < n) {\n switch (text.charAt(i)) {\n case '\\n' -> {\n i++;\n if (i < n && text.charAt(i) == '\\r') {\n i++;\n }\n rc.add(text.substring(startLine, i));\n startLine = i;\n }\n case '\\r' -> {\n i++;\n if (i < n && text.charAt(i) == '\\n') {\n i++;\n }\n rc.add(text.substring(startLine, i));\n startLine = i;\n }\n default -> i++;\n }\n }\n if (startLine == text.length()) {\n // still add empty line or previous line wouldn't be treated as completed\n rc.add(\"\");\n } else {\n rc.add(text.substring(startLine, i));\n }\n return rc;\n }" ]
[ "0.7337611", "0.71124935", "0.69221294", "0.67908597", "0.67239934", "0.6517014", "0.6388", "0.63846076", "0.6183947", "0.6133046", "0.6117446", "0.60643685", "0.6042188", "0.6039569", "0.60290587", "0.5998169", "0.59364986", "0.5930923", "0.58995533", "0.58793044", "0.5863892", "0.5856889", "0.58472604", "0.5795247", "0.5752911", "0.5742855", "0.5737316", "0.571916", "0.5716565", "0.57019895", "0.57001513", "0.5689424", "0.5689424", "0.56880504", "0.56790644", "0.56754", "0.56724566", "0.56720287", "0.56619084", "0.5659651", "0.5648796", "0.5645499", "0.56406015", "0.56278825", "0.561974", "0.5613905", "0.5613637", "0.5608084", "0.56007516", "0.560057", "0.55851656", "0.5564947", "0.55558354", "0.5538441", "0.55188674", "0.55188674", "0.55188674", "0.55188674", "0.55188674", "0.55188674", "0.55177116", "0.55153173", "0.55078655", "0.5501811", "0.5469484", "0.546745", "0.5467236", "0.5460264", "0.54600793", "0.54587305", "0.54582894", "0.54562145", "0.54403085", "0.5439047", "0.5428018", "0.5423333", "0.542283", "0.5421176", "0.5418766", "0.54132473", "0.54042095", "0.54041535", "0.5402726", "0.54008764", "0.5388311", "0.5381958", "0.5373879", "0.53715163", "0.53678703", "0.53499687", "0.532759", "0.53239846", "0.53203", "0.5318336", "0.5307895", "0.53059226", "0.5298603", "0.5296676", "0.52966744", "0.52941597", "0.52835023" ]
0.0
-1
Print the screen set
public void print(ScreenSet screenSetPrint) throws EQException { print(screenSetPrint, screenSetPrint.getFunctionData(), null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printScreen() {\n\t\tBrowser.printScreen(this.getClass().getSimpleName());\n\t}", "public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "private void printScreen(byte[] screen, int width)\n\t{\n int w = width / 8;\n int ctr = 0;\n \n for (int i=0; i<screen.length; i++)\n {\n for (int j=0; j<8; j++)\n {\n if ((screen[i] & 1<<j) != 0)\n System.out.print(\"1\");\n else\n System.out.print(\"0\");\n }\n \n System.out.print(\",\");\n ctr++;\n \n if (ctr == w)\n {\n System.out.println();\n \tctr = 0;\n }\n }\n }", "public void printBoard() {\n printStream.println(\n \" \" + positions.get(0) + \"| \" + positions.get(1) + \" |\" + positions.get(2) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(3) + \"| \" + positions.get(4) + \" |\" + positions.get(5) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(6) + \"| \" + positions.get(7) + \" |\" + positions.get(8) + \"\\n\");\n }", "public void printAll()\n {\n r.showAll();\n }", "private void printScreen()\n {\n try\n {\n Graphics g = getGraphics();\n if(drawingArea != null && g != null)\n {\n g.drawImage(drawingArea, 0, 0, null);\n }\n\n // Sync the display on some systems.\n // (on Linux, this fixes event queue problems)\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n }\n catch(Exception ex)\n {\n System.out.println(\"Graphics error: \" + ex);\n }\n }", "void PrintOnScreen(String toPrnt);", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "public void print() {\n System.out.print(\"\\033[H\\033[2J\");\n for(int y = 0; y < this.height; y++) {\n for (int x = 0; x < this.width; x++) {\n ColoredCharacter character = characterLocations.get(new Coordinate(x , y));\n if (character == null) {\n System.out.print(\" \");\n } else {\n System.out.print(character);\n }\n }\n System.out.print(\"\\n\");\n }\n }", "public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}", "public void print()\n {\n System.out.println(\"------------------------------------------------------------------\");\n System.out.println(this.letters);\n System.out.println();\n for(int row=0; row<8; row++)\n {\n System.out.print((row)+\"\t\");\n for(int col=0; col<8; col++)\n {\n switch (gameboard[row][col])\n {\n case B:\n System.out.print(\"B \");\n break;\n case W:\n System.out.print(\"W \");\n break;\n case EMPTY:\n System.out.print(\"- \");\n break;\n default:\n break;\n }\n if(col < 7)\n {\n System.out.print('\\t');\n }\n\n }\n System.out.println();\n }\n System.out.println(\"------------------------------------------------------------------\");\n }", "public static void printBoard() {\n\t\tSystem.out.println(\"Board:\");\r\n\t\tfor(int i=0; i<BoardSquare.numberOfSquare; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.print(String.format(\"%4s\", (i+1) + \":\"));\r\n\t\t\tif(BoardGame.board.get(i).isPlayerOne()) System.out.print(\" P1\"); \r\n\t\t\tif(BoardGame.board.get(i).isPlayerTwo()) System.out.print(\" P2\");\r\n\t\t\tif(BoardGame.board.get(i).isHasCard()) System.out.print(\" C\");\t\t\t\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}", "public void displayToScreen(){\n System.out.println(convertBoardToString());\n delay();\n }", "public void consoleBoardDisplay(){\n\t\tString cell[][] = ttt.getCells();\n\t\tSystem.out.println(\"\\n\" +\n\t\t\t\"R0: \" + cell[0][0] + '|' + cell[0][1] + '|' + cell[0][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R1: \" + cell[1][0] + '|' + cell[1][1] + '|' + cell[1][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R2: \" + cell[2][0] + '|' + cell[2][1] + '|' + cell[2][2] + \"\\n\"\n\t\t);\n\t}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void print() {\n mat.print();\n }", "public void printBoard() {\r\n\t\tBoard.printBoard(this.board);\r\n\t}", "public void print() {\n\t\tSystem.out.println(toString());\n\t}", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void print() {\n\t\tPrinter.print(doPrint());\n\t}", "public void printBoard() {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+getPiece(j, i).getColor().toString().charAt(0)+getPiece(j, i).getName().charAt(0)+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }", "public void print() {\r\n\t\tObject tmp[] = piece.values().toArray();\r\n\t\tfor (int i = 0; i < piece.size(); i++) {\r\n\t\t\tChessPiece p = (ChessPiece)tmp[i];\r\n\t\t\tSystem.out.println(i + \" \" + p.chessPlayer + \":\" + p.position + \" \" + p.isEnabled());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(body.countComponents());\r\n\t}", "public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\n public void printBoard(PrintStream output) {\n this.board.printBoard();\n }", "@Override\n\t\tpublic void print() {\n\n\t\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "public void print() {\n System.out.println(toString());\n }", "private void printOut(String[] printerMakerResult)\n {\n //shows user the printerMaker result\n\n for(int i=0;i<printerMakerResult.length;i++)\n {\n outVideo.println(printerMakerResult[i]);\n outVideo.flush();\n }\n }", "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}", "@Override\n\tpublic String printToScreen(){\n\t\n\t\tif(this.getyMaxLines() == 0){return \"\";}\n\t\tTextProfile textProfile= new TextProfile(this.getScreenScores(), this.getyMaxLines(), this.getYLimitMin(), this.getYLimitMax());\n\t\t\n\t\tArrayList<String> lineStrings= new ArrayList<String>();\n\t\tfor(int i= (textProfile.getProfile().size() - 1); i >= 0; i--){\n\t\t\tList<String> xl= textProfile.getProfile().get(i);\n\t\t\tlineStrings.add(StringUtils.join(xl, \"\"));\n\t\t}\t\t\n\t\treturn Joiner.on(\"\\n\").join(lineStrings);\n\t}", "public void print() {\n System.out.print(\"[ \" + value + \":\" + numSides + \" ]\");\n }", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public void print() {\n int rows = this.getNumRows();\n int cols = this.getNumColumns();\n\n for (int r = 0; r < rows; r++) {\n\n for (int c = 0; c < cols; c++) {\n System.out.print(this.getString(r, c) + \", \");\n }\n\n System.out.println(\" \");\n }\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "public static void print() {\r\n\t\tSystem.out.println(\"1: Push\");\r\n\t\tSystem.out.println(\"2: Pop\");\r\n\t\tSystem.out.println(\"3: Peek\");\r\n\t\tSystem.out.println(\"4: Get size\");\r\n\t\tSystem.out.println(\"5: Check if empty\");\r\n\t\tSystem.out.println(\"6: Exit\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "public void display() {\n\t\tSystem.out.print(\"\\nPC \");\n\t\tmPC.display(true);\n\t\tSystem.out.print(\" \");\n\n\t\tSystem.out.print(\"IR \");\n\t\tmPC.display(true);\n\t\tSystem.out.print(\" \");\n\n\t\tSystem.out.print(\"CC \");\n\t\tmCC.display(true);\n\t\tSystem.out.println(\" \");\n\n\t\tfor (int i = 0; i < MAX_REGISTERS; i++) {\n\t\t\tSystem.out.printf(\"R%d \", i);\n\t\t\tmRegisters[i].display(true);\n\t\t\tif (i % 3 == 2) {\n\t\t\t\tSystem.out.println();\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < MAX_MEMORY; i++) {\n\t\t\tSystem.out.printf(\"%3d \", i);\n\t\t\tmMemory[i].display(true);\n\t\t\tif (i % 3 == 2) {\n\t\t\t\tSystem.out.println();\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\n\t}", "public void draw() {\r\n System.out.print(this);\r\n }", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "public void print() {\n\t\tSystem.out.println(\"针式打印机打印了\");\n\t\t\n\t}", "public void print() {\n\t\tSystem.out.println(\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName+\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)+\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress);\r\n\t}", "private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }", "protected void logToScreen() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tdisplayInfo = !displayInfo;\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tproc.setDisplayInfo(displayInfo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t}\r\n\t}", "public void print() {\n\t\tfor(int i = 0; i < size; i++) {\n\t\t\tfor(int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(m[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\t\n\t}", "public void printScreen() {\n Graphics g;\n try {\n g = this.getGraphics();\n g.setColor(Color.red);\n if (dbImage != null) {\n g.drawImage(dbImage, 0, 0, null);\n String text = \"Score:\" + gameData.score.score;//text of displated score\n g.drawString(text, 50, 50);\n } else {\n System.out.println(\"printScreen:graphic is null\");\n }\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n } catch (Exception e) {\n System.out.println(\"Graphics error: \" + e);\n }\n }", "void printBattle(ConsolePrinter printer);", "@Override\r\n\tpublic void print() {\n\t}", "public void print() {\n int n = getSeq().size();\n int m = n / printLength;\n for (int i = 0; i < m; i++) {\n printLine(i * printLength, printLength);\n }\n printLine(n - n % printLength, n % printLength);\n System.out.println();\n }", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public void print(){\r\n System.out.println(toString());\r\n }", "public void print() {\n stdout(name + \", \" + description);\n stdout(\"-----------------------------------\");\n for (MenuComponent menuComponent : components) {\n menuComponent.print();\n }\n stdout(\"\\n\");\n }", "@Override\n\tpublic void print() {\n\n\t}", "@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\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}", "public void printAll() {\n\t\tfor(int i = 0; i<r.length; i++)\n\t\t\tprintReg(i);\n\t\tprintReg(\"hi\");\n\t\tprintReg(\"lo\");\n\t\tprintReg(\"pc\");\n\t}", "static void showBoard() \n\t{\n\t\tSystem.out.println(\"|---|---|---|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[1] + \" | \" + tictactoeBoard[2] + \" | \" + tictactoeBoard[3] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[4] + \" | \" + tictactoeBoard[5] + \" | \" + tictactoeBoard[6] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[7] + \" | \" + tictactoeBoard[8] + \" | \" + tictactoeBoard[9] + \" |\");\n\t\tSystem.out.println(\"|---|---|---|\");\n\t}", "public void printShipBoard() {\n\t\tSystem.out.println(Arrays.deepToString(this.shipBoard));\n\t}", "public void printBoard() {\n\t\tSystem.out.print(\"\\r\\n\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\");\n\t\tfor(int i = BOARD_SIZE ; i > 0 ; i--) {\n\t\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\t\tfor(int j = 0; j < BOARD_SIZE ; j++) {\n\t\t\t\tif(j == 0) {\n\t\t\t\t\tSystem.out.print(i + \" |\");\n\t\t\t\t} \n\t\t\t\tif(this.tiles.get(i).get(j).getPiece() != null) {\n\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece().getColor() == PrimaryColor.BLACK) {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" B |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"B Q|\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" W |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"W Q|\");\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\" |\");\n\t\t\t\t}\n\n\t\t\t\tif(j==BOARD_SIZE-1) {\n\t\t\t\t\tSystem.out.print(\" \" + i); \n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\\r\\n\");\n\n\t}", "public void print() {\n System.out.println(\"I am \" + status() + (muted ? \" and told to shut up *sadface*\" : \"\") + \" (\" + toString() + \")\");\n }", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "public void printBoard() {\r\n\t\tif (getOpenTiles() != 0) {\r\n\t\t\tSystem.out.println(\"\\n\\nCurrent open tiles: \" + getOpenTiles() + \" | Total moves: \" + getMoves() + \" | Current board:\");\r\n\t\t}for (int i = 0; i < gameBoard.length; i++) {\r\n\t\t\tfor (int j = 0; j < gameBoard[i].length; j++) {\r\n\t\t\t\tif (gameBoard[i][j] != 0) {\r\n\t\t\t\t\tSystem.out.print(gameBoard[i][j]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}System.out.print(\" | \");\r\n\t\t\t}System.out.print(\"\\n--+\");\r\n\t\t\tfor (int k = 0; k < getSize(); k++) {\r\n\t\t\t\tSystem.out.print(\"---+\");\r\n\t\t\t}System.out.println();\r\n\t\t}\r\n\t}", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void print(){\n for (int i = 0; i < rows; i++)\n {\n for (int j = 0; j < cols; j++)\n {\n if (start.getCol()==j&&start.getRow()==i)\n System.out.print('S');\n else if (end.getCol()==j&&end.getRow()==i)\n System.out.print('E');\n else if (maze[i][j]==1)\n System.out.print('\\u2588');\n else if (maze[i][j]==0)\n System.out.print('\\u2591');\n if (j!=cols-1){\n System.out.print(\" \");\n }\n }\n System.out.println();\n }\n //System.out.println(\"-------\");\n }", "private void print() {\n\t\t// reorganize a wraparound queue and print\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(bq[(head + i) % bq.length] + \" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "public void print()\n {\n StringBuffer buffer = new StringBuffer();\n for (int i = 0; i < memorySize; i++)\n {\n buffer.append(mainMemory[i]);\n }\n System.out.println(buffer.toString());\n }", "public void printBoard() {\n\t\tSystem.out.println();\n\t\tint i;\n\t\tfor (i = 0; i < 7; i++) {\n\t\t\tSystem.out.print(board[13 - i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.printf(\" \");\n\t\twhile (i < 14) {\n\t\t\tSystem.out.print(board[i - 7] + \" \");\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void PrintBoard() {\n\tSystem.out.println(\"printing from class\");\n\t\tString[][] a = this.piece;\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 <- X axis\");\n\t\tSystem.out.println(\" +----------------+ \");\n\t\t\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tSystem.out.print(i + \" |\");\n\t\t\tfor (int j=0; j<8;j++) {\n\t\t\t\t\n\t\tSystem.out.print(\"\" + a[i] [j] + \" \");\n\t\t\t\t\t} \n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t\tSystem.out.println(\" +----------------+ \");\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 \");\n\t\n\t}", "public void print_board(){\n\t\tfor(int i = 0; i < size*size; i++){\n\t\t\tif(i%this.size == 0) System.out.println(); //just for divider\n\t\t\tfor(int j = 0; j < size*size; j++){\n\t\t\t\tif(j%this.size == 0) System.out.print(\" \"); //just for divider\n\t\t\t\tSystem.out.print(board[i][j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void print() {\n\t\tcounter++;\n\t\tSystem.out.print(counter + \" \");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(squares[j][i].getValue());\n\t\t }\n\t\t System.out.print(\"//\");\n\t\t}\n\t\tSystem.out.println();\n }", "public void dumpCommand() {\r\n System.out.println(_board);\r\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() + this.cardsInDeck[index].getColor() + \",\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void display() {\n System.out.println(toString());\n }", "public void DrawScreen() {\r\n DrawScreen(0, false, null);\r\n }", "static void printBoard() \r\n {\r\n \tSystem.out.println(\"/---|---|---\\\\\");\r\n \tSystem.out.println(\"| \" + board[0][0] + \" | \" + board[0][1] + \" | \" + \r\n \tboard[0][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[1][0] + \" | \" + board[1][1] + \" | \" + \r\n \tboard[1][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[2][0] + \" | \" + board[2][1] + \" | \" + \r\n \tboard[2][2] + \" |\");\r\n \tSystem.out.println(\"\\\\---|---|---/\");\r\n }", "public void printBoard() {\n\t\tfor (int colIndex = 0; colIndex < 4; colIndex++){\n\t\t\tfor (int rowIndex = 0; rowIndex < 4; rowIndex++){\n\t\t\t\tSystem.out.print(this.myBoard[colIndex][rowIndex] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void print() {\r\n this.table.printTable();\r\n }", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "public void printAll() {\n\t\tSystem.out.println(mainPot);\n\t\tcurrentPlayer.printHandAndPocket();\n\t\tcurrentPlayer.printCombos();\n\t\topponentPlayer.printCombos();\n\t\tSystem.out.println();\n\t}", "public static void clearScreen(int num) {\n for (int i = 0; i < num; i++) {\n System.out.println(); \n System.out.flush();\n } \n }", "public void print() {\n System.out.println(this.toString());\n }" ]
[ "0.77787423", "0.702625", "0.70046264", "0.6869392", "0.6842364", "0.68269384", "0.68075836", "0.6673169", "0.666039", "0.6647892", "0.66402787", "0.6615399", "0.66139364", "0.6585994", "0.65858316", "0.65595675", "0.65565205", "0.6553536", "0.6553204", "0.65333176", "0.653293", "0.6527733", "0.65227526", "0.6492119", "0.64755887", "0.6465904", "0.64649844", "0.64578766", "0.6450864", "0.64470756", "0.64459884", "0.6440935", "0.643201", "0.6415176", "0.6409068", "0.638584", "0.63752365", "0.63749033", "0.6368237", "0.6366178", "0.63566494", "0.63505554", "0.6345547", "0.6322152", "0.63139224", "0.630695", "0.6302914", "0.6302491", "0.6301043", "0.6300507", "0.62981915", "0.62694436", "0.6268952", "0.62669545", "0.62637377", "0.62573326", "0.62471503", "0.6246247", "0.6245707", "0.6243096", "0.6242878", "0.6240291", "0.62245154", "0.6222309", "0.6217242", "0.6210357", "0.6209668", "0.62079877", "0.620435", "0.620234", "0.620234", "0.620234", "0.620234", "0.620234", "0.620234", "0.620234", "0.620234", "0.620234", "0.6200253", "0.6195353", "0.61931574", "0.61829716", "0.6181947", "0.6178317", "0.6173114", "0.61708474", "0.6170206", "0.61700535", "0.6169741", "0.61691535", "0.61674196", "0.61641634", "0.6154498", "0.61539274", "0.61434865", "0.613816", "0.61370707", "0.6134972", "0.6133033", "0.61203116" ]
0.66305804
11
Print the After and Before image Function Data
public void print(ScreenSet screenSetPrint, FunctionData srcFunctionDataAft, FunctionData srcFunctionDataBef) throws EQException { // Screenset to print this.screenSetPrint = screenSetPrint; // Create a copy of after image this.functionDataAft = srcFunctionDataAft.duplicateFunctionData(); this.functionDataAft.lockedInputFields(); validateFunctionData(this.functionDataAft); // Create a copy of before image; if (srcFunctionDataBef != null) { beforeImage = false; this.functionDataBef = srcFunctionDataBef.duplicateFunctionData(); this.functionDataBef.lockedInputFields(); validateFunctionData(this.functionDataBef); } // print print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "public void displayImageToConsole();", "public void printImage() {\n\t System.out.print(\"\\n\");\n for (int i=0; i<width*height; i++) {\n if (i % width==0) System.out.print(\"\\n\");\n System.out.print(image[i]+ \" \");\n }\n System.out.print(\"\\n\\n\");\n }", "static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}", "private void reanderImage(ImageData data) {\n \n }", "@Override\n\tpublic void outputData() {\n\t\tSystem.out.println(\"输出显示器中的相对物理坐标!\");\n\t}", "public void debugPrint() {\n System.out.println(\"### Image Handler ###\");\n System.out.println(\"Handling: \" + images.size());\n }", "private static void print(int[][] image) {\n for(int i = 0; i < image.length; i++) {\n for(int j = 0; j < image[0].length; j++) {\n System.out.print(image[i][j] + \" \");\n }\n System.out.println(\"\\n\");\n }\n }", "private static byte[] mergeImageAndText(BufferedImage im, String name, String event, Point pointName, Point pointEvent) throws IOException {\n\t\tGraphics2D g2 = im.createGraphics(); //graohics obj banaya to draw\n\t\tSystem.out.println(name);\n\t\tg2.setFont(new Font(\"TimesRoman\", Font.BOLD,28));\n\t\tg2.setColor(Color.BLACK);\n\t\tg2.drawString(name, pointName.x, pointName.y);//write text\n\t\tg2.drawString(event, pointEvent.x, pointEvent.y);//write text\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tImageIO.write(im, \"jpg\", baos);\n\t\treturn baos.toByteArray();\n\t}", "public void renderImage()\n {\n for (int i = 0; i < _imageWriter.getNx(); i++)\n {\n for (int j = 0; j < _imageWriter.getNy(); j++)\n {\n Ray ray;\n ray = new Ray(_scene.getCamera().constructRayThroughPixel(_imageWriter.getNx(), _imageWriter.getNy(),j,i,\n _scene.getScreenDistance(), _imageWriter.getWidth(),_imageWriter.getHeight()));\n\n if(i==255 && j==255)\n System.out.print(\"111\");\n Map<Geometry, List<Point3D>> intersectionPoints = new HashMap<>(getSceneRayIntersections(ray));\n\n if(intersectionPoints.isEmpty())\n _imageWriter.writePixel(j, i, _scene.getBackground());\n else\n {\n Map<Geometry, Point3D> closestPoint = getClosestPoint(intersectionPoints);\n Map.Entry<Geometry,Point3D> entry;\n Iterator<Entry<Geometry, Point3D>> it = closestPoint.entrySet().iterator();\n entry = it.next();\n _imageWriter.writePixel(j, i, calcColor(entry.getKey(), entry.getValue(), ray));\n }\n\n }\n }\n //printGrid(1);\n\n }", "private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}", "@Override\n public byte[] getBytes(EscPosImage image) {\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n //\n bytes.write(ESC);\n bytes.write('a');\n bytes.write(justification.value);\n //\n int paramSize = image.getRasterSizeInBytes() + 10;\n int pL = paramSize & 0xFF;\n int pH = (paramSize & 0xFF00) >> 8 ;\n\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(pL); // pl\n bytes.write(pH); // ph\n bytes.write(48); // m\n bytes.write(112); //fn\n bytes.write(48); // a\n bytes.write(graphicsImageBxBy.bx); // bx\n bytes.write(graphicsImageBxBy.by); // by\n bytes.write(49); // c\n\n // bits in horizontal direction for the bit image\n int horizontalBits = image.getWidthOfImageInBits();\n int xL = horizontalBits & 0xFF;\n int xH = (horizontalBits & 0xFF00) >> 8 ;\n // \n // bits in vertical direction for the bit image\n int verticalBits = image.getHeightOfImageInBits();\n // getting first and second bytes separatted\n int yL = verticalBits & 0xFF;\n int yH = (verticalBits & 0xFF00) >> 8 ;\n \n bytes.write(xL);\n bytes.write(xH);\n bytes.write(yL);\n bytes.write(yH);\n // write bytes\n byte [] rasterBytes = image.getRasterBytes().toByteArray();\n bytes.write(rasterBytes,0,rasterBytes.length);\n \n // function 050\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(2); // pl\n bytes.write(0); // ph\n bytes.write(48); //m\n bytes.write(50); //fn\n \n \n \n\n //\n return bytes.toByteArray();\n \n }", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }", "public void printDataset() {\n for (int i = 0; i < getNumPoints(); i++) {\n System.out.println(\"\\n\" + getPoint(i));\n }\n System.out.println(\" \");\n }", "public void Func_imagefile(){\n\n\t\tswf_env.containImg = true;\n\n\n\t\tthis.value = new SWFValue(\"Func\");\n\n\t\tString path = this.getAtt(\"path\", \".\");\n\t\tString filename = this.getAtt(\"default\");\n\t\tString type = \"auto\";\n\t\tvalue.instanceName = \"img\"+ Integer.toString(swf_env.instanceID);\n\t\tvalue.data = \"\";\n\t\tvalue.imgpath = path + \"/\" + filename;\n\t\tvalue.inter_imgpath = path + \"/\" + filename;\n\t\tvalue.inter_name = \"intimg\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.tmp = \"tmp\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.lnum = Integer.toString(swf_env.visibleflag_counter);\n\n\n\t\tif(!path.startsWith(\"/\")) {\n\t\t\tString basedir = GlobalEnv.getBaseDir();\n\t\t\tLog.out(\"basedir= \" +basedir);\n\t\t\tif(basedir != null && basedir != \"\") {\n\t\t\t\tpath = basedir + path;\n\t\t\t}\n\t\t}\n\n\t\tString filepath = path + \"/\" + filename;\n\n\n\t\tsetDecoration1();\n\t\tvalue.margin = margin;\n\n\n\t\tSystem.out.println(\"filepath = \"+filepath);\n\t\tint img = swf_env.open_image_file(type, filepath);\n\t\tvalue.img = img;\n\n\t\tdata_width = swf_env.get_value(\"imagewidth\", img);\n\t\tdata_height = swf_env.get_value(\"imageheight\", img);\n\t\tSystem.out.println(\"imagesize: \"+data_width+\" \"+data_height);\n\t\twidth = data_width + margin * 2;\n\t\theight = data_height + margin * 2;\n\n\n\t\tsetDecoration2();\n\n\t\tif(data_width > width){\n\t\t\tint original_width = data_width;\n\t\t\tdata_width = width - margin * 2;\n\t\t\tint scale = data_width / original_width;\n\t\t\tdata_height = data_height * scale;\n\t\t\theight = data_height + margin * 2;\n\t\t}\n\t\tif(data_height > height){\n\t\t\tint original_height = data_height;\n\t\t\tdata_height = height - margin * 2;\n\t\t\tint scale = data_height / original_height;\n\t\t\tdata_width = data_width * scale;\n\t\t\twidth = data_width + margin * 2;\n\t\t}\n\n\t\tvalue.data_width = data_width;\n\t\tvalue.data_height = data_height;\n\t\tvalue.width = width;\n\t\tvalue.height = height;\n\t\t//morya wrote\n\t\tvalue.int_w = width;\n\t\tvalue.int_h = height;\n\n\n\t\tsetDecoration3();\n\n\t\tswf_env.tmp_width = width;\n\t\tswf_env.tmp_height = height;\n\n\n\t\tswf_env.instanceID++;\n\n\t}", "void ProcessImage() {\n DoDescribe();\n }", "public static void printAlpha(FqImage imh) {\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"a\"+imh.points[i][j].getAlpha()+\"a\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public String toString() {\n return \"code: \" + this.paintCode + \"secCode: \" + this.secCode + \", image: \" + this.image;\n }", "public void showBeforeAfterLocation() {\n\t\tfor (Integer key : afterLoc.keySet()) {\n\t\t\tdouble[] ary = afterLoc.get(key);\n\n\t\t\tString locationA = \"\";\n\t\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t\tlocationA += Config.roundTwoDecimals(ary[i]) + \"\\t\";\n\t\t\t}\n\n\t\t\tdouble[] ary2 = beforeLoc.get(key);\n\n\t\t\tString locationB = \"\";\n\t\t\tfor (int i = 0; i < ary2.length; i++) {\n\t\t\t\tlocationB += Config.roundTwoDecimals(ary2[i]) + \"\\t\";\n\t\t\t}\n\t\t\tCaller.log(\" AFTER: \" + key + \" | \" + locationA + \"\\t|\" + attractors.get(key).count);\n\t\t}\n\t}", "public byte[] readImagePNG(BufferedImage bufferedimage) throws IOException{\n byte[] data = ImageUtil.toByteArray(bufferedimage);\r\n /* \r\n for (int i = 0; i < data.length; i++) {\r\n if(i!=0&&i%4==0)\r\n System.out.println();\r\n System.out.format(\"%02X \",data[i]);\r\n }\r\n */ \r\n \r\n \r\n \r\n \r\n byte[] stximage = getStximage();\r\n byte[] etximage = getEtximage();\r\n \r\n byte[] stxdata = new byte[stximage.length];\r\n byte[] etxdata = new byte[etximage.length];\r\n byte[] length = new byte[4];\r\n \r\n boolean stxsw=false;\r\n boolean etxsw=false;\r\n byte[] full_data=null;\r\n byte[] only_data=null;\r\n try{\r\n for (int i = 0; i < data.length; i++) {\r\n System.arraycopy(data, i, stxdata,0, stxdata.length);\r\n stxsw = ByteUtil.equals(stximage, stxdata);\r\n int subindex=i+stxdata.length;\r\n if(stxsw){\r\n System.arraycopy(data, subindex, length,0, length.length);\r\n int length_fulldata = ConversionUtil.toInt(length);\r\n // System.out.format(\"%02X %d subIndex[%d]\",data[subindex],length_fulldata,subindex);\r\n \r\n \r\n subindex+=i+length.length;\r\n int etx_index= subindex+ length_fulldata;\r\n // System.out.println(\"subindex : \"+subindex+\" etx_index : \"+etx_index);\r\n System.arraycopy(data, etx_index, etxdata,0, etxdata.length);\r\n \r\n// for (int j = 0; j < etxdata.length; j++) {\r\n// System.out.format(\"%02X \",etxdata[j]);\r\n// }\r\n \r\n etxsw = ByteUtil.equals(etximage, etxdata);\r\n if(etxsw){\r\n full_data = new byte[etx_index-subindex];\r\n System.arraycopy(data, subindex, full_data,0, full_data.length); //fulldata\r\n break;\r\n }else{\r\n continue;\r\n }\r\n }\r\n \r\n \r\n }\r\n \r\n /////only data search\r\n System.arraycopy(full_data, 0, length,0, length.length);\r\n int length_onlydata = ConversionUtil.toInt(length); \r\n only_data = new byte[length_onlydata];\r\n System.arraycopy(full_data, length.length, only_data,0, only_data.length);\r\n \r\n \r\n \r\n }catch (Exception e) {\r\n return null;\r\n }\r\n \r\n return only_data;\r\n \r\n }", "@Override\n public void mouseMoved(MouseEvent me)\n {\n double facEscala = 1.0;\n if (escala >= 0)\n {\n facEscala = escala+1;\n }\n else\n {\n facEscala = Math.pow(2,escala);\n }\n \n \n\t this.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));\n if (escala!=0)\n {\n readIterator = RandomIterFactory.create(this.source, null); // creates the iterator.\n }\n else\n {\n readIterator = RandomIterFactory.create(this.source, null); // creates the iterator.(Por ser de byte)\n }\n \n pixelInfo.setLength(0); // clear the StringBuffer\n int x = me.getX();\n int y = me.getY();\n if ((x >= width*facEscala) || (y >= height*facEscala))\n {\n pixelInfo.append(\"No data!\");\n return;\n }\n if (isDoubleType) // process the pixel as an array of double values\n {\n \treadIterator.getPixel(me.getX(),me.getY(),dpixel); // read the pixel\n \tString valpixel = new String(ic.buscar(133)); // Tag 133\n \tfor(int b=0;b<ipixel.length;b++)\n \t {\n \t\t valpixel = valpixel.concat(ic.buscar(134)+b+\": \"+ipixel[b]+\", \"); // Tag 134 \t\n \t }\n \t if (gdata!=null)\n \t {\n \t\t double geoX = x*facEscala*scales[0]+tiepoints[0][3];\n \t\t double geoY = y*facEscala*scales[1]+tiepoints[0][4];\n \t\t \n \t\t principal.getStatus().setText(valpixel\n +\"(\"\n +x\n +\", \"\n +y\n +\")\"\n +ic.buscar(135)\n +geoX\n +\" \"\n +linearunits\n +\", \"\n +geoY\n +\" \"\n +linearunits\n +ic.buscar(136)\n +geozone); // Tag 135, 136\n \t }\n \t else\n \t {\n \t\t principal.getStatus().setText(valpixel+\"(\"+x+\", \"+y+\")\");\n \t }\n }\n else // pixel type is not floating point, will be processed as integers.\n {\n if (isIndexed) // if color model is indexed\n {\n\n readIterator.getPixel(me.getX(),me.getY(),ipixel); // read the pixel\n\n for(int b=0;b<ipixel.length;b++)\n {\n \tprincipal.getStatus().setText(\" RGB:\"+lutData[0][ipixel[0]]+\",\"+\n lutData[1][ipixel[0]]+\",\"+\n lutData[2][ipixel[0]]+\"(\"+x+\", \"+y+\")\");\n }\n }\n else // pixels are of integer type, but not indexed\n {\n \n readIterator.getPixel(me.getX(),me.getY(),ipixel); // read the pixel\n String valpixel = new String(ic.buscar(133)); // Tag 133\n \t for(int b=0;b<ipixel.length;b++)\n \t {\n \t\t valpixel = valpixel.concat(ic.buscar(134)+b+\": \"+ipixel[b]+\", \"); // Tag 134\n \t }\n \t if (gdata!=null)\n \t {\n \n \n \t\t double geoX=0, geoY=0;\n \t\t if (tiepoints[0][0]==0 && tiepoints[0][1]==0)\n \t\t {\n \t\t\t geoX = x*facEscala*scales[0]+tiepoints[0][3];\n \t\t\t geoY = y*facEscala*scales[1]+tiepoints[0][4];\n \t\t }\n \t\t else\n \t\t {\n \t\t\t double despx = x-tiepoints[0][0];\n \t\t\t double despy = y-tiepoints[0][1];\n \t\t\t geoX = Math.abs(despx)*facEscala*scales[0]+(Math.signum(despx)*tiepoints[0][3]);\n \t\t\t geoY = Math.abs(despy)*facEscala*scales[1]+(Math.signum(despy)*tiepoints[0][4]);\n \t\t }\n \t\t \n \t\tDecimalFormat df = new DecimalFormat(\"0.000\"); //No me gusta poner punto\n\t\t String geoXs = df.format(geoX);\n\t\t String geoYs = df.format(geoY);\n\t\t String [] latlong = GeoInfo.convertirUTM(geozona, georef, geoX, geoY, unidad, elipsoide, ic);\n\t\t principal.getStatus().setText(valpixel\n +\"(\"\n +x\n +\", \"\n +y\n +\")\"\n +ic.buscar(135)\n +geoXs\n +\" \"\n +linearunits\n +\", \"\n +geoYs\n +\" \"\n +linearunits\n +\") | Lat: \"\n +latlong[0]\n +\" Long: \"\n +latlong[1]\n +ic.buscar(136)\n +geozone); // Tag 135, 136\n \t }\n \t else\n \t {\n \t\t principal.getStatus().setText(valpixel+\"(\"+x+\", \"+y+\")\");\n \t }\n \t\n }\n } // pixel is integer type\n }", "public void printResult(String image, String value) {\n\t\ttry {\n\t\t\t// Read in the image.\n\t\t\tBufferedImage img = new BufferedImage(I1.getRowDimension(), \n\t\t\t\t\tI1.getColumnDimension(),\n\t\t\t\t BufferedImage.TYPE_INT_RGB);\n\t\t\tdouble n[][] = new double[I1.getRowDimension()][I1.getRowDimension()];\n\t\t\tif (value.equals(\"X\"))\n\t\t\t\tn = normalize255(this.Nx);\n\t\t\telse if (value.equals(\"Y\"))\n\t\t\t\tn = normalize255(this.Ny);\n\t\t\telse if (value.equals(\"Z\"))\n\t\t\t\tn = normalize255(this.Nz);\n\t\t\telse if (value.equals(\"D\"))\n\t\t\t\tn = normalize255(this.D);\n\t\t\t// Transform the image into a grayscale image.\n\t\t\tfor (int i=0; i < I1.getRowDimension(); i++) {\n\t\t\t\tfor (int j=0; j < I1.getColumnDimension(); j++) {\n\t\t\t\t\tint albedo = (int) n[i][j];\n\t\t\t\t\timg.setRGB(i, j, new Color(albedo, albedo, albedo).getRGB());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tImageIO.write(img, \"png\", new File(image));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading \" + \"yeah\");\n\t\t}\n\t}", "private void printData() {\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tlog(\" *** data index \" + i + \" = \" + data.elementAt(i));\n\t\t}\n\t}", "@Test\n public void endToEndTest() throws FitsException, IOException, ClassNotFoundException {\n\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n //Test the ImageData without mask\n BufferedImage calculatedImage = imageData.getImage(frArray);\n\n compareImage(expectedImage,calculatedImage);\n\n\n //Test the ImageData withmask\n ImageData imageDataWithMask = new ImageData(frArray, IMAGE_TYPE,imageMasks, rangeValues, 0,0, 100, 100, true );\n BufferedImage calculatedImageWithMask = imageDataWithMask.getImage(frArray);\n compareImage(expectedImageWithMask,calculatedImageWithMask);\n\n }", "private void postProcessing() {\n // create the element for erode\n Mat erodeElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_ERODE + 1,2 * KERNELSIZE_ERODE + 1 ),\n new Point(KERNELSIZE_ERODE, KERNELSIZE_ERODE));\n // create the element for dialte\n Mat dialElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_DILATE + 1,2 * KERNELSIZE_DILATE + 1 ),\n new Point(KERNELSIZE_DILATE, KERNELSIZE_DILATE));\n\n // erode image to remove small noise\n Imgproc.erode(binary, binary, erodeElement);\n\n // dilate the image DILATETIMES to increase what we see\n for (int i = 0; i < DILATETIMES; i++)\n Imgproc.dilate(binary, binary, dialElement);\n }", "@Override\n\tpublic String drawForConsole() {\n\t\tString[][] output = new String[this.getWidth()][this.getHeight()];\n\t\tString image = \"\";\n\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\t\tif (x == 0 || x == this.getWidth() - 1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (y == 0 || y == this.getHeight() -1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (this.isFilledIn()) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else {\n\t\t\t\t\toutput[x][y] = \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\t\timage += output[x][y];\n\t\t\t\tif (x == this.getWidth() - 1) {\n\t\t\t\t\timage += \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn image;\n\t}", "public void drawInfo(Graphics g) {\n if (db == null) return;\n int zVal = zSliceSel == null ? 1 : zSliceSel.getValue();\n int tVal = tSliceSel == null ? 1 : tSliceSel.getValue();\n \n int textGap = 0;\n \n int nSlices = imp.getStackSize();\n \n // ImageStack stack = imp.getStack();\n int currentSlice = imp.getCurrentSlice();\n \n StringBuffer sb = new StringBuffer();\n sb.append(currentSlice);\n sb.append(\"/\");\n sb.append(nSlices);\n sb.append(\"; \");\n if (db.hasZ) {\n sb.append(zString);\n sb.append(\": \");\n sb.append(zVal);\n sb.append(\"/\");\n sb.append(db.numZ);\n sb.append(\"; \");\n }\n if (db.hasT) {\n sb.append(tString);\n sb.append(\": \");\n sb.append(tVal);\n sb.append(\"/\");\n sb.append(db.numT);\n sb.append(\"; \");\n }\n if (db.names != null) {\n String name = db.names[currentSlice - 1];\n if (name != null) {\n sb.append(name);\n sb.append(\"; \");\n }\n }\n \n int width = imp.getWidth(), height = imp.getHeight();\n Calibration cal = imp.getCalibration();\n if (cal.pixelWidth != 1.0 || cal.pixelHeight != 1.0) {\n sb.append(IJ.d2s(width * cal.pixelWidth, 2));\n sb.append(\"x\");\n sb.append(IJ.d2s(height * cal.pixelHeight, 2));\n sb.append(\" \");\n sb.append(cal.getUnits());\n sb.append(\" (\");\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\"); \");\n }\n else {\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\" pixels; \");\n }\n int type = imp.getType();\n int stackSize = imp.getStackSize();\n int size = (width * height * stackSize) / 1048576;\n switch (type) {\n case ImagePlus.GRAY8:\n sb.append(\"8-bit grayscale\");\n break;\n case ImagePlus.GRAY16:\n sb.append(\"16-bit grayscale\");\n size *= 2;\n break;\n case ImagePlus.GRAY32:\n sb.append(\"32-bit grayscale\");\n size *= 4;\n break;\n case ImagePlus.COLOR_256:\n sb.append(\"8-bit color\");\n break;\n case ImagePlus.COLOR_RGB:\n sb.append(\"RGB\");\n size *= 4;\n break;\n }\n sb.append(\"; \");\n sb.append(size);\n sb.append(\"M\");\n \n Insets insets = super.getInsets();\n g.drawString(sb.toString(), 5, insets.top + textGap);\n }", "private static final byte[] xfplot_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -60, 16, 0, -65,\n\t\t\t\t3, 28, -1, 0, 21, -1, 0, 68, 0, 0, 0, -1, 0, 114, -1, 0, -70,\n\t\t\t\t-18, 0, -1, -1, 0, -27, -52, 0, -1, -78, 0, -1, -121, 0, -1,\n\t\t\t\t59, 0, -1, 93, 0, -1, 0, -112, -1, 0, 102, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 16, 0, 44, 0, 0, 0, 0,\n\t\t\t\t16, 0, 16, 0, 0, 5, 103, 32, 36, -114, 16, 0, -112, 40, 25,\n\t\t\t\t-84, 65, -102, 10, -80, -112, 14, 36, 97, -33, 40, 61, 22,\n\t\t\t\t-123, -51, -25, 35, -61, -31, -64, 27, 26, 72, 58, 8, -62, 32,\n\t\t\t\t60, 48, 17, 72, 81, 2, 65, 125, 82, 19, 35, 93, 98, 75, -67,\n\t\t\t\t110, -77, 16, -123, 88, -79, -35, -114, 21, -94, -63, -126,\n\t\t\t\t-63, 62, -117, -39, -116, 5, -92, -31, 120, -40, -31, 112, -5,\n\t\t\t\t-61, -47, -128, 12, 6, 122, 11, -126, 11, 122, 127, 72, -128,\n\t\t\t\t15, -126, 118, -122, 46, 127, 14, 14, -116, 46, 35, 13, 125,\n\t\t\t\t41, 33, 0, 59 };\n\t\treturn data;\n\t}", "public void displayCurrentValues() {\n currentX.setText(Float.toString(singleSample[0]));\n currentY.setText(Float.toString(singleSample[1]));\n currentZ.setText(Float.toString(singleSample[2]));\n }", "static void insertion(BufferedImage img, BufferedImage waterImg, int width, int height, StringBuilder binary, int[] Estimator_pos) {\n int block_num = 0;\r\n int msg_counter = 0;\r\n\r\n for (int x = 0; x < width; x++) {\r\n for (int y = 0; y < height; y++) {\r\n\r\n int b1 = img.getRGB(x, y);\r\n int p1 = (b1 >> 16) & 0xff;\r\n int b2 = img.getRGB(x, y + 1);\r\n int p2 = (b2 >> 16) & 0xff;\r\n int b3 = img.getRGB(x + 1, y);\r\n int p3 = (b3 >> 16) & 0xff;\r\n int b4 = img.getRGB(x + 1, y + 1);\r\n int p4 = (b4 >> 16) & 0xff;\r\n\r\n //geting a random 1-4 for estimator\r\n Random rn = new Random();\r\n int estimator = rn.nextInt(4) + 1;\r\n //System.out.println(estimator);\r\n Estimator_pos[block_num] = estimator;\r\n// System.out.println(\" p1 : \"+p1 + \"| p2 : \" + p2 + \"| p3 : \" + p3 + \"| p4 : \" + p4);\r\n //-----------comparing estimator with pixels ------------------\r\n if ((p1 < 255) && (p2 < 255) && (p3 < 255) && (p4 < 255)) {\r\n\r\n // System.out.println(estimator);\r\n switch (estimator) {\r\n\r\n case 1: //------------------------------------------------------------------------------------- case 1\r\n //System.out.println(\"case 1\");\r\n estimator = p1;\r\n ////writing back estimator \r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n if (Math.abs(estimator - p2) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p2 = p2 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p2 = p2 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p2 > 0) {\r\n\r\n p2 = p2 - 2;\r\n } else if (estimator - p2 < 0) {\r\n p2 = p2 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n\r\n waterImg.setRGB(x, y + 1, p2);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p3) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p3 = p3 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p3 = p3 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p3 > 0) {\r\n\r\n p3 = p3 - 2;\r\n } else if (estimator - p3 < 0) {\r\n p3 = p3 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p4) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p4 = p4 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p4 = p4 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p4 > 0) {\r\n\r\n p4 = p4 - 2;\r\n } else if (estimator - p4 < 0) {\r\n p4 = p4 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n break;\r\n case 2: //------------------------------------------------------------------------------------- case 2\r\n //System.out.println(\"case 2\");\r\n estimator = p2;\r\n ////writing back estimator \r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x, y + 1, p2);\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n\r\n if (Math.abs(estimator - p1) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p1 = p1 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p1 = p1 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p1 > 0) {\r\n\r\n p1 = p1 - 2;\r\n } else if (estimator - p1 < 0) {\r\n p1 = p1 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p3) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p3 = p3 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p3 = p3 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p3 > 0) {\r\n\r\n p3 = p3 - 2;\r\n } else if (estimator - p3 < 0) {\r\n p3 = p3 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p4) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p4 = p4 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p4 = p4 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p4 > 0) {\r\n\r\n p4 = p4 - 2;\r\n } else if (estimator - p4 < 0) {\r\n p4 = p4 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n break;\r\n case 3: //------------------------------------------------------------------------------------- case 3\r\n //System.out.println(\"case 3\");\r\n estimator = p3;\r\n ////writing back estimator\r\n\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n\r\n if (Math.abs(estimator - p1) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p1 = p1 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p1 = p1 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p1 > 0) {\r\n\r\n p1 = p1 - 2;\r\n } else if (estimator - p1 < 0) {\r\n p1 = p1 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p2) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p2 = p2 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p2 = p2 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p2 > 0) {\r\n\r\n p2 = p2 - 2;\r\n } else if (estimator - p2 < 0) {\r\n p2 = p2 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x, y + 1, p2);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p4) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p4 = p4 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p4 = p4 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p4 > 0) {\r\n\r\n p4 = p4 - 2;\r\n } else if (estimator - p4 < 0) {\r\n p4 = p4 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n break;\r\n case 4: //------------------------------------------------------------------------------------- case 4\r\n estimator = p4;\r\n //wrinting back estimator pixel\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n //System.out.println(\"case 4\");\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n if (Math.abs(estimator - p1) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p1 = p1 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p1 = p1 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p1 > 0) {\r\n\r\n p1 = p1 - 2;\r\n } else if (estimator - p1 < 0) {\r\n p1 = p1 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p2) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p2 = p2 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p2 = p2 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p2 > 0) {\r\n\r\n p2 = p2 - 2;\r\n } else if (estimator - p2 < 0) {\r\n p2 = p2 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x, y + 1, p2);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p3) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p3 = p3 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p3 = p3 - 2;\r\n }\r\n msg_counter++;\r\n\r\n }\r\n } else if (estimator - p3 > 0) {\r\n\r\n p3 = p3 - 2;\r\n } else if (estimator - p3 < 0) {\r\n p3 = p3 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n\r\n break;\r\n }\r\n// p1 = (p1 >> 16) & 0xff;\r\n// p2 = (p2 >> 16) & 0xff;\r\n// p3 = (p3 >> 16) & 0xff;\r\n// p4 = (p4 >> 16) & 0xff;\r\n// System.out.println(\" p1 : \"+p1 + \"| p2 : \" + p2 + \"| p3 : \" + p3 + \"| p4 : \" + p4);\r\n\r\n } else {\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x + 1, y, p2);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x, y + 1, p3);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n }\r\n block_num = block_num + 1;\r\n\r\n y++;\r\n\r\n }\r\n x++;\r\n }\r\n\r\n }", "public void arrow()\n{\n\nPImage img1,img2;\nimg1=loadImage(\"compass.png\");\nimage(img1,630,110);\nimg2=loadImage(\"compass.png\");\nimage(img2,1490,110);\n\n}", "public void printValues() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tfor (int j = 0; j < 7; j++) {\n\t\t\t\tlblCenter[i][j].setText(\"\" + array.getElement(i, j));\n\t\t\t}\n\t\t\ttfWest[i].setText(\"\" + leftCol.getElement(i));\n\t\t\ttfSouth[i].setText(\"\" + bottomRow.getElement(i));\n\t\t}\n\t}", "public void showSamples(){\n\t\tfor(int i=0; i<arrIns.size(); i++){\n\t\t\tfor(int j=0; j<arrIns.get(i).numAttributes(); j++){\n\t\t\t\tSystem.out.print(\" | \" + arrIns.get(i).value(j) + \" | \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "private void logLocalMessage(String methodName, int status, String message, BufferedImage image) {\r\n\t\t// Save image into file\r\n\t\tif (image != null) {\r\n\t\t\tString absoluteImagePath = null;\r\n\t\t\t\r\n\t\t\t// kiedy wywolujemy bezposrednio z eclipsa\r\n\t\t\tif (!System.getProperty(\"user.dir\").contains(\"results\")) {\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/results/temp/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/results/temp/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t} else {\t\t\t\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFile outputFile = new File(absoluteImagePath);\r\n\t\t\t\tImageIO.write(image, IMG_FORMAT, outputFile);\r\n\t\t\t\tSystem.out.println(\"*HTML*<img src=\\\"\" + absoluteImagePath + \"\\\">\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\tswitch (status) {\r\n\t\tcase PASSED:\r\n\t\t\tSystem.out.println(\"|PASS|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase FAILED:\r\n\t\t\tSystem.err.println(\"|FAIL|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase WARNING:\r\n\t\t\tSystem.out.println(\"|WARN|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"|INFO|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@After(\"pointCut()\")\r\n\t@Override\r\n\tpublic void afterMethod(JoinPoint joinpoint) {\n\t\tSystem.out.println(joinpoint.getSignature().getName() + \"<---���������־\");\r\n\r\n\t}", "void drawRegion (double b, double e) {\n begT = b; endT = e;\n drawStuff (img.getGraphics ());\n }", "public void print() {\r\n System.out.print(\"[id: <\" + this.id + \"> \");\r\n if (this.dimension > 0) {\r\n System.out.print(this.data[0]);\r\n }\r\n for (int i = 1; i < this.dimension * 2; i++) {\r\n System.out.print(\" \" + this.data[i]);\r\n }\r\n System.out.println(\"]\");\r\n }", "public void printCurrentState() {\n\t\t//getX() and getY() are methods from the Point class\n\t\tSystem.out.println(\"Avatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n\t\tSystem.out.println(\"Points: \" + avatar.getScore());\n\t}", "void drawStuff (Graphics g) {\n if (g instanceof PrintGraphics) \n g.setColor (parent.parent.parent.printImgBColor);\n else \n g.setColor (parent.parent.parent.normImgBColor);\n \n g.fillRect (0, 0, _xPix, _yPix - 3 * parent.lineSize);\n \n //draw the stuff\n drawBins (g);\n \n //Draw the Time Line\n drawTimeLine (g);\n }", "public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\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 }", "void energyImageDisplay(BufferedImage imgToEnergize, String label,\n boolean doWePrintSeam, ImageView myImage, Label seamPrintingLabel,\n Label energyPrintingLabel) {\n seamPrintingLabel.setTextFill(javafx.scene.paint.Color.BLACK);\n if (this.tempImg.equals(\"Energy computation\")\n || this.tempImg.equals(\"Show next seam\")) {\n seamPrintingLabel\n .setTextFill(javafx.scene.paint.Color.PALEVIOLETRED);\n myImage.setImage(SwingFXUtils.toFXImage(imgToEnergize, null));\n this.tempImg = \"null\";\n } else {\n if (imgToEnergize != null)\n energyPrintingLabel.setTextFill(javafx.scene.paint.Color.GREEN);\n assert imgToEnergize != null;\n BufferedImage bImageEnergized = SeamCarver\n .energizedImage(imgToEnergize);\n if (doWePrintSeam) {\n int totalRedRgb = 255 << 16;\n int[] seamToPrint = SeamCarver.bestSeam(bImageEnergized,\n this.getDirection());\n if (this.getDirection().equals(\"H\")) {\n for (int y = 0; y < seamToPrint.length; y++)\n bImageEnergized.setRGB(seamToPrint[y], y, totalRedRgb);\n } else {\n for (int x = 0; x < seamToPrint.length; x++)\n bImageEnergized.setRGB(x, seamToPrint[x], totalRedRgb);\n }\n }\n myImage.setImage(SwingFXUtils.toFXImage(bImageEnergized, null));\n this.tempImg = label;\n }\n }", "public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}", "void print(){\n\t\tSystem.out.println(\"[\"+x+\",\"+y+\"]\");\n\t}", "public static void printRed(FqImage imh) {\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"r\"+imh.points[i][j].getRed()+\"r\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "void displayDebugInformation() {\n\t\tmyParent.text(\"X\", X.x + 10, X.y + 5);\n\t\tmyParent.text(\"Y\", Y.x + 10, Y.y + 5);\n\t\tmyParent.text(\"Z\", Z.x + 10, Z.y + 5);\n\t\tmyParent.text(\"Q\", Q.x + 10, Q.y + 5);\n\t\tmyParent.fill(255);\n\n\t\tString pointFocuses = \"\";\n\t\tString stickedPoints = \"\";\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tpointFocuses += point[i].isFocusedOnThePoint() + \" \";\n\t\t\tstickedPoints += point[i].sticked + \" \";\n\n\t\t\t// fill(200);\n\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5);\n\t\t}\n\n\t\tmyParent.text(\"state: \" + state + \"\\nfocused on line: \" + selectedLine + \"\\nfocused on point: \" + selectedPoint\n\t\t\t\t+ \"\\nmouseLockedToLine: \" + mouseLockedToLine + \"\\npointFocuses: \" + pointFocuses + \"\\nstickedPoints: \"\n\t\t\t\t+ stickedPoints + \"\\ndragLock: \" + dragLock + \"\\ndiagonal scale factor: \" + diagonalScaleFactor\n\t\t\t\t+ \"\\npress D to hide debug\", 40, myParent.height - 160);\n\n\t\t// diplayNeighborPoints();\n\t}", "private static final byte[] xfplot_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -60, 17, 0, 0, 0,\n\t\t\t\t0, 74, 74, 74, 92, 92, 92, 98, 98, 98, 105, 105, 105, 108, 108,\n\t\t\t\t108, 116, 116, 116, 119, 119, 119, 123, 123, 123, -126, -126,\n\t\t\t\t-126, -123, -123, -123, -112, -112, -112, -109, -109, -109,\n\t\t\t\t-103, -103, -103, -95, -95, -95, -92, -92, -92, -1, -1, -1, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 33, -7, 4, 1, 0, 0, 17, 0, 44, 0, 0, 0, 0, 16, 0, 16,\n\t\t\t\t0, 0, 5, 85, 96, 36, -114, 81, 16, -112, 40, 105, -102, 105,\n\t\t\t\t-70, -98, 40, 64, 10, 116, 29, -109, 4, 65, -25, -73, 88, -4,\n\t\t\t\t-71, 95, -127, 36, 19, 17, -124, 66, 2, 81, 36, -56, 29, 11,\n\t\t\t\t78, -63, -88, 88, 115, -22, 104, -45, 72, 109, -53, 21, 1, 94,\n\t\t\t\t92, -63, 43, -126, 32, 64, -50, 47, -45, 25, 66, 64, 68, 0,\n\t\t\t\t-128, -11, 107, 13, 39, -58, 33, 106, 72, -67, 5, -49, -19, 91,\n\t\t\t\t35, 8, 110, 41, 33, 0, 59 };\n\t\treturn data;\n\t}", "void display(DisplayInfo info, Coordinates position, Graphics2D g, ImageObserver io);", "public void print() {\n mat.print();\n }", "public void printInfo()\n {\n System.out.println(\"position Value:\" + pos_.get(0).getPosition());\n System.out.println(\"velocitiy Value:\" + vel_.get(0).getVelocity());\n System.out.println(\"lastUpdateTime Value:\" + lastPosUpdateTime_);\n System.out.println(\"KalmanGain_ Value:\" + KalmanGain_);\n }", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }", "protected abstract String exportHelp(BufferedImage img) throws IllegalArgumentException;", "@Override\r\n public void sendInfo() {\n System.out.println(\"发送带图片和文字的信息\");\r\n }", "private void outputMe() {\n\t\tif (changeCount > 2) changeCount = 4 - (changeCount & 1);\n\t\tif (outputValue) {\n\t\t\tSystem.out.append( trueArray[ changeCount ] );\n\t\t} else {\n\t\t\tSystem.out.append( falseArray[ changeCount ] );\n\t\t}\n\t\tchangeCount = 0;\n\t}", "public String toString() {\n String res = \"\";\n \n for ( int[] row : img ) {\n for ( int x : row )\n res += x + \" \";\n res += \"\\n\";\n }\n return res;\n }", "public static void printRGB(FqImage imh){\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"rgb\"+imh.points[i][j].getRGB() );\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public void print(JournalRecord journalRecordAft, JournalRecord journalRecordBef) throws EQException\n\t{\n\t\t// Screen set to print\n\t\tscreenSetPrint = fhd.getScreenSetHandler().rtvScreenSetMain();\n\n\t\t// Setup the after image\n\t\tfunctionDataAft = new FunctionData(screenSetPrint.getFunction(), fhd);\n\t\tfunctionDataAft.loadFieldDataFromJournalRecord(journalRecordAft);\n\n\t\t// Setup the before image\n\t\tfunctionDataBef = null;\n\t\tif (journalRecordBef != null)\n\t\t{\n\t\t\tfunctionDataBef = new FunctionData(screenSetPrint.getFunction(), fhd);\n\t\t\tfunctionDataBef.loadFieldDataFromJournalRecord(journalRecordBef);\n\t\t}\n\n\t\t// print it\n\t\tprint(screenSetPrint, functionDataAft, functionDataBef);\n\t}", "public static void main(String args[]) {\n\t\tint[][][] pic = read(\"tinypic.ppm\"); \n\t\tSystem.out.println(\"Standart pic \\n\"); // For a clean code\n\t\t// Displays the array's data on standard output\n\t\tprint(pic);\n\n\t\tSystem.out.println(\"flipHorizontally pic \\n\");\n\t\tprint(flipHorizontally(pic));\n\n\t\tSystem.out.println(\"flipVertically pic \\n\");\n\t\tprint(flipVertically(pic));\n\n\t\tSystem.out.println(\"greyScale pic \\n\");\n\t\tprint(greyScale(pic));\n\n\t}", "private void printActualSensorData() throws IOException , InterruptedException{\n\n System.out.println(\"*----------------------------\");\n for (SensorData sensorData : actualSensorDatas) {\n System.out.println(\"Received a packet: IP:Port: \" + sensorData.printSensorData());\n }\n //Thread.sleep(10000);\n //System.out.print(\"\\033[H\\033[2J\");\n System.out.println(\"----------------------------*\");\n\n }", "@Override\n\tpublic String getInfo()\n\t{\n\t\tString result = \"Adjust image levels, gamma, and/or change bit depth\";\n\t\treturn result;\n\t}", "public static void main(String[] args) \n\t{\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME );\n\t\tMatToBufferedImage M2B = new MatToBufferedImage();\n \tMat mat = Highgui.imread(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\Projects\\\\OpenCV\\\\image6.png\",Highgui.CV_LOAD_IMAGE_COLOR);\n \tMat newMat = new Mat(mat.rows(), mat.cols(), mat.type());\n \tmat.convertTo(mat, CvType.CV_64FC3); //CV_64FC3 it can use double[] instead of byte[] \n \t//Mat newMat = mat.clone();\n \n \t//byte buff[] = new byte[(int) (mat.total() * mat.channels())];\n \tdouble buff[] = new double[(int) (mat.total() * mat.channels())];\n \n\t\tdouble alpha = 2.2;\n \tint beta = 50; \n \n \tSystem.out.println(mat.type());\n \n \tmat.get(0, 0, buff);\n \n \tImageShow imshow = new ImageShow(M2B.getBufferedImage(mat));\n \n \tfor( int i = 0; i<buff.length; i++)\n \t{\n \t\tbuff[i] = (alpha*buff[i]+beta);\n \t}\n \n \tnewMat.put(0, 0, buff);\n \n\t\tImageShow imshow1 = new ImageShow(M2B.getBufferedImage(newMat));\n \n\n\t}", "public void print() {\n\t\t\tfor (int i = 0; i < nowLength; i++) {\n\t\t\t\tSystem.out.print(ray[i] + \" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}", "private void displayProcessedImage(Measurement measurement) {\n DecimalFormat df = new DecimalFormat(\"#0.000\");\n String pupilL_str = df.format(measurement.getPupilLeft()) + \"mm\";\n String pupilR_str = df.format(measurement.getPupilRight()) + \"mm\";\n String diff_str = df.format(measurement.getDifference()) + \"mm\";\n double difference = measurement.getDifference();\n String filepath = measurement.getFilepath();\n Bitmap imgBitmap = translateImgToBitmap(filepath);\n\n textLeftPupil.setText(pupilL_str);\n textRightPupil.setText(pupilR_str);\n textDifference.setText(diff_str);\n if(imgBitmap != null) resultImg.setImageBitmap(imgBitmap);\n\n if(difference > 0.0f) textResult1.setText(\"L > R\");\n if(difference < 0.0f) textResult1.setText(\"L < R\");\n if(difference == 0.0f) textResult1.setText(\"L = R\");\n\n showLayout(resultLayout);\n }", "void imFinished();", "public void print() {\n\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n System.out.format(\"%.4f\", data[i][j]);\n if (j != this.cols - 1)\n System.out.print(\" \");\n }\n System.out.println(\"\");\n }\n }", "String wkhtmltoimage_phase_description(PointerByReference converter, int phase);", "@Override\n public void renderNextImage() {\n }", "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() + \n \" height \" + getHeight() \n + \" width \" + getWidth();\n return output;\n \n }", "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() + \n \" height \" + getHeight() \n + \" width \" + getWidth();\n return output;\n \n }", "public void peep()\n\t{\n\t\tSystem.out.println(\"The data is..\"+arr[top-1]);\n\t}", "private void print(RShape p, String msg) {\n RPoint p1 = p.getTopLeft();\n RPoint p2 = p.getBottomRight();\n System.out.println(msg + \" (\" + p1.x + \", \" + p1.y + \"), (\" + p2.x\n + \", \" + p2.y + \")\");\n }", "private List<String> print() throws EQException\n\t{\n\t\t// Retrieve the layout\n\t\tLayout layout = screenSetPrint.getLayout();\n\n\t\t// Setup the array list\n\t\tlines.clear();\n\n\t\t// LINE 1: function title\n\t\tif (printHeader)\n\t\t{\n\t\t\tprinterFormatter.printFieldTitle(screenSetPrint.getLayout().rtvLabel(fhd.getEquationUser()));\n\t\t\taddLine();\n\t\t\taddLine();\n\t\t}\n\n\t\t// LINE 2: before and after image column header\n\t\tif (functionDataBef != null)\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(true, true);\n\t\t}\n\t\telse if (functionDataBef == null && beforeImage)\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(false, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(true, false);\n\t\t}\n\t\taddLine();\n\n\t\t// LINE 3 and onwards\n\n\t\t// get all the output fieldSets\n\t\tList<InputFieldSet> fieldSets = screenSetPrint.getFunction().getInputFieldSets();\n\t\tfor (int i = 0; i < fieldSets.size(); i++)\n\t\t{\n\t\t\t// Retrieve the field set\n\t\t\tInputFieldSet fieldSet = fieldSets.get(i);\n\n\t\t\t// Print the record name\n\t\t\tif (printHeader)\n\t\t\t{\n\t\t\t\taddLine();\n\t\t\t\tprinterFormatter.printRecordName(fieldSet.getId(), fieldSet.rtvLabel(fhd.getEquationUser()));\n\t\t\t\taddLine();\n\t\t\t}\n\n\t\t\t// Retrieve the layout for this screen set\n\t\t\tDisplayAttributesSet displayAttributeSet = layout.getDisplayAttributesSet(fieldSet.getId());\n\t\t\tprint(fieldSet, displayAttributeSet, displayAttributeSet.getDisplayItems());\n\t\t}\n\n\t\treturn (getLines());\n\t}", "private void displayPrevious() {\r\n\t\ti--;\r\n\t\tdisplayCurrentPicture();\r\n\t}", "public static void main (String[] args) throws FitsException, IOException, ClassNotFoundException {\n inFits = FileLoader.loadFits(ImageDataTest.class , fileName);\n frArray = FitsRead.createFitsReadArray(inFits);\n rangeValues = FitsRead.getDefaultRangeValues();\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n BufferedImage bufferedImage = imageData.getImage(frArray);\n File outputfile = new File(FileLoader.getDataPath(ImageDataTest.class)+\"imageDataTest.png\");\n ImageIO.write(bufferedImage, \"png\", outputfile);\n\n\n\n //test ImageData with mask\n imageData = new ImageData(frArray, IMAGE_TYPE,imageMasks,rangeValues, 0,0, 100, 100, true );\n bufferedImage = imageData.getImage(frArray);\n outputfile = new File(FileLoader.getDataPath(ImageDataTest.class)+\"imageDataWithMaskTest.png\");\n ImageIO.write(bufferedImage, \"png\", outputfile);\n\n }", "public void show() {\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < columnCount; j++)\n System.out.printf(\"%9.4f \", data[i][j]);\n System.out.println();\n }\n }", "void drawStuff () {drawStuff (img.getGraphics ());}", "public void print() {\r\n System.out.println(c() + \"(\" + x + \", \" + y + \")\");\r\n }", "@Override\n\tvoid drowing() {\n\t\tSystem.out.println(\"test--drawing\");\n\t}", "public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}", "public abstract Address getBootImageEnd();", "public void show() {\n\t\tImageJFunctions.show( imageFloat );\t\t\n\t}", "public void draw(){\n\t\tStdDraw.picture(this.xxPos,this.yyPos,\"images/\"+this.imgFileName);\n\t}", "private void drawImages() {\n\t\t\r\n\t}", "private void showImageDetail() {\n }", "public void saveActions()\r\n {\r\n\t imageCopy[0] = bufferedImage;\r\n\t imageCopy[1] = edited;\r\n\t imageCopy[2] = cropedPart;\r\n\t imageCopy[3] = bufferedImage;\r\n\t \r\n\t statesCopy[0] = isBlured;\r\n\t statesCopy[1] = isReadyToSave;\r\n\t statesCopy[2] = isChanged;\r\n\t statesCopy[3] = isInverted;\r\n\t statesCopy[4] = isRectangularCrop;\r\n\t statesCopy[5] = isCircularCrop;\r\n\t statesCopy[6] = isImageLoaded;\r\n\t \r\n }", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "private String addDisplay() {\n\t\t// One Parameter: DisplayName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|image:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}", "private void diplay() {\n\t\tSystem.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp\n\t\t\t\t+ PRESSURE_CONSTANT + pressure));\n\n\t}", "public void print(){\n\t\t\n\t\tfor(int i=0;i<maxindex;i++)\n\t\t{\n\t\t\tif(data[i] != 0)\n\t\t\t{\n\t\t\t\tSystem.out.print(data[i]+\"x\"+i+\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public String getOutput() {\n return String.format(\"DCode: %-7.0f \\\"%-9s\\\" \\t - %5.3fmm x %5.3fmm - \\t Area: %6.3fmm² \\t Area Ratio: %5.2f \\t Transfer Effeciency: %2.1f \\t Number of apertures: %-5.0f\"\n , (double) dCode\n , shape\n , x\n , y\n , getArea()\n , getAreaRatio()\n , getTransferEffeciency()\n , (double) numbOfApertures);\n }", "public static void printChunkInfo(Bitmap bm) {\n byte[] chunk = bm.getNinePatchChunk();\n if (null == chunk) {\n System.out.println(\"can't find chunk info from this bitmap(\" + bm\n + \")\");\n return;\n }\n int xLen = chunk[1];\n int yLen = chunk[2];\n int cLen = chunk[3];\n \n StringBuilder sb = new StringBuilder();\n int peddingLeft = getInt(chunk, 12);\n int paddingRight = getInt(chunk, 16);\n int paddingTop = getInt(chunk, 20);\n int paddingBottom = getInt(chunk, 24);\n sb.append(\"peddingLeft=\" + peddingLeft);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingRight=\" + paddingRight);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingTop=\" + paddingTop);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingBottom=\" + paddingBottom);\n sb.append(\"\\r\\n\");\n \n sb.append(\"x info=\");\n for (int i = 0; i < xLen; i++) {\n int vv = getInt(chunk, 32 + i * 4);\n sb.append(\",\" + vv);\n }\n sb.append(\"\\r\\n\");\n sb.append(\"y info=\");\n for (int i = 0; i < yLen; i++) {\n int vv = getInt(chunk, xLen * 4 + 32 + i * 4);\n sb.append(\",\" + vv);\n }\n sb.append(\"\\r\\n\");\n sb.append(\"color info=\");\n for (int i = 0; i < cLen; i++) {\n int vv = getInt(chunk, xLen * 4 + yLen * 4 + 32 + i * 4);\n sb.append(\",\" + vv);\n }\n System.err.println(\"\" + sb);\n }", "public native void annotateImage(DrawInfo info);", "public void displayCurrentValues() {\n currentX.setText(_DF.format(deltaX));\n currentY.setText(_DF.format(deltaY));\n currentZ.setText(_DF.format(deltaZ));\n }", "public void updatePrintFigures() {\n\n\t}", "private static void printFunctionCalls() {\n dvm.printFunctionCalls();\n }", "private static final byte[] xfcpp_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, 0, 0,\n\t\t\t\t0, -35, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100,\n\t\t\t\t101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4,\n\t\t\t\t1, 10, 0, 2, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2, 53, -108,\n\t\t\t\t-113, -119, -64, 96, -2, 78, -101, 2, 86, -55, -80, -101, 116,\n\t\t\t\t89, -40, 40, -33, -109, 41, 98, 105, 94, 21, 42, -75, 85, 0,\n\t\t\t\t-57, -21, 26, 2, 49, -52, 90, 111, -84, -85, -58, 29, 72, -3,\n\t\t\t\t-126, 2, -104, -48, 120, 32, -102, -112, -62, 67, 1, 0, 59 };\n\t\treturn data;\n\t}", "private static final byte[] xfmt_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -94, 1, 0, 0, 0,\n\t\t\t\t0, -1, -1, -1, 28, 28, 28, -128, -128, -128, -64, -64, -64, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 1, 0, 44, 0, 0,\n\t\t\t\t0, 0, 16, 0, 16, 0, 0, 3, 62, 24, -70, -36, 59, 48, 74, -8,\n\t\t\t\t-118, -67, -40, 2, 53, 10, -8, 32, -40, 109, -63, 40, -100,\n\t\t\t\t-24, 57, 114, -98, 80, -92, -86, -57, 2, 48, -70, -106, 109,\n\t\t\t\t45, -36, -90, -50, -25, -75, 31, 96, 34, -111, -31, 50, 72, 82,\n\t\t\t\t32, -60, 4, 57, 58, 23, -62, 64, -71, 104, 54, 29, -40, 70, 2,\n\t\t\t\t0, 59 };\n\t\treturn data;\n\t}", "@Override\r\n\tvoid indicators() {\n\t\tSystem.out.println(\"general indicators\");\r\n\t}", "public String showVision()\r\n {\r\n balayer();\r\n String res=\"Vision : +\\n\";\r\n for (int i=0; i<LONGUEUR ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<LARGEUR; j++) {\r\n res+=Vision[i][j][0];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesHor[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesVert[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n System.out.println(res);\r\n return res;\r\n }", "@SuppressWarnings(\"unused\")\r\n private void drawPicture() {\r\n // initialize variables\r\n Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\r\n BufferedImage screenShot = null;\r\n\r\n // create screenshot\r\n Rectangle screenShotRect = new Rectangle(0, 0, dimension.width, dimension.height);\r\n try {\r\n screenShot = new Robot().createScreenCapture(screenShotRect);\r\n } catch (AWTException e1) {\r\n e1.printStackTrace();\r\n return;\r\n }\r\n File file = new File(\"tmp/warp_V3_\" + System.currentTimeMillis() + \".png\");\r\n\r\n try {\r\n // create screenshot graphic\r\n Graphics2D graphic = screenShot.createGraphics();\r\n graphic.setFont(graphic.getFont().deriveFont(5));\r\n\r\n // visualize fixation point\r\n graphic.setColor(new Color(255, 0, 0, 255));\r\n graphic.drawOval(this.fixation.x - 5, this.fixation.y - 5, 10, 10);\r\n graphic.drawChars((\"fixation point\").toCharArray(), 0, 14, 12 + this.fixation.x, 12 + this.fixation.y);\r\n graphic.drawChars((\"\" + this.angleStartEnd).toCharArray(), 0, (\"\" + this.angleStartEnd).toCharArray().length, 12 + this.fixation.x, 24 + this.fixation.y);\r\n graphic.setColor(new Color(255, 0, 0, 32));\r\n graphic.fillOval(this.fixation.x - 5, this.fixation.y - 5, 10, 10);\r\n\r\n // visualize mouse vector\r\n // TODO add for-loop do iterate through mousepositions\r\n for (int i = 0; i < this.mousePositions.size() - 2; i++) {\r\n graphic.setColor(new Color(0, 0, 255, 255));\r\n graphic.drawOval((int) this.mousePositions.get(i).getX() - 5, (int) this.mousePositions.get(i).getY() - 5, 10, 10);\r\n graphic.drawChars((\"\" + i).toCharArray(), 0, (\"\" + i).toCharArray().length, (int) this.mousePositions.get(i).getX() + 12, (int) this.mousePositions.get(i).getY() + 12);\r\n graphic.setColor(new Color(0, 0, 255, 32));\r\n graphic.fillOval((int) this.mousePositions.get(i).getX() - 5, (int) this.mousePositions.get(i).getY() - 5, 10, 10);\r\n graphic.drawLine((int) this.mousePositions.get(i).getX(), (int) this.mousePositions.get(i).getY(), (int) this.mousePositions.get(i + 1).getX(), (int) this.mousePositions.get(i + 1).getY());\r\n }\r\n graphic.setColor(new Color(0, 0, 255, 255));\r\n graphic.drawOval((int) this.mousePositions.get(this.mousePositions.size() - 1).getX() - 5, (int) this.mousePositions.get(this.mousePositions.size() - 1).getY() - 5, 10, 10);\r\n graphic.drawChars((\"\" + (this.mousePositions.size() - 1)).toCharArray(), 0, (\"\" + (this.mousePositions.size() - 1)).toCharArray().length, (int) this.mousePositions.get(this.mousePositions.size() - 1).getX() + 12, (int) this.mousePositions.get(this.mousePositions.size() - 1).getY() + 12);\r\n graphic.setColor(new Color(0, 0, 255, 32));\r\n graphic.fillOval((int) this.mousePositions.get(this.mousePositions.size() - 1).getX() - 5, (int) this.mousePositions.get(this.mousePositions.size() - 1).getY() - 5, 10, 10);\r\n\r\n // calculate and visualize setpoint\r\n graphic.setColor(new Color(0, 255, 0, 255));\r\n graphic.drawOval(this.setPoint.x - 5, this.setPoint.y - 5, 10, 10);\r\n graphic.drawChars((\"set point\").toCharArray(), 0, 9, 12 + this.setPoint.x, 12 + this.setPoint.y);\r\n graphic.setColor(new Color(0, 255, 0, 32));\r\n graphic.fillOval(this.setPoint.x - 5, this.setPoint.y - 5, 10, 10);\r\n\r\n // write the image\r\n file.mkdirs();\r\n ImageIO.write(screenShot, \"png\", file);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }" ]
[ "0.64328915", "0.62003535", "0.59005153", "0.58968157", "0.58220375", "0.57001764", "0.554275", "0.55398387", "0.5447025", "0.5434534", "0.5353937", "0.53367347", "0.5326722", "0.53202456", "0.53137606", "0.5302064", "0.5296726", "0.5281907", "0.52676284", "0.5251832", "0.5229008", "0.5217987", "0.51967734", "0.51557857", "0.5141868", "0.5140825", "0.5137297", "0.5135549", "0.5134885", "0.5132683", "0.5101971", "0.5100482", "0.5083912", "0.5051087", "0.50463873", "0.50381374", "0.503794", "0.5035537", "0.50350314", "0.5031549", "0.5021892", "0.50216436", "0.5017514", "0.5015225", "0.500698", "0.50065094", "0.50047433", "0.49985424", "0.49969706", "0.49948642", "0.49939424", "0.49729303", "0.4971071", "0.49681652", "0.49634808", "0.49618748", "0.4955288", "0.4949073", "0.49424857", "0.4939278", "0.49351248", "0.49319324", "0.49272785", "0.49244335", "0.49216783", "0.49187392", "0.49134278", "0.49131945", "0.49131945", "0.49131638", "0.49114195", "0.49108505", "0.4906429", "0.49032298", "0.49010214", "0.48961514", "0.48929814", "0.48921263", "0.4880793", "0.48788738", "0.48775712", "0.48755753", "0.4870904", "0.48709008", "0.48623404", "0.48616308", "0.48612076", "0.48548535", "0.48531908", "0.48474246", "0.48465568", "0.48407906", "0.48400483", "0.4838161", "0.48378646", "0.4837196", "0.48371765", "0.4834411", "0.48279077", "0.4816306" ]
0.55772626
6
Print the Journal record
public void print(JournalRecord journalRecord) throws EQException { print(journalRecord, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "public void print(){\t\t\r\n\t\tSystem.out.println(\"===\\nCommit \" + id +\"\\n\"+ Time + \"\\n\" + message + \"\\n\");\r\n\t}", "public void print()\r\n\t{\r\n\t\tSystem.out.println(\"Name: \" + name + \", Short name: \" + shortName + \", WKN: \" + wkn);\r\n\t\tif(share == null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Entry has no data yet. If you want to update the data use the 'IMPORT' function\\n\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\tshare.print();\r\n\t\t}\r\n\t}", "public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : \" + price + \" pence \" + \n \" Issued \" + issueDateTime);\n System.out.println();\n }", "@Override\n\tpublic void print() {\n System.out.println(\"Leaf [isbn=\"+number+\", title=\"+title+\"]\");\n\t}", "public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }", "public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}", "public void printReceipt(Receipt receipt){\n System.out.println(receipt.toString());\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void printReceipt(Receipt receipt) {\n System.out.println(receipt.receiptInStringFormat());\n }", "@Override\n\t\tpublic void print() {\n\n\t\t}", "public void doPrint() {\n printBehavior.printReceipt();\n\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "public void print(T job) {\n System.out.println(\"Printing job id \" + job.getId() + \": \" + job.getDocument().getText());\n }", "public static void printRecord(int i) {\r\n\t\ttry {\r\n\t\t\tStudent tempRecord = studRecs.get(i);\r\n\t\t\tSystem.out.println(\"Printing information for student \" + i);\r\n\t\t\tSystem.out.println(\"Student ID: \" + tempRecord.getStudentID());\r\n\t\t\tSystem.out.println(\"First Name: \" + tempRecord.getFirstName());\r\n\t\t\tSystem.out.println(\"Last Name: \" + tempRecord.getLastName());\r\n\t\t\tSystem.out.println(\"Street Address: \" + tempRecord.getStreetAddress());\r\n\t\t\tSystem.out.println(\"City: \" + tempRecord.getCity());\r\n\t\t\tSystem.out.println(\"Province: \" + tempRecord.getProvince());\r\n\t\t\tSystem.out.println(\"Postal Code: \" + tempRecord.getPostalCode());\r\n\t\t\tSystem.out.println(\"Phone Number: \" + tempRecord.getPhoneNumber());\r\n\t\t\tSystem.out.println(\"Birth Date: \" + tempRecord.getBirthDate());\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(\"Invalid student!\");\r\n\t\t}\r\n\t}", "public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}", "public static void printAllRecords() {\r\n\t\tfor (int i = 0; i<studRecs.size(); i++) {\r\n\t\t\tprintRecord(i);\r\n\t\t}\r\n\t}", "public String getJournal() {\n return journal;\n }", "public void print() {\n\t\tSystem.out.println(\"ONOMA IDIOKTITH: \" + fname);\n\t\tSystem.out.println(\"EPWNYMO IDIOKTITH: \" + lname);\n\t\tSystem.out.println(\"DIEUTHINSH FARMAKEIOU: \" + address);\n\t\tSystem.out.println(\"THLEFWNO FARMAKEIOU: \" + telephone);\n\t\tSystem.out.println();\n\t}", "@Override\n public String getRecordDetail() {\n return \"[\" + type + \"] \"\n + \"[\" + people + \" pax] \"\n + \"[\" + \"Total: $\" + amount + \"] \"\n + \"[\" + amountToMoney() + \" per person] \"\n + nameList;\n }", "public String getRecord() {\n return \"Employee name: \\t\" + employeeName + \"\\n\" +\n \"Employee pay:\\t$\" + String.format(\"%.2f\",currentPay);\n }", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "private void printHistory(patient toPrint){\r\n if (toPrint == null)\r\n JOptionPane.showMessageDialog\r\n (null, \"No Patient to print\");\r\n else{\r\n String history = \"\";\r\n for (String s: toPrint.getApptPaymentHistory()){\r\n history += s + \"\\n\";\r\n }\r\n billing_patientHistoryTextArea.setText(history);\r\n }\r\n }", "public void print() {\n\t\tSystem.out.print(salary);\n\t}", "@Override\n\tpublic void print() {\n\n\t}", "public void printData()\n {\n reader.printData();\n }", "@Override\r\n\tpublic void print()\r\n\t{\t//TODO méthode à compléter (TP1-ex11)\r\n\t\tfor (IndexEntry indexEntry : data) {\r\n\t\t\tif(indexEntry ==null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(indexEntry.toString());\r\n\t\t}\r\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public String printPatronInfo(){\n String printingStr = \"\";\n if (this.servingPatron.getBooks().size() > 0){\n printingStr += \"The books currently checked out to this patron are:\";\n printingStr += '\\n';\n printingStr += \"{\";\n for (int i = 0;i < (this.servingPatron.getBooks().size());i++){\n this.numberedListOfServing.put(i+1, this.servingPatron.getBooks().get(i));\n //print the numbered list out!\n printingStr += (i+1);\n printingStr += \" : \";\n printingStr += this.servingPatron.getBooks().get(i).toString();\n printingStr += \"; \";\n }\n printingStr = printingStr.substring(0, printingStr.length()-2);\n printingStr += \"}\";\n }\n else {\n printingStr = \"This patron currently possesses no book. \";\n }\n return printingStr;\n }", "@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}", "public void print() {\n System.out.println(\"Code: \"+this.productCode);\n System.out.println(\"Name: \"+ this.productName);\n System.out.println(\"Price: \"+this.price);\n System.out.println(\"Discount: \"+this.discount+\"%\");\n }", "@Override\r\n\tpublic void print() {\n\t}", "@Override\n\tpublic void print() {\n\t\t\n\t}", "@Override\r\n\tpublic void printTransdetails() {\n\t\t\r\n\t}", "public void printInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nBill Summary :\");\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\t\t\tSystem.out.println(invoiceInfo[i].toString());\r\n\t\t}\r\n\t}", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "public void printData() {\n\t\ttry {\n\t\t\tFiles.lines(new File(PAYROLL_FILE_NAME).toPath())\n\t\t\t.forEach(System.out::println); \n\t\t}catch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void print() {\r\n Person tmp = saf.get(0);\r\n System.out.println(\"Person name : \" + tmp.getName() +\r\n \" Entering time : \" + tmp.getTime() +\r\n \" Waiting time : \" + tmp.getExitTime());\r\n }", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\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 \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "public void print(){\r\n\t\t\t\r\n\t\t\tint i=1;\r\n\t\t\t//Iterator<Receipt> iter=reciptlist.iterator();\r\n\t\t\t\r\n\t\t\tfor(Receipt R : reciptlist){\r\n\t\t\t\r\n\t\t\t\tSystem.out.println( \"--------------------------------------\");\r\n\t\t\t\tSystem.out.println( \"Reciet number: \" +i );\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println( \"ShoeType: \" + R.getShoeType());\r\n\t\t\t\t\tSystem.out.println( \" Amount: \" + R.getAmountSold());\r\n\t\t\t\t\tSystem.out.println( \" Discounted: \" + R.getDiscount());\r\n\t\t\t\t\tSystem.out.println( \" issuedTick : \" + R.getIssuedTick());\r\n\t\t\t\t\tSystem.out.println( \" requestd tick : \" + R.getRequestTick());\r\n\t\t\t\t\tSystem.out.println( \" customer : \" + R.getCustomer());\r\n\t\t\t\t\tSystem.out.println( \" seller : \" + R.getSeller());\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}", "@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "public String recordDetails() {\r\n\t\tString recordDetails = \"RENTAL RECORD\\n\";\r\n\t\tString line = \"\\n--------------------------------------\\n\";\r\n\t\tfor (int i = 0; i < records.size(); i++) {\r\n\t\t\trecordDetails = recordDetails + records.get(records.size() - 1 - i).getDetails() + line;\r\n\t\t}\r\n\t\treturn recordDetails;\r\n\t}", "public static void printConsumerRecordMetaData(ConsumerRecord record) {\n log.info(\"Topic {}\", record.topic());\n log.info(\"Key: {}\", record.key());\n log.info(\"Value: {}\", record.value());\n log.info(\"Partition:{}\", record.partition());\n log.info(\"Offset: {}\", record.offset()\n + \"\\n-----------------------------\");\n }", "public void print() {\n\t\tString sqlList = \"select * from commodity;\";\n\t\tcommodityBuffer = new StringBuffer();\n\t\ttry {\n\t\t\tconnection = SQLConnect.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sqlList);\n\n\t\t\t// put the commodity messages into a stringbuffer\n\t\t\twhile ( resultSet.next() ) {\n\t\t\t\tcommodityBuffer.append(resultSet.getString(\"number\")+\" - \"+resultSet.getString(\"name\")+\"\\n\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// show the commodity messages on window\n\t\tcommodityArea = new JTextArea(commodityBuffer.toString());\n\t}", "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}", "@Override\n\tpublic void printBook(Book book) {\n\t\t\n\t\tSystem.out.println(book);\n\t\t\n\t}", "public void recordOrder(){\n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){//throws exception\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Coffee);//prints in file contents of Coffee\n output.close();//closes file\n }", "private void printTxnReceipt(IApplicationManager theAppMgr, String receiptName\n , boolean isFirstPrint) {\n ReceiptLocaleSetter localeSetter = new ReceiptLocaleSetter(compositePOSTransaction.getStore()\n , getCustomer());\n ReceiptFactory receiptFactory = new ReceiptFactory(new Object[] {this\n }, receiptName);\n localeSetter.setLocale(receiptFactory);\n if (isFirstPrint)\n receiptFactory.print(theAppMgr);\n else{\n //\tSystem.out.println(\"666666666666666666666666\");\n receiptFactory.reprint(theAppMgr);\n }}", "public String print() {\n\t\tString offID = getID();\n\t\tString offName = getName();\n\t\tint offAge = getAge();\n\t\tString offState = getState();\n\t\tString data = String.format(\"ID: %-15s \\t Name: %-35s \\t Age: %-15s \\t State: %s\", offID, offName, offAge, offState);\n\t\treturn data;\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 void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "@Override\n\tpublic void printData() {\n\t\tSystem.out.println(\"Account Number: \" + this.getAccountNumber());\n\t\tSystem.out.println(\"Account Balance: \" + this.getAccountBalance());\n\t}", "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}", "public DataRecord getPrintRecord() throws ProcessManagerException {\r\n try {\r\n return currentProcessInstance\r\n .getAllDataRecord(currentRole, getLanguage());\r\n } catch (WorkflowException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.EX_GET_PRINT_RECORD\", we);\r\n }\r\n }", "public void parseAndPrintRecords() {\n ArrayList<Employee> employees;\n\n employees = parseData(data);\n\n System.out.printf(\"%10s%10s%10s\\n\", \"Last\", \"First\", \"Salary\");\n for(Employee employee : employees) {\n System.out.printf(\"%10s%10s%10d\\n\", employee.lName, employee.fName, employee.salary);\n }\n\n }", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "public void print(){\r\n System.out.println(toString());\r\n }", "public void print(StringBuffer toStringBuffer) {\n\ttoStringBuffer.append(\"Container Transaction: \").append(this.getTransactionAttribute()).append(\"@\").append(this.getDescription());\n }", "public String toString() {\n\t\treturn \"Lend ID: \" + getID() + \" \\n\" + myBook.toString() +\"\\n \" + \"due: \" + getReturnDate();\n\t}", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "private void printTicket(Ticket ticket) {\r\n\t\tSystem.out.println(\"\\n============ TICKET ============\");\r\n\t\tSystem.out.println(\"X: \" + ticket.getX());\r\n\t\tSystem.out.println(\"Y: \" + ticket.getY());\r\n\t\tSystem.out.println(\"Key: \" + printHexBinary(ticket.getKeyXY().getEncoded()));\r\n\t\tSystem.out.println(\"T1: \" + ticket.getTime1() + \" (\" + ticket.getTime1().getTime() + \" ms)\");\r\n\t\tSystem.out.println(\"T2: \" + ticket.getTime2() + \" (\" + ticket.getTime2().getTime() + \" ms)\");\r\n\t\tSystem.out.println(\"================================\\n\");\r\n\t}", "@Override\n public String toPrint(String s) {\n\n return s+\"Delete: \" + id + \"\\n\";\n }", "public static void printTicketDetails(Ticket ticket){\n System.out.println(ticket.statusOfTicket());\n }", "@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}", "private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"sherman.xu@lockers.com\");\n }", "@Override\n\tpublic void print() {\n\t\tSystem.out.print(\"MsgOwner\");\n\t}", "@Override\n\tpublic void print() {\n\t\tSystem.out.print(\"\\nMSc. student:\\n\");\n\t\tsuper.print();\n\t}", "public String fomatToPrint() {\n\t\treturn String.format(FORMAT_FOR_PRINT, author, ibn, year);\n\t}", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "@Override\n public void print() {\n }", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "public String getRecordText();", "public String getRecordText();", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "void printReport();", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "public void print() {\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\">> print()\");\n\t\t}\n\t\tSystem.out.println(p + \"/\" + q);\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.info(\"<< print()\");\n\t\t}\n\t}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "@Override \n public String toString(){\n return this.logRepresentation;\n }", "public void print()\n {\n \tSystem.out.println(\"MOTO\");\n super.print();\n System.out.println(\"Tipo da partida: \" + tipoPartida);\n System.out.println(\"Cilindradas: \" + cilindradas);\n System.out.println();\n }", "public void printYourself(){\n\t}", "public String printAuthor(){\n System.out.println();\n return author;\n }", "public void print(Ledger ledger) {\n\tSystem.out.println(\"\");\n\t\n\tfor (Map.Entry<String, Integer> entry : ledger.H.entrySet()) {\n\t String key = entry.getKey();\n\t int value = entry.getValue();\n\t System.out.println(\"The balance for \" + key + \" is \" + value); \n\t}\n\n\tSystem.out.println(\"\");\n }", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public synchronized String print() {\r\n return super.print();\r\n }", "private void doPrint() {\n PrintManager printManager = (PrintManager) this\n .getSystemService(Context.PRINT_SERVICE);\n\n // Set job name, which will be displayed in the print queue\n String jobName = this.getString(R.string.app_name) + \" Document\";\n\n // Start a print job, passing in a PrintDocumentAdapter implementation\n // to handle the generation of a print document\n printManager.print(jobName, new MyPrintDocumentAdapter(this),\n null); //\n }", "@Override\n\tpublic List<bill> print() {\n\t\treturn this.b.print();\n\t}", "public void print() {\r\n this.table.printTable();\r\n }", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "private void print(PrinterJob job, Node node) \n {\n jobStatus.textProperty().bind(job.jobStatusProperty().asString());\n \n // Print the node\n boolean printed = job.printPage(node);\n \n if (printed) \n {\n job.endJob();\n }\n }", "public void print() {\n System.out.print(datum+\" \");\n if (next != null) {\n next.print();\n }\n }", "public void record(){\n\t}" ]
[ "0.68512446", "0.66789645", "0.6535601", "0.6527913", "0.646986", "0.63693285", "0.6368136", "0.63524395", "0.6207206", "0.6173024", "0.61575705", "0.6152652", "0.6149107", "0.6125578", "0.6120543", "0.60880613", "0.6072507", "0.60347444", "0.6021571", "0.6016594", "0.6008972", "0.60052615", "0.5995285", "0.592871", "0.59219325", "0.5919879", "0.59031737", "0.5891217", "0.58860105", "0.58578557", "0.5854086", "0.5852988", "0.5846647", "0.5842408", "0.5842081", "0.58376616", "0.5833014", "0.58266145", "0.58191943", "0.5818161", "0.5816713", "0.58136696", "0.58056074", "0.57999307", "0.57964694", "0.5790542", "0.5768492", "0.576672", "0.57647085", "0.5755071", "0.57540536", "0.575248", "0.57459307", "0.5745611", "0.5730225", "0.5723114", "0.5716532", "0.5710234", "0.57034504", "0.5703321", "0.5690052", "0.5684687", "0.56765777", "0.56530046", "0.5651929", "0.5649634", "0.56476825", "0.5630046", "0.5620265", "0.5619345", "0.5615398", "0.56119347", "0.5603749", "0.5603004", "0.5602849", "0.5600891", "0.55996436", "0.55949914", "0.5594768", "0.55874664", "0.55874664", "0.55866057", "0.55619997", "0.5552529", "0.55479616", "0.5536225", "0.55287546", "0.5528485", "0.55262536", "0.551898", "0.5504315", "0.54989904", "0.5498036", "0.54932994", "0.54899234", "0.54874164", "0.54756325", "0.54749733", "0.54743594", "0.5466581" ]
0.7181612
0
Print the After and Before image Journal records
public void print(JournalRecord journalRecordAft, JournalRecord journalRecordBef) throws EQException { // Screen set to print screenSetPrint = fhd.getScreenSetHandler().rtvScreenSetMain(); // Setup the after image functionDataAft = new FunctionData(screenSetPrint.getFunction(), fhd); functionDataAft.loadFieldDataFromJournalRecord(journalRecordAft); // Setup the before image functionDataBef = null; if (journalRecordBef != null) { functionDataBef = new FunctionData(screenSetPrint.getFunction(), fhd); functionDataBef.loadFieldDataFromJournalRecord(journalRecordBef); } // print it print(screenSetPrint, functionDataAft, functionDataBef); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }", "public void print(String workStation, int jrnDay, int jrnTime, int jrnSequence, String library) throws EQException\n\t{\n\t\t// Screen set to print\n\t\tscreenSetPrint = fhd.getScreenSetHandler().rtvScreenSetMain();\n\n\t\t// Get the linkage id (if this is a linkage service)\n\t\tString linkageServiceId = FunctionRuntimeToolbox.getLinkageServiceId(screenSetPrint);\n\n\t\t// Setup the journal key (after image)\n\t\tJournalRecord journalRecordAft = FunctionRuntimeToolbox.initialiseJournalRecord(screenSetPrint.getFunction(), workStation,\n\t\t\t\t\t\tjrnDay, jrnTime, jrnSequence, JournalRecord.IMAGE_AFT, \"\", library, linkageServiceId);\n\n\t\t// Setup the journal key (before image)\n\t\tJournalRecord journalRecordBef = FunctionRuntimeToolbox.initialiseJournalRecord(screenSetPrint.getFunction(), workStation,\n\t\t\t\t\t\tjrnDay, jrnTime, jrnSequence, JournalRecord.IMAGE_BEF, \"\", library, linkageServiceId);\n\n\t\t// Retrieve the journal record\n\t\tboolean afterImage;\n\t\tboolean beforeImage;\n\t\tafterImage = journalRecordAft.rtvRecord(fhd.getEquationUser().getSession());\n\t\tbeforeImage = journalRecordBef.rtvRecord(fhd.getEquationUser().getSession());\n\n\t\t// After and before image\n\t\tif (afterImage && beforeImage)\n\t\t{\n\t\t\tprint(journalRecordAft, journalRecordBef);\n\t\t}\n\t\t// After image only\n\t\telse if (afterImage)\n\t\t{\n\t\t\tprint(journalRecordAft);\n\t\t}\n\t\t// Before image only\n\t\telse if (beforeImage)\n\t\t{\n\t\t\tsetBeforeImage(true);\n\t\t\tprint(journalRecordBef);\n\t\t}\n\t\t// No journal record found\n\t\telse\n\t\t{\n\t\t\tEQMessage eqMessage = fhd.getEquationUser().getSession().getMessage(\"KSM2056\");\n\t\t\tlines.add(eqMessage.getFormattedMessage());\n\t\t}\n\t}", "private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}", "public void printInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nBill Summary :\");\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\t\t\tSystem.out.println(invoiceInfo[i].toString());\r\n\t\t}\r\n\t}", "public void printMedicationHistory() {\n StringBuilder builder = new StringBuilder();\n if (medications.size() > 0) {\n for (Medication medication : medications) {\n builder.append(medication.toString()).append(\"\\n\");\n }\n builder.delete(builder.length() - 1, builder.length());\n }\n System.out.println(builder.toString());\n }", "public void savingsReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public String recordDetails() {\r\n\t\tString recordDetails = \"RENTAL RECORD\\n\";\r\n\t\tString line = \"\\n--------------------------------------\\n\";\r\n\t\tfor (int i = 0; i < records.size(); i++) {\r\n\t\t\trecordDetails = recordDetails + records.get(records.size() - 1 - i).getDetails() + line;\r\n\t\t}\r\n\t\treturn recordDetails;\r\n\t}", "public void showLogs() {\n String headID = Utils.readObject(HEADFILE, String.class);\n File asFile = new File(Main.ALL_COMMITS, headID);\n Commit associatedCommit = Utils.readObject(asFile, Commit.class);\n while (associatedCommit != null) {\n printCommitLog(associatedCommit);\n String parent = associatedCommit.getParent();\n if (parent == null) {\n break;\n }\n File commitFile = new File(Main.ALL_COMMITS, parent);\n associatedCommit = Utils.readObject(commitFile, Commit.class);\n }\n }", "private void printNotes(AbstractInscription... inscs) {\n\t\tfor (AbstractInscription insc : inscs) {\n\t\t\tSystem.out.println(String.format(\n\t\t\t\t\t\"Inscription '%s' : note min = %s, note max = %s, note objectif = %s, note réelle = %s, acquis réel = %s\\r\\n\",\n\t\t\t\t\tinsc, insc.getCalculateur().getNoteMin(), insc.getCalculateur().getNoteMax(),\n\t\t\t\t\tinsc.getCalculateur().getNoteObjectif(), insc.getCalculateur().getNoteReelle(),\n\t\t\t\t\tinsc.getCalculateur().getAcquisReel()));\n\t\t}\n\t}", "public void printImage() {\n\t System.out.print(\"\\n\");\n for (int i=0; i<width*height; i++) {\n if (i % width==0) System.out.print(\"\\n\");\n System.out.print(image[i]+ \" \");\n }\n System.out.print(\"\\n\\n\");\n }", "public void savingsReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "private String E19History() {\n StringBuilder buffer = new StringBuilder();\n buffer.append(\"\\f\");\n buffer.append(TextReportConstants.E19_HDR_HISTORY + \"\\n\\n\");\n\n int count1 = countNewlines(buffer.toString());\n\n buffer.append(\n \" PUBLICATION/LOCATION OF RECORDS STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------------------------- ------------- -----------\\n\");\n\n int count2 = countNewlines(buffer.toString()) - count1;\n\n int available = getLinesPerPage() - count1 - count2 - 5;\n int avail = available;\n int loop = 0;\n int needed = 0;\n\n TextReportData data = TextReportDataManager.getInstance()\n .getDataForReports(lid, 3);\n\n for (Pub pub : data.getPubList()) {\n String beginDate = sdf.format(pub.getBegin());\n String endDate = \" \";\n if (pub.getEnd() != null) {\n endDate = sdf.format(pub.getEnd());\n }\n String tmp1 = String.format(\" %-25s %7s%10s %10s\\n\",\n pub.getPpub(), \" \", beginDate, endDate);\n needed = 1;\n\n if (needed <= avail) {\n buffer.append(tmp1);\n avail = avail - needed;\n } else {\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // Do footer\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"))\n .getTime();\n String footer = createFooter(data, E19_RREVISE_TYPE,\n sdf.format(d), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);\n\n buffer.append(footer);\n\n // Do column header\n buffer.append(\n \" PUBLICATION/LOCATION OF RECORDS STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------------------------- ------------- -----------\\n\");\n\n avail = available + count1;\n loop++;\n }\n }\n\n buffer.append(\"\\n\\n\");\n\n buffer.append(\n \" TYPE OF GAGE OWNER STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------ ----- ------------- -----------\\n\");\n\n available = getLinesPerPage() - count1 - count2 - 5;\n avail = available;\n loop = 0;\n TextReportData dataGage = TextReportDataManager.getInstance()\n .getGageQueryData(lid);\n ArrayList<Gage> gageList = dataGage.getGageList();\n\n for (Gage gage : gageList) {\n String beginDate = sdf.format(gage.getBegin());\n String endDate = \" \";\n if (gage.getEnd() != null) {\n endDate = sdf.format(gage.getEnd());\n }\n\n String tmp1 = String.format(\n \" %-11s %14s%-11s %10s %10s\\n\", gage.getType(),\n \" \", gage.getOwner(), beginDate, endDate);\n needed = 1;\n\n if (needed <= avail) {\n buffer.append(tmp1);\n avail = avail - needed;\n } else if (needed > avail) {\n // try to place FOOTER at bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // do footer\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"))\n .getTime();\n String footer = createFooter(dataGage, E19_RREVISE_TYPE,\n sdf.format(d), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);\n\n buffer.append(footer);\n\n // Do column header\n buffer.append(\n \" TYPE OF GAGE OWNER STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------ ----- ------------- -----------\\n\");\n\n avail = available + count1;\n loop++;\n }\n }\n\n buffer.append(\"\\n\\n\");\n\n buffer.append(\n \" ZERO ELEVATION STARTING DATE\\n\");\n buffer.append(\n \" -------------- -------------\\n\");\n\n available = getLinesPerPage() - count1 - count2 - 5;\n avail = available;\n loop = 0;\n\n for (Datum datum : data.getDatumList()) {\n String elevation = \" \";\n if (datum.getElevation() != -999) {\n elevation = String.format(\"%8.3f\", datum.getElevation());\n }\n\n String date = sdf.format(datum.getDate());\n\n String tmp1 = String.format(\" %s %24s%10s\\n\", elevation,\n \" \", date);\n\n needed = 1;\n\n if (needed <= avail) {\n buffer.append(tmp1);\n\n avail = avail - needed;\n } else if (needed > avail) {\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // Do footer.\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"))\n .getTime();\n String footer = createFooter(dataGage, E19_RREVISE_TYPE,\n sdf.format(d), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);// ????\n\n buffer.append(footer);\n\n // Do column header.\n buffer.append(\n \" ZERO ELEVATION STARTING DATE\\n\");\n buffer.append(\n \" -------------- -------------\\n\");\n\n avail = available + count1;\n }\n }\n\n buffer.append(\"\\n\\n\");\n\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // Do footer.\n String footer = createFooter(dataGage, E19_RREVISE_TYPE,\n sdf.format(new Date()), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);\n\n buffer.append(footer);\n\n return buffer.toString();\n }", "private void addRecordFooter()\n {\n addIndent();\n openEndTag(RECORD);\n closeTag();\n }", "public void debugPrint() {\n System.out.println(\"### Image Handler ###\");\n System.out.println(\"Handling: \" + images.size());\n }", "public void printAnnouncements(){\n\n if (this.announcementLogbook.isEmpty() == false){\n\n for (String log : this.announcementLogbook){\n this.announcementLogs.setText(this.announcementLogs.getText() + log + \"\\n\");\n }\n }\n\n this.announcementLogbook.clear();\n }", "public void savingsWithdrawReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "void storeLogMessage(String log)\n {\n logImage += log + \"\\n\";\n System.out.println(logImage);\n printFile(\"Log.txt\");\n }", "public void log() {\n String headID = head.getCommitID();\n while (headID != null) {\n File curr = new File(\".gitlet/commits/\" + headID);\n Comm currcomm = Utils.readObject(curr, Comm.class);\n System.out.println(\"===\");\n System.out.println(\"commit \" + currcomm.getCommitID());\n if (currcomm.getMergepointer() != null) {\n System.out.println(\"Merge: \"\n + currcomm.getParent().getCommitID()\n .substring(0, 7) + \" \"\n + currcomm.getMergepointer().getCommitID()\n .substring(0, 7));\n }\n System.out.println(\"Date: \" + currcomm.getDate());\n System.out.println(currcomm.getMessage());\n System.out.println();\n if (currcomm.getParent() == null) {\n break;\n } else {\n headID = currcomm.getParent().getCommitID();\n }\n }\n }", "private List<String> print() throws EQException\n\t{\n\t\t// Retrieve the layout\n\t\tLayout layout = screenSetPrint.getLayout();\n\n\t\t// Setup the array list\n\t\tlines.clear();\n\n\t\t// LINE 1: function title\n\t\tif (printHeader)\n\t\t{\n\t\t\tprinterFormatter.printFieldTitle(screenSetPrint.getLayout().rtvLabel(fhd.getEquationUser()));\n\t\t\taddLine();\n\t\t\taddLine();\n\t\t}\n\n\t\t// LINE 2: before and after image column header\n\t\tif (functionDataBef != null)\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(true, true);\n\t\t}\n\t\telse if (functionDataBef == null && beforeImage)\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(false, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprinterFormatter.printColumnHeader(true, false);\n\t\t}\n\t\taddLine();\n\n\t\t// LINE 3 and onwards\n\n\t\t// get all the output fieldSets\n\t\tList<InputFieldSet> fieldSets = screenSetPrint.getFunction().getInputFieldSets();\n\t\tfor (int i = 0; i < fieldSets.size(); i++)\n\t\t{\n\t\t\t// Retrieve the field set\n\t\t\tInputFieldSet fieldSet = fieldSets.get(i);\n\n\t\t\t// Print the record name\n\t\t\tif (printHeader)\n\t\t\t{\n\t\t\t\taddLine();\n\t\t\t\tprinterFormatter.printRecordName(fieldSet.getId(), fieldSet.rtvLabel(fhd.getEquationUser()));\n\t\t\t\taddLine();\n\t\t\t}\n\n\t\t\t// Retrieve the layout for this screen set\n\t\t\tDisplayAttributesSet displayAttributeSet = layout.getDisplayAttributesSet(fieldSet.getId());\n\t\t\tprint(fieldSet, displayAttributeSet, displayAttributeSet.getDisplayItems());\n\t\t}\n\n\t\treturn (getLines());\n\t}", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "private void logCurrentSensorEntriesBatch() {\n\t\tentriesRecorded++;\n\n\t\tint targetBatchSize = Constants.MS_FREQUENCY_FOR_CAMERA_CAPTURE / Constants.MS_INS_SAMPLING_FREQUENCY;\n\n\t\tArrayList<SensorEntry> toProcess = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(0, targetBatchSize));\n\t\tthis.sensorEntryBatch = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(targetBatchSize,\n\t\t\t\ttargetBatchSize));\n\n\t\tthis.writeBatchToFile(toProcess);\n\t}", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}", "public void showBeforeAfterLocation() {\n\t\tfor (Integer key : afterLoc.keySet()) {\n\t\t\tdouble[] ary = afterLoc.get(key);\n\n\t\t\tString locationA = \"\";\n\t\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t\tlocationA += Config.roundTwoDecimals(ary[i]) + \"\\t\";\n\t\t\t}\n\n\t\t\tdouble[] ary2 = beforeLoc.get(key);\n\n\t\t\tString locationB = \"\";\n\t\t\tfor (int i = 0; i < ary2.length; i++) {\n\t\t\t\tlocationB += Config.roundTwoDecimals(ary2[i]) + \"\\t\";\n\t\t\t}\n\t\t\tCaller.log(\" AFTER: \" + key + \" | \" + locationA + \"\\t|\" + attractors.get(key).count);\n\t\t}\n\t}", "public void savingsWithdrawReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "static void recordProcess() {\n try {\n PrintWriter output = new PrintWriter(new FileWriter(file, true));\n output.print(huLuWaList.size() + \" \");\n lock.lock();\n for (Creature creature : huLuWaList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.print(enemyList.size() + \" \");\n for (Creature creature : enemyList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.println();\n output.close();\n lock.unlock();\n }catch (Exception ex){\n System.out.println(ex);\n }\n }", "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 }", "private void printHistory(patient toPrint){\r\n if (toPrint == null)\r\n JOptionPane.showMessageDialog\r\n (null, \"No Patient to print\");\r\n else{\r\n String history = \"\";\r\n for (String s: toPrint.getApptPaymentHistory()){\r\n history += s + \"\\n\";\r\n }\r\n billing_patientHistoryTextArea.setText(history);\r\n }\r\n }", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\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 \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }", "private void printImage(PrintDocument printDocument) throws PrinterException, IOException {\n logger.debug(\"printImage::\" + printDocument);\n\n String filename = DocumentService.getFileFromUrl(printDocument.getUrl()).getPath();\n\n long timeStart = System.currentTimeMillis();\n\n DocPrintJob docPrintJob = getDocPrintJob(printDocument.getType());\n\n PrinterJob job = PrinterJob.getPrinterJob();\n job.setPrintService(docPrintJob.getPrintService());\n PageFormat pageFormat = getPageFormat(job);\n\n Image image = ImageIO.read(new File(filename));\n\n Book book = new Book();\n AnnotatedPrintable printable = new AnnotatedPrintable(new ImagePrintable(image));\n\n for (AnnotatedPrintable.AnnotatedPrintableAnnotation printDocumentExtra : printDocument.getExtras()) {\n printable.addAnnotation(printDocumentExtra);\n }\n\n book.append(printable, pageFormat);\n\n job.setPageable(book);\n job.setJobName(\"WebApp Hardware Bridge Image\");\n job.setCopies(printDocument.getQty());\n job.print();\n\n long timeFinish = System.currentTimeMillis();\n logger.info(\"Document \" + filename + \" printed in \" + (timeFinish - timeStart) + \"ms\");\n }", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void displayMedicines(Medicine med) {\n System.out.printf(\"%10s %5s %30s %5s %20s %5s %20s %5s %15s %5s %10s\", \"ID\", \"|\", \"Generic Name\", \"|\", \"Brand Name\", \"|\", \"Type of Medicine\", \"|\", \"Price\", \"|\", \"Stock (Pieces)\\n\");\n System.out.printf(\"%s\", \"------------------------------------------------------------------------------------------------------------------------------------------------\\n\");\n for (int i = 0; i < med.getMedicineList().size(); i++) {\n System.out.printf(\"%10s %5s %30s %5s %20s %5s %20s %5s %15s %5s %10s \\n\", med.getMedicineList().get(i).getId(), \"|\", med.getMedicineList().get(i).getGenericName(), \"|\", med.getMedicineList().get(i).getBrandName(), \"|\", med.getMedicineList().get(i).getMedicineType(), \"|\", med.getMedicineList().get(i).getPrice(), \"|\", med.getMedicineList().get(i).getStock());\n }\n// System.out.printf(\"%30s %5s %20s %5s %20s %5s %15s %5s %10s\", \"Generic Name\", \"|\", \"Brand Name\", \"|\",\"Type of Medicine\",\"|\", \"Price\",\"|\", \"Stock (Pieces)\\n\");\n// System.out.printf(\"%s\", \"-------------------------------------------------------------------------------------------------------------------------------\\n\");\n// for(int i=0; i<med.getMedicineList().size();i++){\n// System.out.printf(\"%30s %5s %20s %5s %20s %5s %15s %5s %10s\", med.getMedicineList().get(i).getGenericName(), \"|\", med.getMedicineList().get(i).getBrandName(), \"|\",med.getMedicineList().get(i).getMedicineType(),\"|\", med.getMedicineList().get(i).getPrice(),\"|\", med.getMedicineList().get(i).getStock()+\"\\n\");\n// }\n }", "void separateOut() {\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n if (outputType.equals(\"Text\")) {\n FileWriter writer = new FileWriter(outputDir\n + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".txt\", false);\n BufferedWriter bWriter = new BufferedWriter(writer);\n for (int j = 1; j < images.length; j++) {\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n }\n bWriter.close();\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n for (int j = 1; j < images.length; j++) {\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n document.save(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".pdf\");\n document.close();\n }\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n if (outputType.equals(\"Text\")) {\n FileWriter writer = new FileWriter(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".txt\", false);\n BufferedWriter bWriter = new BufferedWriter(writer);\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n bWriter.close();\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n document.save(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".pdf\");\n document.close();\n }\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }", "private synchronized void print4() {\n try {\n int jNum = 0;\n\n byte[] printText22 = new byte[10240];\n\n byte[] oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setInternationalCharcters('3');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"FoodCiti\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"\\nOrder No : \" + order.getOrderNo());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String location = SessionManager.get(getActivity()).getRestaurantLocation();\n int spacecount = commacount(location);\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (spacecount >= 1) {\n oldText = getGbk(location.substring(0, location.indexOf(',')) + \"\\n\" + location.substring(location.indexOf(',') + 1) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(location + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantPostalCode() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Tel:\" + SessionManager.get(getActivity()).getRestaurantPhonenumber());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderSpecialInstruction() != null) {\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(order.getOrderSpecialInstruction());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\" \" + \"GBP\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // Toast.makeText(getContext(),\"Size \"+order.getOrderedItemList().size(),Toast.LENGTH_LONG).show();\n\n for (int i = 0; i < order.getOrderedItemList().size(); i++) {\n\n OrderedItem orderedItem = order.getOrderedItemList().get(i);\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// int qntity = Integer.parseInt(orderedItem.getQuantity());\n oldText = getGbk(\" \" + orderedItem.getQuantity() + \" x \" + orderedItem.getItemData().getItemName());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Double total_price = Double.valueOf(orderedItem.getTotalPrice()) * Double.valueOf(orderedItem.getQuantity());\n\n oldText = getGbk(\" \" + String.format(Locale.getDefault(), \"%.2f\", total_price) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n for (int j = 0; j < orderedItem.getSubItemList().size(); j++) {\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(35);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n SubItem subItem = orderedItem.getSubItemList().get(j);\n\n String subitemname = subItem.getItemName();\n int subItemOrderQty = Integer.parseInt(subItem.getOrderedQuantity());\n\n if (subItemOrderQty > 1) {\n oldText = getGbk(\" \" + subItem.getOrderedQuantity() + \" x \" + subitemname + \"\\n\");\n } else {\n oldText = getGbk(\" \" + subitemname + \"\\n\");\n }\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n // By Ravi\n// oldText = getGbk(\"........................\\n\");\n// System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n// jNum += oldText.length;\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n /** TODO\n * change here for print suboptions text\n * **/\n //print text for suboptions items\n if (subItem.getSubOptions() != null && subItem.getSubOptions().size() > 0) {\n List<SubOptions> subOptions = subItem.getSubOptions();\n for (int k = 0; k < subOptions.size(); k++) {\n SubOptions options = subOptions.get(k);\n oldText = getGbk(\" - \" + options.getName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;*/\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Subtotal : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderSubtotal())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (Double.valueOf(order.getDiscount()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Discount : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDiscount())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n if (Double.valueOf(order.getTax()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Service Charge : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (order.getTax() != null) {\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getTax())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\" \" + \"0.00\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n if (!order.getOrderDelivery().equals(Consts.PICK_UP) && Double.valueOf(order.getDeliveryCharges()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Delivery Charges : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDeliveryCharges())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"TOTAL Price: \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(370);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n //Toast.makeText(getActivity(),String.valueOf(order.getOrderTotal()),Toast.LENGTH_LONG).show();\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderTotal())));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getFreenDrinkText() != null && !TextUtils.isEmpty(order.getFreenDrinkText())) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String freeTxt = \"Free \" + order.getFreenDrinkText();\n oldText = getGbk(freeTxt);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n /** TODO\n * change here to print payment method text\n * **/\n //print text for payment method\n if (order.getOrderPaid().equalsIgnoreCase(\"paypal\") || order.getOrderPaid().equalsIgnoreCase(\"worldpay\")) {\n oldText = getGbk(order.getOrderPaid() + \" PAID \" + \"\\n\");\n } else {\n oldText = getGbk(order.getOrderPaid() + \" NOT PAID \" + \"\\n\");\n }\n// oldText = getGbk(\"ORDER BY \" + order.getOrderPaid() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderDelivery().equals(Consts.PICK_UP)) {\n oldText = getGbk(\"COLLECTION\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\"DELIVERY\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n }\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // String strTmp2 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\", Locale.UK).format(new Date());\n oldText = getGbk(getDate(order.getOrderTime()));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Customer Details: \" + \"\\n\" +\n order.getUser().getUserName().toUpperCase() + \"\\n\" +\n order.getUser().getAddress().toUpperCase() + \"\\n\" +\n order.getUser().getCity().toUpperCase() + \"\\n\" +\n order.getUser().getPostalCode().toUpperCase() + \"\\n\" +\n order.getUser().getPhNo().toUpperCase()\n );\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Ref:\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(order.getOrderId());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"www.foodciti.co.uk\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*String s = new String(printText22);\n Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();*/\n\n oldText = CutPaper();\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Intent intent = new Intent(PrintUtils.ACTION_PRINT_REQUEST);\n intent.putExtra(PrintUtils.PRINT_DATA, printText22);\n localBroadcastManager.sendBroadcast(intent);\n\n// mOutputStream.write(printText22);\n\n } catch (Exception ex) {\n Exlogger exlogger = new Exlogger();\n exlogger.setErrorType(\"Print Error\");\n exlogger.setErrorMessage(ex.getMessage());\n exlogger.setScreenName(\"OrderInfo->>print4() function\");\n logger.addException(exlogger);\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_LONG).show();\n\n\n }\n }", "private void createStdText( PdfContentByte cb )\r\n throws Exception\r\n {\r\n writeText( _286, _685, rb.getString( \"pdf.logList.red\" ), cb, BOOLEAN_TRUE, _14, _0 );\r\n writeText( _286 + _180, _685, rb.getString( \"pdf.logList.blue\" ), cb, BOOLEAN_TRUE, _14, _0 );\r\n writeText( _198, _650, rb.getString( \"pdf.logList.name\" ), cb, BOOLEAN_FALSE, _8, _1 );\r\n writeText( _198 + _180, _650, rb.getString( \"pdf.logList.name\" ), cb, BOOLEAN_FALSE, _8, _1 );\r\n writeText( _198, _610, rb.getString( \"pdf.logList.firstName\" ), cb, BOOLEAN_FALSE, _8, _1 );\r\n writeText( _198 + _180, _610, rb.getString( \"pdf.logList.firstName\" ), cb, BOOLEAN_FALSE, _8, _1 );\r\n writeText( _198, _570, rb.getString( \"pdf.logList.team\" ), cb, BOOLEAN_FALSE, _8, _1 );\r\n writeText( _198 + _180, _570, rb.getString( \"pdf.logList.team\" ), cb, BOOLEAN_FALSE, _8, _1 );\r\n\r\n writeText( _60, 485, rb.getString( \"pdf.logList.series1\" ), cb, true, 14, 1 );\r\n writeText( _60, 405, rb.getString( \"pdf.logList.series2\" ), cb, true, 14, 1 );\r\n writeText( _60, 325, rb.getString( \"pdf.logList.series3\" ), cb, true, 14, 1 );\r\n writeText( _60, 245, rb.getString( \"pdf.logList.series4\" ), cb, true, 14, 1 );\r\n writeText( _60, 185, rb.getString( \"pdf.logList.result\" ), cb, true, 14, 1 );\r\n\r\n writeText( _56, 150, rb.getString( \"pdf.logList.winner\" ), cb, BOOLEAN_TRUE, _14, _1 );\r\n writeText( _56, 100, rb.getString( \"pdf.logList.signatures\" ), cb, BOOLEAN_TRUE, _14, _1 );\r\n return;\r\n }", "public void processTrace() throws Exception {\n\n log.debug( \"\\t Processing trace for NEDBO id = \" + \n getNotesElementId() ) ;\n \n if( getNotesElementId() == -1 ) {\n log.info( \"\\t Notes element will be created.\" ) ;\n NotesElementDAO.create( this ) ;\n return ;\n }\n else if( isModified ) {\n log.info( \"\\t Notes element will be updated. id=\" + \n getNotesElementId() ) ;\n NotesElementDAO.update( this ) ;\n }\n else if( !sourceTrace ) {\n log.info( \"\\t Notes element will be deleted. id=\" + \n getNotesElementId() ) ;\n NotesElementDAO.delete( this ) ;\n return ;\n // The associated cards will be cascade deleted at the database.\n // No need to delete them explicitly.\n }\n \n for( CardDBO dbo : cards ) {\n dbo.processTrace() ;\n }\n }", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "void printout() {\n\t\tprintstatus = idle;\n\t\tanyprinted = false;\n\t\tfor (printoldline = printnewline = 1;;) {\n\t\t\tif (printoldline > oldinfo.maxLine) {\n\t\t\t\tnewconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (printnewline > newinfo.maxLine) {\n\t\t\t\toldconsume();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (newinfo.other[printnewline] < 0) {\n\t\t\t\tif (oldinfo.other[printoldline] < 0)\n\t\t\t\t\tshowchange();\n\t\t\t\telse\n\t\t\t\t\tshowinsert();\n\t\t\t} else if (oldinfo.other[printoldline] < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse if (oldinfo.other[printoldline] == printnewline)\n\t\t\t\tshowsame();\n\t\t\telse\n\t\t\t\tshowmove();\n\t\t}\n\t\tif (anyprinted == true)\n\t\t\tprintln(\">>>> End of differences.\");\n\t\telse\n\t\t\tprintln(\">>>> Files are identical.\");\n\t}", "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "public void endDocument()\r\n\t{\r\n\t /* marc_out.add(\"=008 \" + running_date + \"s\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\sbm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" + language + \"\\\\d\"); */ /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=008 \" + running_date + \"s\" + comp_date + \"\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\obm\\\\\\\\\\\\000\\\\0\\\\\" + language + \"\\\\d\"); /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=264 30$a[Washington, D. C.] :$bGeorge Washington University,$c\" + comp_date + \".\"); /** 20130430: rev 260*/\r\n\t}", "public static void WriteFile(){\n String[] linha;\n FileWriter writer;\n try{\n writer = new FileWriter(logscommissions, true);\n PrintWriter printer = new PrintWriter(writer);\n linha = ManageCommissionerList.ReturnsCommissionerListInString(ManageCommissionerList.comms.size()-1);\n for(int i=0;i<19;i++){\n printer.append(linha[i]+ \"\\n\");\n }\n printer.close();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"Unable to read file\\n\");\n }\n try{\n Commissions temp = ManageCommissionerList.comms.get(ManageCommissionerList.comms.size()-1);\n BufferedImage img = temp.GetWipImage();\n File fl = new File(\"wipimages/wip\" + temp.GetCommissionTitle() + temp.GetUniqueID() + \".jpg\");\n ImageIO.write(img, \"jpg\", fl);\n }catch (Exception e){\n e.printStackTrace();\n System.out.printf(\"Failure to write image file\");\n }\n \n }", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "private void displayEntity(ArrayList<Entity> entities){\n for(Entity entity : entities)\n entity.printImage();\n }", "@RequestMapping(\"picDetailsUser.do\")\n public void accountChangesDiv() throws IOException, ParseException {\n response.setHeader(\"Cache-Control\", \"no-cache\");\n response.setContentType(\"text/plain\");\n response.setCharacterEncoding(\"utf-8\");\n Writer out;\n out = response.getWriter();\n StringBuilder picDetails = new StringBuilder();\n Map<String, Object> aeDataMap = null;\n List<Map<String, Object>> getProductList = userdao.getDetailsList();\n\n Iterator<Map<String, Object>> itr = getProductList.iterator();\n while (itr.hasNext()) {\n aeDataMap = itr.next();\n // to identify the record uniquely on the bases of : ID.\t\t\t\t\t\t\n\n // citationDiv.append( \"<article class='item thumb' data-width='282'><h2>You really got me</h2><a href='imagesPic/pictures/\"+aeDataMap.get(\"pic_path\")+\"'><img src='imagesPic/pictures/\"+aeDataMap.get(\"pic_path\")+\"' alt=''></a></article>\" );\n System.out.println(\"image paths????>>>\" + aeDataMap.get(\"pic_path\"));\n //System.out.println(\"string ...???>>>\"+citationDiv.toString());\n\n picDetails.append(\"<article class='item thumb' data-width='476'><h2>Kingdom of the Wind</h2><a href='imagesPic/pictures/\" + aeDataMap.get(\"pic_path\") + \"'><img src='imagesPic/pictures/\" + aeDataMap.get(\"pic_path\") + \"' alt=''></a></article>\");\n\n }\n out.write(picDetails.toString());\n\n\n }", "public void printData() {\n\t\ttry {\n\t\t\tFiles.lines(new File(PAYROLL_FILE_NAME).toPath())\n\t\t\t.forEach(System.out::println); \n\t\t}catch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void renderImage()\n {\n for (int i = 0; i < _imageWriter.getNx(); i++)\n {\n for (int j = 0; j < _imageWriter.getNy(); j++)\n {\n Ray ray;\n ray = new Ray(_scene.getCamera().constructRayThroughPixel(_imageWriter.getNx(), _imageWriter.getNy(),j,i,\n _scene.getScreenDistance(), _imageWriter.getWidth(),_imageWriter.getHeight()));\n\n if(i==255 && j==255)\n System.out.print(\"111\");\n Map<Geometry, List<Point3D>> intersectionPoints = new HashMap<>(getSceneRayIntersections(ray));\n\n if(intersectionPoints.isEmpty())\n _imageWriter.writePixel(j, i, _scene.getBackground());\n else\n {\n Map<Geometry, Point3D> closestPoint = getClosestPoint(intersectionPoints);\n Map.Entry<Geometry,Point3D> entry;\n Iterator<Entry<Geometry, Point3D>> it = closestPoint.entrySet().iterator();\n entry = it.next();\n _imageWriter.writePixel(j, i, calcColor(entry.getKey(), entry.getValue(), ray));\n }\n\n }\n }\n //printGrid(1);\n\n }", "public void recordVictims(){\n\t\t\n\t\tfor (int i = 0; i < parts.size(); i++) {\n BodyPart joe = parts.get(i);\n int x = (int)Math.round((joe.getLocationX() * scale) + width/2);\n int y = (int)Math.round((joe.getLocationY() * scale) + height/2);\n g2d.setColor(Color.red);\n g2d.fillRect(x,y,4,4);\n\t\t\t\t\t \n }\n\t\t\tfor (int i = 0; i < people.size(); i++) {\n BodyPart joe = people.get(i);\n int x = (int)Math.round((joe.getLocationX() * scale) + width/2);\n int y = (int)Math.round((joe.getLocationY() * scale) + height/2);\n g2d.setColor(Color.cyan);\n g2d.fillRect(x,y,7,7);\n\t\t\t\t\t \n }\n\t}", "public void displayImageToConsole();", "public void print() {\n\tfor (int i = 0; i &lt; mCalendarMarkings.sizeCalendarMarkingList(); i++) {\n\t CalendarMarking marking = mCalendarMarkings.getCalendarMarking(i);\n\t // get first occurrence:\n\t Calendar firstDay = Calendar.getInstance();\n\t firstDay.setTimeInMillis(marking.getStartDate());\n\t RepetitionHandler handler = sHandlerMap.get(marking.getRepeatType());\n\t firstDay = handler.getFirst(firstDay, marking);\n\t printDate(firstDay);\n\t while (firstDay != null) {\n\t\tfirstDay = handler.getNext(firstDay, marking);\n\t\tprintDate(firstDay);\n\t }\n\t}\n }", "public static void generateImagesForStrcuture(PrintWriter printWriter, List<StructureDetailsTabDTO> structureDetailsTabDTOList) throws MolFormatException, IOException {\n\n\n for (StructureDetailsTabDTO structureTabDataReturn : structureDetailsTabDTOList) {\n\n /* if (!structureTabDataReturn.getSubSmiles.isEmpty() ){*/\n chemaxon.util.MolHandler mh1 = new chemaxon.util.MolHandler(structureTabDataReturn.getSubSmiles());\n System.out.println(\"file mol check\" + mh1);\n mh1.aromatize();\n chemaxon.struc.Molecule mol = mh1.getMolecule();\n mol.clean(2, null);\n mol.dearomatize();\n byte[] s1 = mol.toBinFormat(\"png:w250,h250,b32\");\n\n printWriter.write(Base64.encodeToString(s1));\n System.out.println(\"generate the image check\" + s1);\n /* }*/\n }\n\n }", "public void logScreen(String imageName) {\n this.logScreen(imageName, imageName, thumbHeight, thumbWidth);\n }", "public void loanDisbursementReceitStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Loan Disbursment Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Batch Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan ID: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\np.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine();\np.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\np.newLine();\np.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\np.newLine();\np.setText(\"Disbursemnt Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(12).toString()+p.underLine(0));\np.newLine();\np.setText(\"Disbursement Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(13).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Disbursement Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Loan Disbursed: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(15).toString()+\"/=\"+p.underLine(0));\np.newLine(); \n//p.alignLeft();\n//p.setText(\"Loan Remaining: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(9).toString()+\"/=\"+p.underLine(0));\n//p.newLine(); \n//p.alignLeft();\n//p.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\n//p.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n }", "public static int saveAuditFindings(\n\t\t\tMeterReadImgAuditDetails meterReadImgAuditDetails) {\n\t\tAppLog.begin();\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tint updatedRow = 0;\n\t\ttry {\n\t\t\tconn = DBConnector.getConnection();\n\t\t\tString query = QueryContants\n\t\t\t\t\t.getUpdateAuditFindingsQuery(meterReadImgAuditDetails);\n\t\t\tAppLog.info(\"getUpdateAuditFindingsQuery::\" + query);\n\t\t\tps = conn.prepareStatement(query);\n\t\t\tint i = 0;\n\t\t\tif (null != meterReadImgAuditDetails.getNonSatsfctryReadngReasn()\n\t\t\t\t\t&& !\"\".equalsIgnoreCase(meterReadImgAuditDetails\n\t\t\t\t\t\t\t.getNonSatsfctryReadngReasn().trim())) {\n\t\t\t\tps.setString(++i, meterReadImgAuditDetails\n\t\t\t\t\t\t.getNonSatsfctryReadngReasn());\n\t\t\t}\n\t\t\tif (null != meterReadImgAuditDetails.getSatsfctryReadngReasn()\n\t\t\t\t\t&& !\"\".equalsIgnoreCase(meterReadImgAuditDetails\n\t\t\t\t\t\t\t.getSatsfctryReadngReasn().trim())) {\n\t\t\t\tps.setString(++i, meterReadImgAuditDetails\n\t\t\t\t\t\t.getSatsfctryReadngReasn());\n\t\t\t}\n\t\t\tif (null != meterReadImgAuditDetails.getSugstdAuditAction()\n\t\t\t\t\t&& !\"\".equalsIgnoreCase(meterReadImgAuditDetails\n\t\t\t\t\t\t\t.getSugstdAuditAction().trim())) {\n\t\t\t\tps.setString(++i, meterReadImgAuditDetails\n\t\t\t\t\t\t.getSugstdAuditAction());\n\t\t\t}\n\t\t\tif (null != meterReadImgAuditDetails.getLastAuditStatus()\n\t\t\t\t\t&& !\"\".equalsIgnoreCase(meterReadImgAuditDetails\n\t\t\t\t\t\t\t.getLastAuditStatus().trim())) {\n\t\t\t\tps\n\t\t\t\t\t\t.setString(++i, meterReadImgAuditDetails\n\t\t\t\t\t\t\t\t.getLastAuditStatus());\n\t\t\t}\n\t\t\tif (null != meterReadImgAuditDetails.getLastUpdatedBy()\n\t\t\t\t\t&& !\"\".equalsIgnoreCase(meterReadImgAuditDetails\n\t\t\t\t\t\t\t.getLastUpdatedBy().trim())) {\n\t\t\t\tps.setString(++i, meterReadImgAuditDetails.getLastUpdatedBy());\n\t\t\t}\n\t\t\tif (null != meterReadImgAuditDetails.getConsumptnVariatnReasn()\n\t\t\t\t\t&& !\"\".equalsIgnoreCase(meterReadImgAuditDetails\n\t\t\t\t\t\t\t.getConsumptnVariatnReasn().trim())) {\n\t\t\t\tps.setString(++i, meterReadImgAuditDetails\n\t\t\t\t\t\t.getConsumptnVariatnReasn());\n\t\t\t}\n\t\t\tif (null != meterReadImgAuditDetails.getAuditorName()\n\t\t\t\t\t&& !\"\".equalsIgnoreCase(meterReadImgAuditDetails\n\t\t\t\t\t\t\t.getAuditorName().trim())) {\n\t\t\t\tps.setString(++i, meterReadImgAuditDetails.getAuditorName());\n\t\t\t}\n\t\t\tps.setString(++i, meterReadImgAuditDetails.getKno());\n\t\t\tps.setString(++i, meterReadImgAuditDetails.getBillRound());\n\n\t\t\tAppLog.info(\"Applying Audit Finding Update for KNO \"\n\t\t\t\t\t+ meterReadImgAuditDetails.getKno());\n\t\t\tupdatedRow += ps.executeUpdate();\n\t\t\tAppLog.info(\"updatedRow\" + updatedRow);\n\n\t\t} catch (SQLException e) {\n\t\t\tAppLog.error(e);\n\t\t} catch (IOException e) {\n\t\t\tAppLog.error(e);\n\t\t} catch (Exception e) {\n\t\t\tAppLog.error(e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (null != ps) {\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif (null != rs) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif (null != conn) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tAppLog.error(e);\n\t\t\t}\n\t\t}\n\t\tAppLog.end();\n\t\treturn updatedRow;\n\t}", "void showinsert() {\n\t\tif (printstatus == change)\n\t\t\tprintln(\">>>> CHANGED TO <br/>\");\n\t\telse if (printstatus != insert)\n\t\t\tprintln(\">>>> INSERT BEFORE \" + printoldline);\n\t\tprintstatus = insert;\n\t\toutput+=newinfo.symbol[printnewline].showSymbol();\n\t\toutput+=\"<br/>\";\n\t\tanyprinted = true;\n\t\tprintnewline++;\n\t}", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "public void printResults(Map<String, String> endnoteExport){\n\tfor(Map.Entry<String,String> item : endnoteExport.entrySet()){\n\t\t\tSystem.out.println(item.getKey() + \" - \" + item.getValue());\n\t} \n }", "public void showNotes(PrintStream outputStream) {\n for (int i = 0; i < _notes.length; i++) {\n if (_notes[i] != null)\n outputStream.println((i + 1) + \"\\t\" + _notes[i].getNoteField().toString());\n }\n outputStream.close();\n }", "public void recordSensors2(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n\t\t\t\t\tSystem.out.println(\"OdTheta\" + sd.getOdTheta());\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getOdLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getOdTheta())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getOdLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getOdTheta()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n \n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}", "static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}", "@Override\r\n public void actionPerformed(ActionEvent slip) {\n if(slip.getSource()==b7)\r\n {\r\n String id=t1.getText();\r\n String bank_name=t3.getText();\r\n String bank_branch=t4.getText();\r\n String acc_no=t5.getText();\r\n String work_day=t6.getText();\r\n String basic=t7.getText();\r\n String home=t8.getText();\r\n String tra=t9.getText();\r\n String pro_tax=t10.getText();\r\n String gross=t11.getText();\r\n String dedu=t12.getText();\r\n String netsal=t13.getText();\r\n String path=\"E:\\\\\";\r\n com.itextpdf.text.Document doc=new com.itextpdf.text.Document();\r\n try\r\n {\r\n PdfWriter.getInstance(doc, new FileOutputStream(path+\"\"+t1.getText()+\"payslip\"+\".pdf\"));\r\n doc.open();\r\n Image img = Image.getInstance(\"D:\\\\prologos\\\\images3.png\");\r\n doc.add(img);\r\n// \r\n Paragraph paragraph1=new Paragraph(\" Pay Slip\",FontFactory.getFont(FontFactory.TIMES_ROMAN,18)); \r\n// \r\n doc.add(paragraph1);\r\n Paragraph paragraph2=new Paragraph(\"\\n ` Date & Time:\\t\"+l18.getText()+\" \"+l19.getText()+\"\\n\",FontFactory.getFont(FontFactory.TIMES_ROMAN,12)); \r\n// \r\n doc.add(paragraph2);\r\n \r\n Paragraph paragraph=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n// \r\n doc.add(paragraph);\r\n Paragraph paragraph3=new Paragraph(\"Employee Id:\\t\"+t1.getText()+\"\\nEmployee Bank Details:\\nBank Name:\\t\"+t3.getText()+\"\\nBank Branch:\\t\"+t4.getText()+\"\\nAccount Number:\\t\"+t5.getText()+\"\\n\\n\");\r\n doc.add(paragraph3);\r\n //PdfPTable ptable=new PdfPTable(2);\r\n// ptable.addCell(\"Description\");\r\n// ptable.addCell(\"Working Days:\");\r\n// ptable.addCell(\"Deductions\");\r\n// doc.add(ptable);\r\n// PdfPCell c1=new PdfPCell(new Phrase(\"Description\"));\r\n// ptable.addCell(c1); \r\n// c1=new PdfPCell(new Phrase(\"Amount\"));\r\n \r\n// Paragraph para=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n//// \r\n// doc.add(para);\r\n Paragraph paragraph4=new Paragraph(\"Salary Details:\\n\\n\",FontFactory.getFont(FontFactory.TIMES_BOLD,15));\r\n doc.add(paragraph4);\r\n// Paragraph paragraph5=new Paragraph(\"Working Days: \"+t6.getText()+\"\\n\\n\");\r\n// doc.add(paragraph5);\r\n// Paragraph paragraph6=new Paragraph(\"Basic Salary: \"+t7.getText()+\"\\n\\n\");\r\n// doc.add(paragraph6);\r\n// Paragraph paragraph7=new Paragraph(\"House Rent Allowance: \"+t8.getText()+\"\\n\\n\");\r\n// doc.add(paragraph7);\r\n// Paragraph paragraph8=new Paragraph(\"Traveling Allowance: \"+t9.getText()+\"\\n\\n\");\r\n// doc.add(paragraph8);\r\n// Paragraph paragraph9=new Paragraph(\"Professional Tax: \"+t10.getText()+\"\\n\\n\");\r\n// doc.add(paragraph9);\r\n// Paragraph paragraph10=new Paragraph(\"Gross Salary: \"+t11.getText()+\"\\n\\n\");\r\n// doc.add(paragraph10);\r\n// Paragraph paragraph11=new Paragraph(\"Deduction: \"+t12.getText()+\"\\n\\n\");\r\n// doc.add(paragraph11);\r\n// Paragraph paragraph12=new Paragraph(\"Net Salary: \"+t13.getText()+\"\\n\\n\\n\");\r\n// doc.add(paragraph12);\r\n \r\n \r\n \r\n \r\n \r\n PdfPTable ptable=new PdfPTable(2);\r\n PdfPCell pcell=new PdfPCell(new Paragraph(\"Description\"));\r\n PdfPCell pcell1=new PdfPCell(new Paragraph(\"Amount\"));\r\n pcell.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell.setFixedHeight(30f);pcell1.setFixedHeight(30f);\r\n ptable.addCell(pcell);\r\n ptable.addCell(pcell1);\r\n \r\n PdfPCell p1=new PdfPCell(new Paragraph(\"Working Days:\"));\r\n PdfPCell p2=new PdfPCell(new Paragraph(\"Basic Salary:\"));\r\n PdfPCell p3=new PdfPCell(new Paragraph(\"House Rent Allowance:\"));\r\n PdfPCell p4=new PdfPCell(new Paragraph(\"Traveling Allowance:\"));\r\n PdfPCell p5=new PdfPCell(new Paragraph(\"Professional Tax:\"));\r\n PdfPCell p6=new PdfPCell(new Paragraph(\"Gross Salary:\"));\r\n PdfPCell p7=new PdfPCell(new Paragraph(\"Deduction:\"));\r\n PdfPCell p8=new PdfPCell(new Paragraph(\"Net Salary:\"));\r\n \r\n \r\n PdfPCell p11=new PdfPCell(new Paragraph(t6.getText()));\r\n PdfPCell p12=new PdfPCell(new Paragraph(t7.getText()));\r\n PdfPCell p13=new PdfPCell(new Paragraph(t8.getText()));\r\n PdfPCell p14=new PdfPCell(new Paragraph(t9.getText()));\r\n PdfPCell p15=new PdfPCell(new Paragraph(t10.getText()));\r\n PdfPCell p16=new PdfPCell(new Paragraph(t11.getText()));\r\n PdfPCell p17=new PdfPCell(new Paragraph(t12.getText()));\r\n PdfPCell p18=new PdfPCell(new Paragraph(t13.getText()));\r\n \r\n \r\n \r\n p1.setFixedHeight(30f);p11.setFixedHeight(30f);\r\n p2.setFixedHeight(30f);p12.setFixedHeight(30f);\r\n p3.setFixedHeight(30f);p13.setFixedHeight(30f);\r\n p4.setFixedHeight(30f);p14.setFixedHeight(30f);\r\n p5.setFixedHeight(30f);p15.setFixedHeight(30f);\r\n p6.setFixedHeight(30f);p16.setFixedHeight(30f);\r\n p7.setFixedHeight(30f);p17.setFixedHeight(30f);\r\n p8.setFixedHeight(30f);p18.setFixedHeight(30f);\r\n \r\n \r\n p11.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p12.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p13.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p14.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p15.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p16.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p17.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p18.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n \r\n \r\n \r\n \r\n \r\n// ptable.addCell(p1);ptable.addCell(p2);\r\n// pcell.addElement(p1);\r\n// pcell.addElement(p2);\r\n// pcell1.addElement(p3);\r\n// pcell1.addElement(p4);\r\n// pcell.setRowspan(8);\r\n// pcell1.setRowspan(8);\r\n ptable.addCell(p1);ptable.addCell(p11);\r\n \r\n ptable.addCell(p2);ptable.addCell(p12);\r\n ptable.addCell(p3);ptable.addCell(p13);\r\n ptable.addCell(p4);ptable.addCell(p14);\r\n ptable.addCell(p5);ptable.addCell(p15);\r\n ptable.addCell(p6);ptable.addCell(p16);\r\n ptable.addCell(p7);ptable.addCell(p17);\r\n ptable.addCell(p8);ptable.addCell(p18);\r\n \r\n doc.add(ptable);\r\n Paragraph paragraph13=new Paragraph(\"\\n\\n\"+\"Computer Generated Salary Slip.\\nSignature not Required.\",FontFactory.getFont(FontFactory.TIMES_ITALIC,12));\r\n doc.add(paragraph13);\r\n// Font.BOLD\r\n Paragraph para1=new Paragraph(\"\\n\"+\" -------------------------------------------\"); \r\n// \r\n doc.add(para1);\r\n \r\n JOptionPane.showMessageDialog(null, \"Pay Slip Generated\",\"Salary\",JOptionPane.INFORMATION_MESSAGE);\r\n b10.setVisible(true);\r\n }\r\n catch(Exception ee)\r\n {\r\n ee.printStackTrace();\r\n }\r\n doc.close();\r\n }\r\n\r\n }", "private String printData() {\n reportStar += \"Total insert Stars: \" + insertStarStatus + \".\\n\";\n reportStar += \"Duplicates Stars found: \" + duplicatesStar + \". \\n\";\n return reportStar;\n }", "public void write(List<List<String>> imageLinesList) throws IOException {\n\t\ttry (var doc = new Document(new PdfDocument(new PdfWriter(RESULT_PDF_NAME)))) {\n\t\t\tdoc.setMargins(MARGIN, MARGIN, MARGIN, MARGIN);\n\t\t\tdoc.setFont(PdfFontFactory.createFont(FONT_TYPE));\n\t\t\tdoc.setFontSize(FONT_SIZE);\n\t\t\tfor (var imageTextList : imageLinesList) {\n\t\t\t\tfor (var text : imageTextList) {\n\t\t\t\t\tdoc.add(new Paragraph(text));\n\t\t\t\t}\n\t\t\t\tif (imageLinesList.indexOf(imageTextList) < imageLinesList.size() - 1) {\n\t\t\t\t\tdoc.add(new AreaBreak());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void loanPaymentReceitStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\np.emphasized(true);\np.underLine(2);\np.newLine();\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Loan Repayment Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Batch Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan ID: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \np.emphasized(false);\np.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX\"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine();\np.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\np.newLine();\np.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\np.newLine();\np.setText(\"Payment Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(12).toString()+p.underLine(0));\np.newLine();\np.setText(\"Payment Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(13).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Payment Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\np.newLine();\np.alignLeft();\np.setText(\"Loan Paid: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(9).toString()+\"/=\"+p.underLine(0));\np.newLine(); \n//p.alignLeft();\n//p.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\np.newLine();\n\np.addLineSeperator();\np.doubleStrik(true);\n\np.underLine(2) ;\np.newLine();\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\n\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.newLine();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n\np.addLineSeperator();\n//p.newLine();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n\n//p.addLineSeperator();\n//p.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void printScreen() {\n Graphics g;\n try {\n g = this.getGraphics();\n g.setColor(Color.red);\n if (dbImage != null) {\n g.drawImage(dbImage, 0, 0, null);\n String text = \"Score:\" + gameData.score.score;//text of displated score\n g.drawString(text, 50, 50);\n } else {\n System.out.println(\"printScreen:graphic is null\");\n }\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n } catch (Exception e) {\n System.out.println(\"Graphics error: \" + e);\n }\n }", "private void main_flow_manual_export(String dateFrom, String dateTo) throws SQLException {\n start_operation_complete_monitoring(this);\r\n BuffDBWriterTrell.total_nr_recorded_entries = 0;\r\n //======================\r\n NEW_RECORDS_FOUND = false;\r\n// String last_export_date = dateFrom;\r\n// last_export_date = HelpM.get_date_time_minus_some_time_in_ms(last_export_date, \"yyyy-MM-dd HH:mm:ss\", 600000);// 10 min\r\n //======================\r\n export_procedure_2(dateFrom, dateTo);\r\n //======================\r\n //\r\n if (NEW_RECORDS_FOUND) {\r\n wait_();\r\n String msg = \" (nr rec.= \" + (BufferedDBWriterSuper.total_nr_recorded_entries - 1) + \" )\";\r\n SimpleLoggerLight.logg(\"main_flow.log\", msg);\r\n// write_to_update_table(\"main_flow\", \"\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n } else {\r\n SimpleLoggerLight.logg_no_append(\"last_check.log\", \"-> LAST CHECK\");\r\n// write_to_update_table(\r\n// \"main_flow\", \"last_check\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n }\r\n }", "public void showOriginal()\n {\n try\n {\n String strLine,fileName;\n fileName = getFileName();\n File myFile = new File(MutationSystem.ORIGINAL_PATH,fileName);\n String blank_str;\n LineNumberReader lReader = new LineNumberReader(new FileReader(myFile));\n\n Document ddoc = originalTP.getDocument();\n\n while ((strLine=lReader.readLine()) != null)\n {\n \t blank_str = \"\";\n \t int del = (new Integer(lReader.getLineNumber())).toString().length();\n \t for (int k=0; k<5-del; k++)\n \t {\n \t blank_str=blank_str+\" \";\n }\n \t ddoc.insertString (ddoc.getLength(), lReader.getLineNumber()+blank_str, blue_attr);\n \t ddoc.insertString (ddoc.getLength(), strLine+\"\\n\", black_attr);\n }\n lReader.close();\n\n } catch (Exception e)\n {\n e.printStackTrace();\n System.err.println(\" [error] \" + e);\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void print() {\r\n\t\tSystem.out.println(\"** Metadata **\");\r\n\t\tfor (final Map<String, Object> m : _data) {\r\n\t\t\tSystem.out.println(\" + ALBUM\");\r\n\t\t\tfor (final String key : m.keySet()) {\r\n\t\t\t\tfinal Object o = m.get(key);\r\n\r\n\t\t\t\t// Most stuff is string, we can just dump that out.\r\n\t\t\t\tif (o instanceof String) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \": \" + (String) o);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (o instanceof ArrayList) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \":\");\r\n\t\t\t\t\tfor (final Object oo : (ArrayList<GracenoteMetadataOET>) o) {\r\n\t\t\t\t\t\tif (oo instanceof GracenoteMetadataOET) {\r\n\t\t\t\t\t\t\tfinal GracenoteMetadataOET oet = (GracenoteMetadataOET) oo;\r\n\t\t\t\t\t\t\toet.print();\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}", "public static void log() {\n String branch = commitPointers.readHeadCommit()[0];\n String currName = commitPointers.readHeadCommit()[1];\n File cFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n Commit curr = Utils.readObject(cFile, Commit.class);\n\n while (currName != null) {\n System.out.println(\"===\");\n System.out.println(\"commit \" + curr.commitID);\n if (curr.parentID.size() == 2) {\n System.out.println(\"Merge: \" + curr.parentID.get(0).substring(0, 7) + \" \" + curr.parentID.get(1).substring(0, 7));\n }\n System.out.println(\"Date: \" + curr.timeStamp.format(myFormatObj) + \" -0800\");\n System.out.println(curr.message);\n System.out.println();\n\n currName = curr.parentID.get(0);\n\n if (currName != null) {\n File newcFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n curr = Utils.readObject(newcFile, Commit.class);\n }\n }\n }", "public String printFileConsultationDetail() {\n String consultationDetail = \"\";\n for (String symptom : symptoms) {\n consultationDetail += symptom + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.SYMPTOM_DELIMITER;\n for (String diagnosis : diagnoses) {\n consultationDetail += diagnosis + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.DIAGNOSIS_DELIMITER;\n for (String prescription : prescriptions) {\n consultationDetail += prescription + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.PRESCRIPTION_DELIMITER;\n return consultationDetail;\n }", "private static void print(int[][] image) {\n for(int i = 0; i < image.length; i++) {\n for(int j = 0; j < image[0].length; j++) {\n System.out.print(image[i][j] + \" \");\n }\n System.out.println(\"\\n\");\n }\n }", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "public void print() \n\t{\n\t\tSystem.out.println(\"existing files:\\n\");\n\t\tIterator<Entry<String, byte[]>> existing = this.existingFile.entrySet().iterator();\n\t\twhile (existing.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = existing.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\\nprefix files:\\n\");\n\t\tIterator<Entry<String, byte[]>> prefix = this.prefix.entrySet().iterator();\n\t\twhile (prefix.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = prefix.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t}", "public static void printConsumerRecordMetaData(ConsumerRecord record) {\n log.info(\"Topic {}\", record.topic());\n log.info(\"Key: {}\", record.key());\n log.info(\"Value: {}\", record.value());\n log.info(\"Partition:{}\", record.partition());\n log.info(\"Offset: {}\", record.offset()\n + \"\\n-----------------------------\");\n }", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }", "private void IdentifyHeaderAndFooter() {\n receipt_Header = receipt_lines.length > 0 ? receipt_lines[0] : null;\n receipt_Footer = receipt_lines.length > 1 ? receipt_lines[receipt_lines.length - 1].split(\" \")[0] : null;\n }", "public void updatePrintFigures() {\n\n\t}", "private void initiateAccountPrintFields(JFrame frame) {\r\n JLabel q5 = new JLabel(\"Print details for mainAccount or altAccount?\");\r\n new Label(q5);\r\n// q5.setPreferredSize(new Dimension(1000, 100));\r\n// q5.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(q5);\r\n\r\n JTextField account = new JTextField();\r\n new TextField(account);\r\n// account.setPreferredSize(new Dimension(1000, 100));\r\n// account.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(account);\r\n\r\n ImageIcon icon = new ImageIcon(\"./data/printicon.JPG\");\r\n JLabel label = new JLabel(icon);\r\n label.setPreferredSize(new Dimension(1000, 100));\r\n frame.add(label);\r\n\r\n initiateAccountPrintEnter(frame, account);\r\n }", "private void init() {\n File file1 = new File(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n if (file1.exists()) file1.delete();\n PrintView<JianyiChuliTongzhidanListBean.DataListBean> printView1 = new PrintView<>(this,entity);\n String path1 = FileUtil.getInstance().save2Local(printView1.getcacheBitmap(), file1.getAbsolutePath());\n if (((User) SPUtils.getInstance().getObjectData(Constance.USER_OBJECT)).getZt() == 1) {\n saveAndStartPrintShare(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n return;\n }\n phandler.sendEmptyMessage(104);\n while (true){\n BorisPrint bPrint = new BorisPrint(MyApplication.getContext(), null,phandler);\n int code = bPrint.print(path1, 2);\n if (code==0){\n break;\n }\n }\n }", "public void onEndPage(PdfWriter writer, Document document) {\r\n\r\n\t\tImage image;\r\n\t\tFont fontStyle = new Font();\r\n\t\tfontStyle.setColor(255, 255, 255);\r\n\t\tfontStyle.setSize(10);\r\n\t\ttry {\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-footer.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, 0);\r\n\t\t\tdocument.add(image);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tString date = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\r\n\t\tColumnText.showTextAligned(writer.getDirectContent(), Element.ALIGN_CENTER,\r\n\t\t\t\tnew Phrase(String.format(\"Page - %d, Printed on : %s %s\", pagenumber, date, domainName), fontStyle),\r\n\t\t\t\t(document.getPageSize().getWidth()) / 2, document.bottomMargin() - 25, 0);\r\n\t}", "private String E19Cover() {\n StringBuilder buffer = new StringBuilder();\n\n TextReportData data = TextReportDataManager.getInstance()\n .getDataForReports(lid, 0);\n buffer.append(TextReportConstants.E19_HDR_COVER);\n buffer.append(\"\\n\\n\");\n buffer.append(\"\t\t\t U.S. DEPARTMENT OF COMMERCE\\n\");\n buffer.append(\n \" NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION\\n\");\n buffer.append(\n \" NATIONAL WEATHER SERVICE\\n\\n\");\n buffer.append(\n \" REPORT ON RIVER GAGE STATION\\n\\n\");\n\n String revisedDate = \" \";\n if (data.getRiverstat().getRrevise() != null) {\n revisedDate = sdf.format(data.getRiverstat().getRrevise());\n }\n\n Date now = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\")).getTime();\n String printedDate = sdf.format(now);\n\n buffer.append(String.format(\"%40s %10s, %10s\\n\\n\\n\",\n \"REVISED, PRINTED DATES:\", revisedDate, printedDate));\n\n buffer.append(String.format(\"LOCATION: %s\\n STREAM: %s\\n\",\n locData.getLocation().getName(),\n data.getRiverstat().getStream()));\n buffer.append(String.format(\" BASIN: %-30s HSA: %s\\n\",\n locData.getLocation().getRb(), locData.getLocation().getHsa()));\n buffer.append(\"\\n\");\n\n buffer.append(\"REFERENCES:\\n\");\n TextReportData dataRefer = TextReportDataManager.getInstance()\n .getReferenceData(lid);\n int count = 0;\n if (dataRefer.getRefer() != null) {\n count = dataRefer.getRefer().size();\n }\n\n if (count > 0) {\n for (String s : dataRefer.getRefer()) {\n buffer.append(String.format(\" %s\\n\", s));\n }\n }\n\n // try to place ABBREVIATIONS at the bottom\n for (int i = 0; i < 16 - count; i++) {\n buffer.append(\"\\n\");\n }\n\n buffer.append(\"\\nABBREVIATIONS:\\n\\n\");\n buffer.append(\n \" BM - bench mark\t\tEPA - Environmental Protection Agency\\n\");\n buffer.append(\n \" DS - downstream\t\tIBWC - International Boundary and Water Comm.\\n\");\n buffer.append(\n \" US - upstream\t\tMSRC - Mississippi River Commission\\n\");\n buffer.append(\n \" HW - high water\t\tMORC - Missouri River Commission\\n\");\n buffer.append(\n \" LW - low water\t\tNOAA - National Oceanic and Atmospheric Admin.\\n\");\n buffer.append(\n \" RB - right bank\t\tNOS - National Ocean Survey\\n\");\n buffer.append(\n \" LB - left bank\t\tNWS - National Weather Service\\n\");\n buffer.append(\n \" MGL - mean gulf level\t\tTVA - Tennessee Valley Authority\\n\");\n buffer.append(\n \" MLW - mean low water\t\tUSACE - U.S. Army Corps of Engineers\\n\");\n buffer.append(\n \" MSL - mean sea level\t\tUSBR - U.S. Bureau of Reclamation\\n\");\n buffer.append(\n \" MLT - mean low tide\t\tUSGS - U.S. Geological Survey\\n\");\n buffer.append(\" MT - mean tide\t\tUSWB - U.S. Weather Bureau\\n\");\n buffer.append(\n \" WQ - water quality\t\tNGVD - National Geodetic Vertical Datum\\n\");\n buffer.append(\n \" RM - reference mark\t\tNAD - North American Datum\\n\");\n buffer.append(\" RP - reference point\\n\");\n buffer.append(\"\\n\\n\\n\");\n\n buffer.append(String.format(\n \"\t\t\t\t\t LOCATION IDENTIFICATION: %s\\n\", lid));\n buffer.append(\n String.format(\"\t\t\t\t\t\t NWS INDEX NUMBER: %s\\n\",\n locData.getLocation().getSn()));\n buffer.append(\n String.format(\"\t\t\t\t\t\t USGS NUMBER: %s\\n\",\n data.getRiverstat().getGsno()));\n\n return buffer.toString();\n }", "public void logrec()\r\n {\n Object[] row = new Object[4];\r\n\r\n if(true){\r\n row[0] = date;\r\n row[1] = un;\r\n row[2] = tn;\r\n // add row to the model\r\n\r\n\r\n model.addRow(row);}\r\n\r\n\r\n }", "public void loanStatamentStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\n//p.addLineSeperatorX();\n//p.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "void save4(PrintWriter pw){\n\t\t \t pw.println(\" \");\n\t\t\t int YEG = 0;\n int XEG = 0;\n for(int i =0; i < this.Items.length;i++){\n for(int p= 0; p < this.Items.length; p++){\n if(this.Items[i][p] != null){\n YEG = i;\n XEG = p;\n }//end of if statement\n }//end of inner for loop\n }//end of outer for loop\n pw.println(YEG + \" \" + XEG);\n\n\t\t }", "public void pintaFecha(){\n \tImage image;\r\n \ttry {\r\n\t \r\n \t\tString imageUrl = PropiedadesJLet.getInstance().getProperty(\"path.img.logoinvoice\") + \"FondoLeppardPico1.png\";\r\n\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 725);\r\n\t\t image.scaleAbsolute(50,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n \r\n\t\t\tFRAparen.absTextBoldColor(writer,\"Fecha \",inmargde,730,10,new BaseColor(255,255,255));\r\n\t\t\tFRAparen.absText(writer,FRAparen.fechaNormal(fhfactur),inmargde + 45,730,10);\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 700);\r\n\t\t image.scaleAbsolute(100,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n\t\t\t\r\n\t\t\tif (cabecNFC.equals(\"COND\") || cabecNFC.equals(\"R\")){\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t} else {\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,\"NFC \"+ cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t}\r\n\t\t\t\r\n \t} catch (Exception e) {\r\n \t\tSystem.err.println(this.getClass().getName() +\" ERROR pintaFecha() - \"+ e.getMessage());\r\n \t}\r\n \t\r\n }", "public void run() {\n\t\t\n sleep(1000);\n recordLocation();\n //writeImage(k);\n\n while (!Thread.currentThread().isInterrupted()) {\n\t\t \t\t if(recordImage){\n\t\t\t\t \t\t//Record INS Readings and create image\n\t\t\t\t \t\tsetWaypoint(); \n\t\t\t\t \t\t//wipe(); \n \t\t \t\trecordSensors();\n\t\t\t\t\t\t\trecordSensors2();\n\t\t\t\t\t\t\trecordVictims();\n\t\t\t\t\t\t\trecordWaypoints();\n \t\t \t\twriteImage();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n sleep(1000);\n }\n }", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn String.format(\"#%1$d *%2$s* (%3$s@doc): %4$s\\n%5$s\",\n\t\t\t id, poster_name, poster_uid, title,\n\t\t\t mlong.replaceAll(\"</?(br|BR)( ?/)?>\", \"\").replaceAll(\"</?(p|P) ( ?/)?>\", \"\\n\")\n\t\t\t);\n\t\t}", "public static void main(String args[]) throws IOException {\n\t File file = new File(\"fdpModification.pdf\");\n\t PDDocument document = PDDocument.load(file);\n\n\t //Retrieving the pages of the document\n\t PDPage page = document.getPage(1);\n\t PDPageContentStream contentStream = new PDPageContentStream(document, page);\n\n\t //Begin the Content stream\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 105);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12);\n\t contentStream.drawString(\"bold text\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.setFont(PDType1Font.HELVETICA_OBLIQUE, 12);\n\t contentStream.drawString(\"Italic text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD_OBLIQUE, 12);\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.endText();\n\n\t contentStream.setLineWidth(.5f);\n\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 55);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"artificially bold text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.appendRawCommands(\"1 Tr\\n\");\n\t contentStream.drawString(\"Artificially outlined text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.setTextMatrix(1, 0, .2f, 1, 7, 5);\n\t contentStream.drawString(\"Artificially italic text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t //Setting the font to the Content streamt\n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line\n\t contentStream.newLineAtOffset(0, 0);\n\n //Setting the leading\n contentStream.setLeading(14.5f);\n\n //Setting the position for the line\n contentStream.newLineAtOffset(25, 725);\n\n String text1 = \"This is an example of adding text to a page in the pdf document. we can add as many lines\";\n String text2 = \"as we want like this using the ShowText() method of the ContentStream class\";\n\n //Adding text in the form of string\n contentStream. showText(text1);\n contentStream.newLine();\n contentStream. showText(text2);\n //Ending the content stream\n contentStream.endText();\n\n System.out.println(\"Content added\");\n\n //Closing the content stream\n contentStream.close();\n\n //Saving the document\n document.save(new File(\"newtou.pdf\"));\n\n //Closing the document\n document.close();\n }", "public static void printAllRecords() {\r\n\t\tfor (int i = 0; i<studRecs.size(); i++) {\r\n\t\t\tprintRecord(i);\r\n\t\t}\r\n\t}", "@FXML\n\tprivate void onSaveClicked(){\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\tFile file = new File(\"log.txt\");\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(file, true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\twriter = new PrintWriter(bw);\n\t\t\twriter.println(\"New record\");\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\n\t\t\t\twriter.println(list.get(i) +\" & \"+ (dat.get(i)));\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\ttextArea.setText(\"Exception occurred:\" + ioe.getMessage());\n\t\t} finally {\n\t\t\tif (writer != null) {\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\n\t}", "private void logDatabaseMessage(String methodName, int status, String message, BufferedImage image) {\r\n\t\tint idImg = -1;\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\t\r\n\t\t\tif (image != null)\r\n\t\t\t\tidImg = insertImageIntoDatabase(image);\r\n\t\t\t\r\n\t\t\tPreparedStatement pStat = dbConnection\r\n\t\t\t\t\t.prepareStatement(\"insert into steps (id_test, id_run, id_status, title, details, time, id_img) VALUES (?, ?, ?, ?, ?, now(), ?)\");\r\n\t\t\tpStat.setInt(1, Conf.getTestId());\r\n\t\t\tpStat.setInt(2, Conf.getRunId());\r\n\t\t\tpStat.setInt(3, status);\r\n\t\t\tpStat.setString(4, methodName);\r\n\t\t\tpStat.setString(5, message);\r\n\r\n\t\t\tif (idImg == -1) {\r\n\t\t\t\tpStat.setNull(6, Types.INTEGER);\r\n\t\t\t} else {\r\n\t\t\t\tpStat.setInt(6, idImg);\r\n\t\t\t}\r\n\r\n\t\t\tpStat.execute();\r\n\t\t\tpStat.close();\r\n\t\t\t\r\n\t\t\tupdateTestEnd();\r\n\t\t\t\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "@Override\n public String toString() {\n return \"IsimUiccRecords: \" + super.toString()\n + (DUMP_RECORDS ? (\" mIsimImpi=\" + mIsimImpi\n + \" mIsimDomain=\" + mIsimDomain\n + \" mIsimImpu=\" + mIsimImpu\n + \" mIsimIst=\" + mIsimIst\n + \" mIsimPcscf=\" + mIsimPcscf) : \"\");\n }", "private void printLines() {\n for (String L: testLines) {\n print.write(L);\n }\n }", "@Override\r\n\tvoid indicators() {\n\t\tSystem.out.println(\"general indicators\");\r\n\t}", "private void printBulkEstimate(BulkEstimate compbe) {\n AllocationResult[] results = compbe.getAllocationResults();\n for (int x = 0; x < results.length; x++) {\n AllocationResult anar = results[x];\n System.out.println(\"\\n\\n AllocationResult: \");\n AspectValue[] myresults = anar.getAspectValueResults();\n for (int i = 0; i < myresults.length; i++) {\n AspectValue anav = myresults[i];\n if ( (anav.getAspectType() == 0) || (anav.getAspectType() == 1) ) {\n Date ndate = new Date( (long)anav.getValue() );\n System.out.println(\"AspectValue type: \" + anav.getAspectType() +\n \" AspectValue value: \" + ndate.toString() );\n } else { \n System.out.println(\"AspectValue type: \" + anav.getAspectType() +\n \" AspectValue value: \" + anav.getValue() );\n }\n }\n }\n }", "public void testGetRecordWithWikiPageIdAndFileNameWithStatusAorD() {\r\n\t\tInteger wikiPageId = 1045617;\r\n\t\tString fileName = \"test.gif\";\r\n\t\tInteger wikiAttachmentId = 1;\r\n\t\tPnWikiAttachment pnWikiAttachment = new PnWikiAttachment(wikiAttachmentId);\r\n\t\tpnWikiAttachment.setAttachmentName(fileName);\r\n\t\t\r\n\t\texpect(mockDao.getRecordWithWikiPageIdAndFileNameWithStatusAorD(wikiPageId, fileName)).andReturn(pnWikiAttachment);\r\n\t\treplay(mockDao);\r\n\t\t\r\n\t\tPnWikiAttachment pnWikiAttachment2 = service.getRecordWithWikiPageIdAndFileNameWithStatusAorD(wikiPageId, fileName);\r\n\t\tassertEquals(1, pnWikiAttachment2.getWikiAttachmentId().intValue());\r\n\t\tassertEquals(\"test.gif\", pnWikiAttachment2.getAttachmentName());\r\n\t\tverify(mockDao);\r\n\t}", "@FXML\n void printByDate(ActionEvent event) {\n \tString accInfo = db.printByDateOpen();\n \tmessageArea.setText(accInfo);\n }" ]
[ "0.5774185", "0.57190186", "0.5660792", "0.5394335", "0.5376826", "0.5333964", "0.5289618", "0.51895803", "0.51877475", "0.5180904", "0.5168485", "0.516605", "0.51605636", "0.51449007", "0.51315665", "0.5123425", "0.50841373", "0.5070751", "0.5066091", "0.5064104", "0.50598943", "0.50505286", "0.5031848", "0.500347", "0.49955344", "0.4991308", "0.49813867", "0.49810052", "0.49625793", "0.4960768", "0.49463746", "0.492977", "0.4921485", "0.4915704", "0.49055982", "0.4904666", "0.49046648", "0.49032685", "0.4883705", "0.48831537", "0.48827174", "0.48784852", "0.48707682", "0.48700133", "0.48660463", "0.48497275", "0.4848401", "0.48453864", "0.48375788", "0.4818065", "0.4807803", "0.47989476", "0.4793596", "0.47868395", "0.47746006", "0.47729874", "0.47709212", "0.47697133", "0.47692624", "0.476177", "0.47542828", "0.47468692", "0.47431302", "0.4738172", "0.47346178", "0.47306368", "0.47275683", "0.4725049", "0.4723758", "0.47228214", "0.47225004", "0.47223538", "0.47212744", "0.47204167", "0.47186095", "0.47138947", "0.47107157", "0.4703311", "0.47029075", "0.47003245", "0.4697758", "0.46972308", "0.46960822", "0.46933863", "0.46867877", "0.46840635", "0.46761245", "0.46754065", "0.46697208", "0.46648553", "0.46599647", "0.46592426", "0.4658248", "0.4657145", "0.4656686", "0.46562433", "0.46559936", "0.46482128", "0.46458942", "0.46448267" ]
0.5847548
0
Print the After and Before image given the journal key
public void print(String workStation, int jrnDay, int jrnTime, int jrnSequence, String library) throws EQException { // Screen set to print screenSetPrint = fhd.getScreenSetHandler().rtvScreenSetMain(); // Get the linkage id (if this is a linkage service) String linkageServiceId = FunctionRuntimeToolbox.getLinkageServiceId(screenSetPrint); // Setup the journal key (after image) JournalRecord journalRecordAft = FunctionRuntimeToolbox.initialiseJournalRecord(screenSetPrint.getFunction(), workStation, jrnDay, jrnTime, jrnSequence, JournalRecord.IMAGE_AFT, "", library, linkageServiceId); // Setup the journal key (before image) JournalRecord journalRecordBef = FunctionRuntimeToolbox.initialiseJournalRecord(screenSetPrint.getFunction(), workStation, jrnDay, jrnTime, jrnSequence, JournalRecord.IMAGE_BEF, "", library, linkageServiceId); // Retrieve the journal record boolean afterImage; boolean beforeImage; afterImage = journalRecordAft.rtvRecord(fhd.getEquationUser().getSession()); beforeImage = journalRecordBef.rtvRecord(fhd.getEquationUser().getSession()); // After and before image if (afterImage && beforeImage) { print(journalRecordAft, journalRecordBef); } // After image only else if (afterImage) { print(journalRecordAft); } // Before image only else if (beforeImage) { setBeforeImage(true); print(journalRecordBef); } // No journal record found else { EQMessage eqMessage = fhd.getEquationUser().getSession().getMessage("KSM2056"); lines.add(eqMessage.getFormattedMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print(JournalRecord journalRecordAft, JournalRecord journalRecordBef) throws EQException\n\t{\n\t\t// Screen set to print\n\t\tscreenSetPrint = fhd.getScreenSetHandler().rtvScreenSetMain();\n\n\t\t// Setup the after image\n\t\tfunctionDataAft = new FunctionData(screenSetPrint.getFunction(), fhd);\n\t\tfunctionDataAft.loadFieldDataFromJournalRecord(journalRecordAft);\n\n\t\t// Setup the before image\n\t\tfunctionDataBef = null;\n\t\tif (journalRecordBef != null)\n\t\t{\n\t\t\tfunctionDataBef = new FunctionData(screenSetPrint.getFunction(), fhd);\n\t\t\tfunctionDataBef.loadFieldDataFromJournalRecord(journalRecordBef);\n\t\t}\n\n\t\t// print it\n\t\tprint(screenSetPrint, functionDataAft, functionDataBef);\n\t}", "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 }", "public void displayImageToConsole();", "public void printImage() {\n\t System.out.print(\"\\n\");\n for (int i=0; i<width*height; i++) {\n if (i % width==0) System.out.print(\"\\n\");\n System.out.print(image[i]+ \" \");\n }\n System.out.print(\"\\n\\n\");\n }", "private void printImage(PrintDocument printDocument) throws PrinterException, IOException {\n logger.debug(\"printImage::\" + printDocument);\n\n String filename = DocumentService.getFileFromUrl(printDocument.getUrl()).getPath();\n\n long timeStart = System.currentTimeMillis();\n\n DocPrintJob docPrintJob = getDocPrintJob(printDocument.getType());\n\n PrinterJob job = PrinterJob.getPrinterJob();\n job.setPrintService(docPrintJob.getPrintService());\n PageFormat pageFormat = getPageFormat(job);\n\n Image image = ImageIO.read(new File(filename));\n\n Book book = new Book();\n AnnotatedPrintable printable = new AnnotatedPrintable(new ImagePrintable(image));\n\n for (AnnotatedPrintable.AnnotatedPrintableAnnotation printDocumentExtra : printDocument.getExtras()) {\n printable.addAnnotation(printDocumentExtra);\n }\n\n book.append(printable, pageFormat);\n\n job.setPageable(book);\n job.setJobName(\"WebApp Hardware Bridge Image\");\n job.setCopies(printDocument.getQty());\n job.print();\n\n long timeFinish = System.currentTimeMillis();\n logger.info(\"Document \" + filename + \" printed in \" + (timeFinish - timeStart) + \"ms\");\n }", "public static void main(String args[]) throws IOException {\n\t File file = new File(\"fdpModification.pdf\");\n\t PDDocument document = PDDocument.load(file);\n\n\t //Retrieving the pages of the document\n\t PDPage page = document.getPage(1);\n\t PDPageContentStream contentStream = new PDPageContentStream(document, page);\n\n\t //Begin the Content stream\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 105);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12);\n\t contentStream.drawString(\"bold text\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.setFont(PDType1Font.HELVETICA_OBLIQUE, 12);\n\t contentStream.drawString(\"Italic text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD_OBLIQUE, 12);\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.endText();\n\n\t contentStream.setLineWidth(.5f);\n\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 55);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"artificially bold text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.appendRawCommands(\"1 Tr\\n\");\n\t contentStream.drawString(\"Artificially outlined text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.setTextMatrix(1, 0, .2f, 1, 7, 5);\n\t contentStream.drawString(\"Artificially italic text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t //Setting the font to the Content streamt\n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line\n\t contentStream.newLineAtOffset(0, 0);\n\n //Setting the leading\n contentStream.setLeading(14.5f);\n\n //Setting the position for the line\n contentStream.newLineAtOffset(25, 725);\n\n String text1 = \"This is an example of adding text to a page in the pdf document. we can add as many lines\";\n String text2 = \"as we want like this using the ShowText() method of the ContentStream class\";\n\n //Adding text in the form of string\n contentStream. showText(text1);\n contentStream.newLine();\n contentStream. showText(text2);\n //Ending the content stream\n contentStream.endText();\n\n System.out.println(\"Content added\");\n\n //Closing the content stream\n contentStream.close();\n\n //Saving the document\n document.save(new File(\"newtou.pdf\"));\n\n //Closing the document\n document.close();\n }", "protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }", "private synchronized void print4() {\n try {\n int jNum = 0;\n\n byte[] printText22 = new byte[10240];\n\n byte[] oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setInternationalCharcters('3');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"FoodCiti\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"\\nOrder No : \" + order.getOrderNo());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String location = SessionManager.get(getActivity()).getRestaurantLocation();\n int spacecount = commacount(location);\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (spacecount >= 1) {\n oldText = getGbk(location.substring(0, location.indexOf(',')) + \"\\n\" + location.substring(location.indexOf(',') + 1) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(location + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantPostalCode() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Tel:\" + SessionManager.get(getActivity()).getRestaurantPhonenumber());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderSpecialInstruction() != null) {\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(order.getOrderSpecialInstruction());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\" \" + \"GBP\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // Toast.makeText(getContext(),\"Size \"+order.getOrderedItemList().size(),Toast.LENGTH_LONG).show();\n\n for (int i = 0; i < order.getOrderedItemList().size(); i++) {\n\n OrderedItem orderedItem = order.getOrderedItemList().get(i);\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// int qntity = Integer.parseInt(orderedItem.getQuantity());\n oldText = getGbk(\" \" + orderedItem.getQuantity() + \" x \" + orderedItem.getItemData().getItemName());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Double total_price = Double.valueOf(orderedItem.getTotalPrice()) * Double.valueOf(orderedItem.getQuantity());\n\n oldText = getGbk(\" \" + String.format(Locale.getDefault(), \"%.2f\", total_price) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n for (int j = 0; j < orderedItem.getSubItemList().size(); j++) {\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(35);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n SubItem subItem = orderedItem.getSubItemList().get(j);\n\n String subitemname = subItem.getItemName();\n int subItemOrderQty = Integer.parseInt(subItem.getOrderedQuantity());\n\n if (subItemOrderQty > 1) {\n oldText = getGbk(\" \" + subItem.getOrderedQuantity() + \" x \" + subitemname + \"\\n\");\n } else {\n oldText = getGbk(\" \" + subitemname + \"\\n\");\n }\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n // By Ravi\n// oldText = getGbk(\"........................\\n\");\n// System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n// jNum += oldText.length;\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n /** TODO\n * change here for print suboptions text\n * **/\n //print text for suboptions items\n if (subItem.getSubOptions() != null && subItem.getSubOptions().size() > 0) {\n List<SubOptions> subOptions = subItem.getSubOptions();\n for (int k = 0; k < subOptions.size(); k++) {\n SubOptions options = subOptions.get(k);\n oldText = getGbk(\" - \" + options.getName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;*/\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Subtotal : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderSubtotal())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (Double.valueOf(order.getDiscount()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Discount : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDiscount())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n if (Double.valueOf(order.getTax()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Service Charge : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (order.getTax() != null) {\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getTax())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\" \" + \"0.00\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n if (!order.getOrderDelivery().equals(Consts.PICK_UP) && Double.valueOf(order.getDeliveryCharges()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Delivery Charges : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDeliveryCharges())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"TOTAL Price: \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(370);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n //Toast.makeText(getActivity(),String.valueOf(order.getOrderTotal()),Toast.LENGTH_LONG).show();\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderTotal())));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getFreenDrinkText() != null && !TextUtils.isEmpty(order.getFreenDrinkText())) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String freeTxt = \"Free \" + order.getFreenDrinkText();\n oldText = getGbk(freeTxt);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n /** TODO\n * change here to print payment method text\n * **/\n //print text for payment method\n if (order.getOrderPaid().equalsIgnoreCase(\"paypal\") || order.getOrderPaid().equalsIgnoreCase(\"worldpay\")) {\n oldText = getGbk(order.getOrderPaid() + \" PAID \" + \"\\n\");\n } else {\n oldText = getGbk(order.getOrderPaid() + \" NOT PAID \" + \"\\n\");\n }\n// oldText = getGbk(\"ORDER BY \" + order.getOrderPaid() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderDelivery().equals(Consts.PICK_UP)) {\n oldText = getGbk(\"COLLECTION\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\"DELIVERY\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n }\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // String strTmp2 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\", Locale.UK).format(new Date());\n oldText = getGbk(getDate(order.getOrderTime()));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Customer Details: \" + \"\\n\" +\n order.getUser().getUserName().toUpperCase() + \"\\n\" +\n order.getUser().getAddress().toUpperCase() + \"\\n\" +\n order.getUser().getCity().toUpperCase() + \"\\n\" +\n order.getUser().getPostalCode().toUpperCase() + \"\\n\" +\n order.getUser().getPhNo().toUpperCase()\n );\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Ref:\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(order.getOrderId());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"www.foodciti.co.uk\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*String s = new String(printText22);\n Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();*/\n\n oldText = CutPaper();\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Intent intent = new Intent(PrintUtils.ACTION_PRINT_REQUEST);\n intent.putExtra(PrintUtils.PRINT_DATA, printText22);\n localBroadcastManager.sendBroadcast(intent);\n\n// mOutputStream.write(printText22);\n\n } catch (Exception ex) {\n Exlogger exlogger = new Exlogger();\n exlogger.setErrorType(\"Print Error\");\n exlogger.setErrorMessage(ex.getMessage());\n exlogger.setScreenName(\"OrderInfo->>print4() function\");\n logger.addException(exlogger);\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_LONG).show();\n\n\n }\n }", "public void savingsReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void print(JournalRecord journalRecord) throws EQException\n\t{\n\t\tprint(journalRecord, null);\n\t}", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }", "private String addDisplay() {\n\t\t// One Parameter: DisplayName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|image:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}", "public static void printAlpha(FqImage imh) {\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"a\"+imh.points[i][j].getAlpha()+\"a\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public void printScreen() {\n Graphics g;\n try {\n g = this.getGraphics();\n g.setColor(Color.red);\n if (dbImage != null) {\n g.drawImage(dbImage, 0, 0, null);\n String text = \"Score:\" + gameData.score.score;//text of displated score\n g.drawString(text, 50, 50);\n } else {\n System.out.println(\"printScreen:graphic is null\");\n }\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n } catch (Exception e) {\n System.out.println(\"Graphics error: \" + e);\n }\n }", "private String E19Cover() {\n StringBuilder buffer = new StringBuilder();\n\n TextReportData data = TextReportDataManager.getInstance()\n .getDataForReports(lid, 0);\n buffer.append(TextReportConstants.E19_HDR_COVER);\n buffer.append(\"\\n\\n\");\n buffer.append(\"\t\t\t U.S. DEPARTMENT OF COMMERCE\\n\");\n buffer.append(\n \" NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION\\n\");\n buffer.append(\n \" NATIONAL WEATHER SERVICE\\n\\n\");\n buffer.append(\n \" REPORT ON RIVER GAGE STATION\\n\\n\");\n\n String revisedDate = \" \";\n if (data.getRiverstat().getRrevise() != null) {\n revisedDate = sdf.format(data.getRiverstat().getRrevise());\n }\n\n Date now = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\")).getTime();\n String printedDate = sdf.format(now);\n\n buffer.append(String.format(\"%40s %10s, %10s\\n\\n\\n\",\n \"REVISED, PRINTED DATES:\", revisedDate, printedDate));\n\n buffer.append(String.format(\"LOCATION: %s\\n STREAM: %s\\n\",\n locData.getLocation().getName(),\n data.getRiverstat().getStream()));\n buffer.append(String.format(\" BASIN: %-30s HSA: %s\\n\",\n locData.getLocation().getRb(), locData.getLocation().getHsa()));\n buffer.append(\"\\n\");\n\n buffer.append(\"REFERENCES:\\n\");\n TextReportData dataRefer = TextReportDataManager.getInstance()\n .getReferenceData(lid);\n int count = 0;\n if (dataRefer.getRefer() != null) {\n count = dataRefer.getRefer().size();\n }\n\n if (count > 0) {\n for (String s : dataRefer.getRefer()) {\n buffer.append(String.format(\" %s\\n\", s));\n }\n }\n\n // try to place ABBREVIATIONS at the bottom\n for (int i = 0; i < 16 - count; i++) {\n buffer.append(\"\\n\");\n }\n\n buffer.append(\"\\nABBREVIATIONS:\\n\\n\");\n buffer.append(\n \" BM - bench mark\t\tEPA - Environmental Protection Agency\\n\");\n buffer.append(\n \" DS - downstream\t\tIBWC - International Boundary and Water Comm.\\n\");\n buffer.append(\n \" US - upstream\t\tMSRC - Mississippi River Commission\\n\");\n buffer.append(\n \" HW - high water\t\tMORC - Missouri River Commission\\n\");\n buffer.append(\n \" LW - low water\t\tNOAA - National Oceanic and Atmospheric Admin.\\n\");\n buffer.append(\n \" RB - right bank\t\tNOS - National Ocean Survey\\n\");\n buffer.append(\n \" LB - left bank\t\tNWS - National Weather Service\\n\");\n buffer.append(\n \" MGL - mean gulf level\t\tTVA - Tennessee Valley Authority\\n\");\n buffer.append(\n \" MLW - mean low water\t\tUSACE - U.S. Army Corps of Engineers\\n\");\n buffer.append(\n \" MSL - mean sea level\t\tUSBR - U.S. Bureau of Reclamation\\n\");\n buffer.append(\n \" MLT - mean low tide\t\tUSGS - U.S. Geological Survey\\n\");\n buffer.append(\" MT - mean tide\t\tUSWB - U.S. Weather Bureau\\n\");\n buffer.append(\n \" WQ - water quality\t\tNGVD - National Geodetic Vertical Datum\\n\");\n buffer.append(\n \" RM - reference mark\t\tNAD - North American Datum\\n\");\n buffer.append(\" RP - reference point\\n\");\n buffer.append(\"\\n\\n\\n\");\n\n buffer.append(String.format(\n \"\t\t\t\t\t LOCATION IDENTIFICATION: %s\\n\", lid));\n buffer.append(\n String.format(\"\t\t\t\t\t\t NWS INDEX NUMBER: %s\\n\",\n locData.getLocation().getSn()));\n buffer.append(\n String.format(\"\t\t\t\t\t\t USGS NUMBER: %s\\n\",\n data.getRiverstat().getGsno()));\n\n return buffer.toString();\n }", "public void savingsWithdrawReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "private static byte[] mergeImageAndText(BufferedImage im, String name, String event, Point pointName, Point pointEvent) throws IOException {\n\t\tGraphics2D g2 = im.createGraphics(); //graohics obj banaya to draw\n\t\tSystem.out.println(name);\n\t\tg2.setFont(new Font(\"TimesRoman\", Font.BOLD,28));\n\t\tg2.setColor(Color.BLACK);\n\t\tg2.drawString(name, pointName.x, pointName.y);//write text\n\t\tg2.drawString(event, pointEvent.x, pointEvent.y);//write text\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tImageIO.write(im, \"jpg\", baos);\n\t\treturn baos.toByteArray();\n\t}", "public void showBeforeAfterLocation() {\n\t\tfor (Integer key : afterLoc.keySet()) {\n\t\t\tdouble[] ary = afterLoc.get(key);\n\n\t\t\tString locationA = \"\";\n\t\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t\tlocationA += Config.roundTwoDecimals(ary[i]) + \"\\t\";\n\t\t\t}\n\n\t\t\tdouble[] ary2 = beforeLoc.get(key);\n\n\t\t\tString locationB = \"\";\n\t\t\tfor (int i = 0; i < ary2.length; i++) {\n\t\t\t\tlocationB += Config.roundTwoDecimals(ary2[i]) + \"\\t\";\n\t\t\t}\n\t\t\tCaller.log(\" AFTER: \" + key + \" | \" + locationA + \"\\t|\" + attractors.get(key).count);\n\t\t}\n\t}", "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "void storeLogMessage(String log)\n {\n logImage += log + \"\\n\";\n System.out.println(logImage);\n printFile(\"Log.txt\");\n }", "public void printInfo() {\n String s = \"\";\n if (map.isEmpty()) {\n s += \"not keeping any entries\\n\";\n } else {\n s += \"This Node stores a range of \" + map.size() + \" keys :\\n from:\" + map.firstKey() + \" up to: \" + map.lastKey() + \"\\n\";\n }\n s += \"node key:\\t\" + nodeKey + \"\\n\";\n s += \"previous key:\\t\" + predKey + \"\\n\";\n\n window.getKeysInfoText().setText(s);\n }", "public void printResults(Map<String, String> endnoteExport){\n\tfor(Map.Entry<String,String> item : endnoteExport.entrySet()){\n\t\t\tSystem.out.println(item.getKey() + \" - \" + item.getValue());\n\t} \n }", "String wkhtmltoimage_phase_description(PointerByReference converter, int phase);", "public void pintaFecha(){\n \tImage image;\r\n \ttry {\r\n\t \r\n \t\tString imageUrl = PropiedadesJLet.getInstance().getProperty(\"path.img.logoinvoice\") + \"FondoLeppardPico1.png\";\r\n\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 725);\r\n\t\t image.scaleAbsolute(50,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n \r\n\t\t\tFRAparen.absTextBoldColor(writer,\"Fecha \",inmargde,730,10,new BaseColor(255,255,255));\r\n\t\t\tFRAparen.absText(writer,FRAparen.fechaNormal(fhfactur),inmargde + 45,730,10);\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 700);\r\n\t\t image.scaleAbsolute(100,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n\t\t\t\r\n\t\t\tif (cabecNFC.equals(\"COND\") || cabecNFC.equals(\"R\")){\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t} else {\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,\"NFC \"+ cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t}\r\n\t\t\t\r\n \t} catch (Exception e) {\r\n \t\tSystem.err.println(this.getClass().getName() +\" ERROR pintaFecha() - \"+ e.getMessage());\r\n \t}\r\n \t\r\n }", "private void preOrderPrint() {\n System.out.print(\" \" + key);\n if (left != null) left.preOrderPrint();\n if (right != null) right.preOrderPrint();\n }", "public void display() {\n\t\tapplet.image(applet.loadImage(\"/keypad.png\"), 22,410);\n\t\t// TODO Auto-generated method stub\n\n\t}", "public void savingsReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void printASCIIArt(String string) {\n\t\tint width = 500;\n int height = 30;\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n java.awt.Graphics g = image.getGraphics();\n g.setFont(new Font(\"SansSerif\", Font.CENTER_BASELINE, 16));\n\n Graphics2D graphics = (Graphics2D) g;\n graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n graphics.drawString(string, 10, 20);\n\n //save this image\n //ImageIO.write(image, \"png\", new File(\"/users/mkyong/ascii-art.png\"));\n\n for (int y = 0; y < height; y++) {\n StringBuilder sb = new StringBuilder();\n for (int x = 0; x < width; x++) {\n\n sb.append(image.getRGB(x, y) == -16777216 ? \" \" : \"$\");\n\n }\n\n if (sb.toString().trim().isEmpty()) {\n continue;\n }\n\n System.out.println(sb);\n }\n\t}", "public void printInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nBill Summary :\");\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\t\t\tSystem.out.println(invoiceInfo[i].toString());\r\n\t\t}\r\n\t}", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "@Override\r\n public void actionPerformed(ActionEvent slip) {\n if(slip.getSource()==b7)\r\n {\r\n String id=t1.getText();\r\n String bank_name=t3.getText();\r\n String bank_branch=t4.getText();\r\n String acc_no=t5.getText();\r\n String work_day=t6.getText();\r\n String basic=t7.getText();\r\n String home=t8.getText();\r\n String tra=t9.getText();\r\n String pro_tax=t10.getText();\r\n String gross=t11.getText();\r\n String dedu=t12.getText();\r\n String netsal=t13.getText();\r\n String path=\"E:\\\\\";\r\n com.itextpdf.text.Document doc=new com.itextpdf.text.Document();\r\n try\r\n {\r\n PdfWriter.getInstance(doc, new FileOutputStream(path+\"\"+t1.getText()+\"payslip\"+\".pdf\"));\r\n doc.open();\r\n Image img = Image.getInstance(\"D:\\\\prologos\\\\images3.png\");\r\n doc.add(img);\r\n// \r\n Paragraph paragraph1=new Paragraph(\" Pay Slip\",FontFactory.getFont(FontFactory.TIMES_ROMAN,18)); \r\n// \r\n doc.add(paragraph1);\r\n Paragraph paragraph2=new Paragraph(\"\\n ` Date & Time:\\t\"+l18.getText()+\" \"+l19.getText()+\"\\n\",FontFactory.getFont(FontFactory.TIMES_ROMAN,12)); \r\n// \r\n doc.add(paragraph2);\r\n \r\n Paragraph paragraph=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n// \r\n doc.add(paragraph);\r\n Paragraph paragraph3=new Paragraph(\"Employee Id:\\t\"+t1.getText()+\"\\nEmployee Bank Details:\\nBank Name:\\t\"+t3.getText()+\"\\nBank Branch:\\t\"+t4.getText()+\"\\nAccount Number:\\t\"+t5.getText()+\"\\n\\n\");\r\n doc.add(paragraph3);\r\n //PdfPTable ptable=new PdfPTable(2);\r\n// ptable.addCell(\"Description\");\r\n// ptable.addCell(\"Working Days:\");\r\n// ptable.addCell(\"Deductions\");\r\n// doc.add(ptable);\r\n// PdfPCell c1=new PdfPCell(new Phrase(\"Description\"));\r\n// ptable.addCell(c1); \r\n// c1=new PdfPCell(new Phrase(\"Amount\"));\r\n \r\n// Paragraph para=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n//// \r\n// doc.add(para);\r\n Paragraph paragraph4=new Paragraph(\"Salary Details:\\n\\n\",FontFactory.getFont(FontFactory.TIMES_BOLD,15));\r\n doc.add(paragraph4);\r\n// Paragraph paragraph5=new Paragraph(\"Working Days: \"+t6.getText()+\"\\n\\n\");\r\n// doc.add(paragraph5);\r\n// Paragraph paragraph6=new Paragraph(\"Basic Salary: \"+t7.getText()+\"\\n\\n\");\r\n// doc.add(paragraph6);\r\n// Paragraph paragraph7=new Paragraph(\"House Rent Allowance: \"+t8.getText()+\"\\n\\n\");\r\n// doc.add(paragraph7);\r\n// Paragraph paragraph8=new Paragraph(\"Traveling Allowance: \"+t9.getText()+\"\\n\\n\");\r\n// doc.add(paragraph8);\r\n// Paragraph paragraph9=new Paragraph(\"Professional Tax: \"+t10.getText()+\"\\n\\n\");\r\n// doc.add(paragraph9);\r\n// Paragraph paragraph10=new Paragraph(\"Gross Salary: \"+t11.getText()+\"\\n\\n\");\r\n// doc.add(paragraph10);\r\n// Paragraph paragraph11=new Paragraph(\"Deduction: \"+t12.getText()+\"\\n\\n\");\r\n// doc.add(paragraph11);\r\n// Paragraph paragraph12=new Paragraph(\"Net Salary: \"+t13.getText()+\"\\n\\n\\n\");\r\n// doc.add(paragraph12);\r\n \r\n \r\n \r\n \r\n \r\n PdfPTable ptable=new PdfPTable(2);\r\n PdfPCell pcell=new PdfPCell(new Paragraph(\"Description\"));\r\n PdfPCell pcell1=new PdfPCell(new Paragraph(\"Amount\"));\r\n pcell.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell.setFixedHeight(30f);pcell1.setFixedHeight(30f);\r\n ptable.addCell(pcell);\r\n ptable.addCell(pcell1);\r\n \r\n PdfPCell p1=new PdfPCell(new Paragraph(\"Working Days:\"));\r\n PdfPCell p2=new PdfPCell(new Paragraph(\"Basic Salary:\"));\r\n PdfPCell p3=new PdfPCell(new Paragraph(\"House Rent Allowance:\"));\r\n PdfPCell p4=new PdfPCell(new Paragraph(\"Traveling Allowance:\"));\r\n PdfPCell p5=new PdfPCell(new Paragraph(\"Professional Tax:\"));\r\n PdfPCell p6=new PdfPCell(new Paragraph(\"Gross Salary:\"));\r\n PdfPCell p7=new PdfPCell(new Paragraph(\"Deduction:\"));\r\n PdfPCell p8=new PdfPCell(new Paragraph(\"Net Salary:\"));\r\n \r\n \r\n PdfPCell p11=new PdfPCell(new Paragraph(t6.getText()));\r\n PdfPCell p12=new PdfPCell(new Paragraph(t7.getText()));\r\n PdfPCell p13=new PdfPCell(new Paragraph(t8.getText()));\r\n PdfPCell p14=new PdfPCell(new Paragraph(t9.getText()));\r\n PdfPCell p15=new PdfPCell(new Paragraph(t10.getText()));\r\n PdfPCell p16=new PdfPCell(new Paragraph(t11.getText()));\r\n PdfPCell p17=new PdfPCell(new Paragraph(t12.getText()));\r\n PdfPCell p18=new PdfPCell(new Paragraph(t13.getText()));\r\n \r\n \r\n \r\n p1.setFixedHeight(30f);p11.setFixedHeight(30f);\r\n p2.setFixedHeight(30f);p12.setFixedHeight(30f);\r\n p3.setFixedHeight(30f);p13.setFixedHeight(30f);\r\n p4.setFixedHeight(30f);p14.setFixedHeight(30f);\r\n p5.setFixedHeight(30f);p15.setFixedHeight(30f);\r\n p6.setFixedHeight(30f);p16.setFixedHeight(30f);\r\n p7.setFixedHeight(30f);p17.setFixedHeight(30f);\r\n p8.setFixedHeight(30f);p18.setFixedHeight(30f);\r\n \r\n \r\n p11.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p12.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p13.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p14.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p15.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p16.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p17.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p18.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n \r\n \r\n \r\n \r\n \r\n// ptable.addCell(p1);ptable.addCell(p2);\r\n// pcell.addElement(p1);\r\n// pcell.addElement(p2);\r\n// pcell1.addElement(p3);\r\n// pcell1.addElement(p4);\r\n// pcell.setRowspan(8);\r\n// pcell1.setRowspan(8);\r\n ptable.addCell(p1);ptable.addCell(p11);\r\n \r\n ptable.addCell(p2);ptable.addCell(p12);\r\n ptable.addCell(p3);ptable.addCell(p13);\r\n ptable.addCell(p4);ptable.addCell(p14);\r\n ptable.addCell(p5);ptable.addCell(p15);\r\n ptable.addCell(p6);ptable.addCell(p16);\r\n ptable.addCell(p7);ptable.addCell(p17);\r\n ptable.addCell(p8);ptable.addCell(p18);\r\n \r\n doc.add(ptable);\r\n Paragraph paragraph13=new Paragraph(\"\\n\\n\"+\"Computer Generated Salary Slip.\\nSignature not Required.\",FontFactory.getFont(FontFactory.TIMES_ITALIC,12));\r\n doc.add(paragraph13);\r\n// Font.BOLD\r\n Paragraph para1=new Paragraph(\"\\n\"+\" -------------------------------------------\"); \r\n// \r\n doc.add(para1);\r\n \r\n JOptionPane.showMessageDialog(null, \"Pay Slip Generated\",\"Salary\",JOptionPane.INFORMATION_MESSAGE);\r\n b10.setVisible(true);\r\n }\r\n catch(Exception ee)\r\n {\r\n ee.printStackTrace();\r\n }\r\n doc.close();\r\n }\r\n\r\n }", "String getMyNoteTextByKey(Key verse);", "abstract public String getImageKey();", "private void displayReceiptPhoto() {\n\t\tif (mForm == null)\n\t\t\treturn;\n\t\tif (mReceipt == null)\n\t\t\treturn;\n\t\timageWidget().displayPhoto(getRBuddyActivity().photoStore(),\n\t\t\t\tmReceipt.getId(),\n\t\t\t\tmReceipt.getPhotoId());\n\t}", "void energyImageDisplay(BufferedImage imgToEnergize, String label,\n boolean doWePrintSeam, ImageView myImage, Label seamPrintingLabel,\n Label energyPrintingLabel) {\n seamPrintingLabel.setTextFill(javafx.scene.paint.Color.BLACK);\n if (this.tempImg.equals(\"Energy computation\")\n || this.tempImg.equals(\"Show next seam\")) {\n seamPrintingLabel\n .setTextFill(javafx.scene.paint.Color.PALEVIOLETRED);\n myImage.setImage(SwingFXUtils.toFXImage(imgToEnergize, null));\n this.tempImg = \"null\";\n } else {\n if (imgToEnergize != null)\n energyPrintingLabel.setTextFill(javafx.scene.paint.Color.GREEN);\n assert imgToEnergize != null;\n BufferedImage bImageEnergized = SeamCarver\n .energizedImage(imgToEnergize);\n if (doWePrintSeam) {\n int totalRedRgb = 255 << 16;\n int[] seamToPrint = SeamCarver.bestSeam(bImageEnergized,\n this.getDirection());\n if (this.getDirection().equals(\"H\")) {\n for (int y = 0; y < seamToPrint.length; y++)\n bImageEnergized.setRGB(seamToPrint[y], y, totalRedRgb);\n } else {\n for (int x = 0; x < seamToPrint.length; x++)\n bImageEnergized.setRGB(x, seamToPrint[x], totalRedRgb);\n }\n }\n myImage.setImage(SwingFXUtils.toFXImage(bImageEnergized, null));\n this.tempImg = label;\n }\n }", "public void savingsWithdrawReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "private static void print(int[][] image) {\n for(int i = 0; i < image.length; i++) {\n for(int j = 0; j < image[0].length; j++) {\n System.out.print(image[i][j] + \" \");\n }\n System.out.println(\"\\n\");\n }\n }", "private void printNotes(AbstractInscription... inscs) {\n\t\tfor (AbstractInscription insc : inscs) {\n\t\t\tSystem.out.println(String.format(\n\t\t\t\t\t\"Inscription '%s' : note min = %s, note max = %s, note objectif = %s, note réelle = %s, acquis réel = %s\\r\\n\",\n\t\t\t\t\tinsc, insc.getCalculateur().getNoteMin(), insc.getCalculateur().getNoteMax(),\n\t\t\t\t\tinsc.getCalculateur().getNoteObjectif(), insc.getCalculateur().getNoteReelle(),\n\t\t\t\t\tinsc.getCalculateur().getAcquisReel()));\n\t\t}\n\t}", "public void print() \n\t{\n\t\tSystem.out.println(\"existing files:\\n\");\n\t\tIterator<Entry<String, byte[]>> existing = this.existingFile.entrySet().iterator();\n\t\twhile (existing.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = existing.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\\nprefix files:\\n\");\n\t\tIterator<Entry<String, byte[]>> prefix = this.prefix.entrySet().iterator();\n\t\twhile (prefix.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = prefix.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t}", "public void logScreen(String imageName) {\n this.logScreen(imageName, imageName, thumbHeight, thumbWidth);\n }", "public void printReceipt() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION,\"Would you like a receipt?\",ButtonType.YES,ButtonType.NO);\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.YES) {\n try {\n String element = \"\";\n int height = 200;\n int length = 0;\n for (int i = 0; i < getItemList().size(); i++) {\n element += getItemList().get(i).toString() + \" \"+System.getProperty(\"line.separator\");\n height += 20;\n }\n String text = \"Receipt \" + System.getProperty(\"line.separator\")\n + System.getProperty(\"line.separator\") + \"Items: \" + System.getProperty(\"line.separator\")\n + element + System.getProperty(\"line.separator\") + \"Total: \" + getTotalCost();\n char[] array = text.toCharArray();\n System.out.println(array);\n length += array.length;\n BufferedImage bi = imageGenerator.createImageWithText(array, length, height);\n File outputfile = new File(\"receipt.png\");\n ImageIO.write(bi, \"png\", outputfile);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else{\n alert.close();\n }\n }", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"sherman.xu@lockers.com\");\n }", "private void writePresentFilesKey() {\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"present:\");\n }", "public static void printLogo() {\n System.out.println(LOGO1);\n System.out.println(LOGO2);\n System.out.println(LOGO3);\n System.out.println(LOGO4);\n System.out.println(LOGO5);\n System.out.println(\"\");\n }", "public void printFile(String fileName)\n {\n try\n {\n //takes the output string and writes it in a new file\n //called output.txt\n FileOutputStream out = new FileOutputStream(\n new File(fileName), true);\n out.write(logImage.getBytes());\n out.flush();\n out.close(); \n }\n //catches all exceptions from writing into the .txt\n catch(Exception e)\n {\n System.out.println(\"There was an error while writing into file\");\n }\n }", "protected abstract String childSavingTextLine();", "static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}", "private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}", "public void renderImage()\n {\n for (int i = 0; i < _imageWriter.getNx(); i++)\n {\n for (int j = 0; j < _imageWriter.getNy(); j++)\n {\n Ray ray;\n ray = new Ray(_scene.getCamera().constructRayThroughPixel(_imageWriter.getNx(), _imageWriter.getNy(),j,i,\n _scene.getScreenDistance(), _imageWriter.getWidth(),_imageWriter.getHeight()));\n\n if(i==255 && j==255)\n System.out.print(\"111\");\n Map<Geometry, List<Point3D>> intersectionPoints = new HashMap<>(getSceneRayIntersections(ray));\n\n if(intersectionPoints.isEmpty())\n _imageWriter.writePixel(j, i, _scene.getBackground());\n else\n {\n Map<Geometry, Point3D> closestPoint = getClosestPoint(intersectionPoints);\n Map.Entry<Geometry,Point3D> entry;\n Iterator<Entry<Geometry, Point3D>> it = closestPoint.entrySet().iterator();\n entry = it.next();\n _imageWriter.writePixel(j, i, calcColor(entry.getKey(), entry.getValue(), ray));\n }\n\n }\n }\n //printGrid(1);\n\n }", "@Override\n public byte[] getBytes(EscPosImage image) {\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n //\n bytes.write(ESC);\n bytes.write('a');\n bytes.write(justification.value);\n //\n int paramSize = image.getRasterSizeInBytes() + 10;\n int pL = paramSize & 0xFF;\n int pH = (paramSize & 0xFF00) >> 8 ;\n\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(pL); // pl\n bytes.write(pH); // ph\n bytes.write(48); // m\n bytes.write(112); //fn\n bytes.write(48); // a\n bytes.write(graphicsImageBxBy.bx); // bx\n bytes.write(graphicsImageBxBy.by); // by\n bytes.write(49); // c\n\n // bits in horizontal direction for the bit image\n int horizontalBits = image.getWidthOfImageInBits();\n int xL = horizontalBits & 0xFF;\n int xH = (horizontalBits & 0xFF00) >> 8 ;\n // \n // bits in vertical direction for the bit image\n int verticalBits = image.getHeightOfImageInBits();\n // getting first and second bytes separatted\n int yL = verticalBits & 0xFF;\n int yH = (verticalBits & 0xFF00) >> 8 ;\n \n bytes.write(xL);\n bytes.write(xH);\n bytes.write(yL);\n bytes.write(yH);\n // write bytes\n byte [] rasterBytes = image.getRasterBytes().toByteArray();\n bytes.write(rasterBytes,0,rasterBytes.length);\n \n // function 050\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(2); // pl\n bytes.write(0); // ph\n bytes.write(48); //m\n bytes.write(50); //fn\n \n \n \n\n //\n return bytes.toByteArray();\n \n }", "public void KTesteCompleto() throws RemoteException {\n\n // Alinhamento\n kPrinterPresenter.printStyleBold(false);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Alinhamento\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.print3Line();\n\n // Formas de impressão\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Formas de Impressão\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printStyleBold(true);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n\n\n // Barcode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"BarCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 2);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 1);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 3);\n kPrinterPresenter.print3Line();\n // QrCode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"QrCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printDoubleQRCode(\"www.tectoyautomacao.com.br\",\"tectoy\", 7, 1);\n // Imagem\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Imagem\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(0);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(2);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n // Tabelas\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Tabelas\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = kPrinterPresenter.Alignment_LEFT;\n align[1] = kPrinterPresenter.Alignment_CENTER;\n align[2] = kPrinterPresenter.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n kPrinterPresenter.print3Line();\n kPrinterPresenter.cutpaper(KTectoySunmiPrinter.HALF_CUTTING, 10);\n\n }", "public void updatePrintFigures() {\n\n\t}", "public void loanDisbursementReceitStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Loan Disbursment Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Batch Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan ID: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\np.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine();\np.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\np.newLine();\np.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\np.newLine();\np.setText(\"Disbursemnt Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(12).toString()+p.underLine(0));\np.newLine();\np.setText(\"Disbursement Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(13).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Disbursement Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Loan Disbursed: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(15).toString()+\"/=\"+p.underLine(0));\np.newLine(); \n//p.alignLeft();\n//p.setText(\"Loan Remaining: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(9).toString()+\"/=\"+p.underLine(0));\n//p.newLine(); \n//p.alignLeft();\n//p.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\n//p.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n }", "private void showImageDetail() {\n }", "public void printKeyVal(Date key, Double val){\n\t\tSystem.out.printf(\"\\nDate: %1$tm/%1$td/%1$ty , Closing DJIA: %2$f.2\", key, val.doubleValue());\n\t}", "private void updateImageFile() throws FileNotFoundException {\n \t\tfinal PrintWriter out = new PrintWriter(asciiImageFile);\n \t\tout.print(asciiImage(false));\n \t\tout.close();\n \t}", "private void print(RShape p, String msg) {\n RPoint p1 = p.getTopLeft();\n RPoint p2 = p.getBottomRight();\n System.out.println(msg + \" (\" + p1.x + \", \" + p1.y + \"), (\" + p2.x\n + \", \" + p2.y + \")\");\n }", "public void printInstance(String entity_name, String key) {\r\n\r\n Entity entity = getEntity(entity_name);\r\n int RF = entity.RF;\r\n\r\n //Parcurgere noduri\r\n for (int i_node=0; i_node < numar_noduri && RF > 0; i_node++) {\r\n\r\n int i_instance = 0;\r\n while (i_instance < noduri.get(i_node).dimensiune && RF > 0) {\r\n\r\n Instance instance = noduri.get(i_node).instances.get(i_instance);\r\n \r\n if (instance.entity_name.equals(entity_name)\r\n && String.valueOf(instance.values.get(0)).equals(key)) {\r\n\r\n System.out.print(\"Nod\" + (i_node + 1) + \" \");\r\n if (RF == 1) \r\n instance.printValues(this); \r\n RF--;\r\n }\r\n i_instance++;\r\n }\r\n }\r\n if (RF > 0) {\r\n System.out.println(\"NO INSTANCE FOUND\");\r\n }\r\n\r\n }", "public void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "private void print(RBNode<T> tree, T key, int direction) {\r\n if(tree != null) {\r\n if(0 == direction)\r\n System.out.printf(\"%2d(B) is root\\n\", tree.key);\r\n else\r\n System.out.printf(\"%2d(%s) is %2d's %6s child\\n\",\r\n tree.key, isRed(tree)?\"R\":\"b\", key, direction == 1?\"right\":\"left\");\r\n print(tree.left, tree.key, -1);\r\n print(tree.right, tree.key, 1);\r\n }\r\n }", "public static String printIntro() {\n return\n \" /$$ /$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$ /$$\\n\"\n + \"| $$$ /$$$| $$_____/| $$$ /$$$ /$$__ $$| $$__ $$| $$ /$$/\\n\"\n + \"| $$$$ /$$$$| $$ | $$$$ /$$$$| $$ \\\\ $$| $$ \\\\ $$ \\\\ $$ /$$/ \\n\"\n + \"| $$ $$/$$ $$| $$$$$ | $$ $$/$$ $$| $$ | $$| $$$$$$$/ \\\\ $$$$/ \\n\"\n + \"| $$ $$$| $$| $$__/ | $$ $$$| $$| $$ | $$| $$__ $$ \\\\ $$/ \\n\"\n + \"| $$\\\\ $ | $$| $$ | $$\\\\ $ | $$| $$ | $$| $$ \\\\ $$ | $$ \\n\"\n + \"| $$ \\\\/ | $$| $$$$$$$$| $$ \\\\/ | $$| $$$$$$/| $$ | $$ | $$ \\n\"\n + \"|__/ |__/|________/|__/ |__/ \\\\______/ |__/ |__/ |__/ \\n\"\n + \" \\n\";\n }", "public void journalistCommentary() {\r\n Map<Competitor,Integer> res = this.ranking();\r\n System.out.println(\"\\n<<<<<<< Media >>>>>>>\");\r\n for (Map.Entry<Competitor,Integer> entry : res.entrySet()) \r\n System.out.println(entry.getKey().toString2());\r\n }", "protected abstract String exportHelp(BufferedImage img) throws IllegalArgumentException;", "public static void printLogo() {\n System.out.println( \" ____ ____ \" + System.lineSeparator()\n + \" | __| | _ \\\\ \" + System.lineSeparator()\n + \" | |__ | | | | \" + System.lineSeparator()\n + \" | __| | | | | \" + System.lineSeparator()\n + \" | |__ | |_| | \" + System.lineSeparator()\n + \" |____| |____/ \");\n }", "public void keyPressed()\n{\n // If the image counter is smaller than the no of images availabe.\n if(imageCounter < noOfImages)\n {\n // If left arrow key is pressed and image counter is greater than 1\n if (keyCode == LEFT && imageCounter > 1) \n // decrease counter to show previous image.\n imageCounter--;\n else\n // increase counter to show previous image.\n imageCounter++;\n \n // Load both normal and COSFIRE image\n if (imageCounter<10)\n {\n normal_img = loadImage(originals+\"symbol00\"+imageCounter+\".jpg\");\n }\n else\n {\n normal_img = loadImage(originals+\"symbol0\"+imageCounter+\".jpg\");\n }\n\n \n \n cosfire_img = loadImage(path+\"symbol\"+imageCounter+\"_COSFIRE.jpg\"); \n cosfire_img2 = loadImage(path2+\"symbol\"+imageCounter+\"_COSFIRE.jpg\"); \n }\n else\n {\n // Reset image counter to 1 when it reaches the maximum number of symbols.\n imageCounter=1;\n }\n}", "@Override\n public String toString() {\n return \"code: \" + this.paintCode + \"secCode: \" + this.secCode + \", image: \" + this.image;\n }", "@Override\n \tprotected void produceVisibleOutput(QContent qc,boolean bInit,boolean bPlain)\n \t\tthrows OmException\n \t{\n \t\tif(bPlain)\n \t\t{\n \t\t\t// Put text equivalent\n \t\t\tElement eDiv=qc.createElement(\"div\"); // Can't use span because they aren't allowed to contain things\n \t\t\teDiv.setAttribute(\"style\",\"display:inline\");\n \t\t\taddLangAttributes(eDiv);\n \t\t\tqc.addInlineXHTML(eDiv);\n \t\t\tXML.createText(eDiv,getString(\"alt\"));\n \t\t\tqc.addTextEquivalent(getString(\"alt\"));\n \n \t\t\t// Markers are not supported in plain mode\n \t\t\treturn;\n \t\t}\n \n \t\t// If image has changed, send new version\n \t\tif(bChanged)\n \t\t{\n \t\t\tbyte[] imageData;\n \t\t\tString mimeType;\n \t\t\tif (getString(PROPERTY_TYPE).equals(\"png\")) {\n \t\t\t\timageData = QContent.convertPNG(bi);\n \t\t\t\tmimeType = \"image/png\";\n \t\t\t} else if (getString(PROPERTY_TYPE).equals(\"jpg\")) {\n \t\t\t\timageData = QContent.convertJPG(bi);\n \t\t\t\tmimeType = \"image/jpeg\";\n \t\t\t} else {\n \t\t\t\tthrow new OmUnexpectedException(\"Unknown canvas type. Only png and jpg are valid.\");\n \t\t\t}\n \t\t\tMessageDigest md;\n \t\t\ttry {\n \t\t\t\tmd = MessageDigest.getInstance(\"SHA-1\");\n \t\t\t} catch (NoSuchAlgorithmException e) {\n \t\t\t\tthrow new OmUnexpectedException(e);\n \t\t\t}\n \t\t\tfilename = \"canvas-\" + getID() + \"-\" +\n \t\t\t\t\tStrings.byteArrayToHexString(md.digest(imageData)) + \".\" + getString(PROPERTY_TYPE);\n \t\t\tqc.addResource(filename, mimeType, imageData);\n \t\t}\n \n \t\tElement eEnsureSpaces=qc.createElement(\"div\");\n \t\teEnsureSpaces.setAttribute(\"class\",\"canvas\");\n \t\taddLangAttributes(eEnsureSpaces);\n \t\tqc.addInlineXHTML(eEnsureSpaces);\n \t\tXML.createText(eEnsureSpaces,\" \");\n \n \t\tString sImageID=QDocument.ID_PREFIX+getID()+\"_img\";\n \t\tElement eImg=XML.createChild(eEnsureSpaces,\"img\");\n \t\teImg.setAttribute(\"id\",sImageID);\n \t\teImg.setAttribute(\"onmousedown\",\"return false;\"); // Prevent Firefox drag/drop\n \t\teImg.setAttribute(\"src\",\"%%RESOURCES%%/\"+filename);\n \t\teImg.setAttribute(\"alt\",getString(\"alt\"));\n \n \t\t// Get zoom, marker size and hotspot position.\n \t\tdouble dZoom=getQuestion().getZoom();\n \t\tint iMarkerSize;\n \t\tif (dZoom>=2.0)\n \t\t{\n \t\t\tiMarkerSize=31;\n \t\t}\n \t\telse if (dZoom>=1.5)\n \t\t{\n \t\t\tiMarkerSize=23;\n \t\t}\n \t\telse\n \t\t{\n \t\t\tiMarkerSize=15;\n \t\t}\n \n \t\tint[] hotspotPositions=parseHotspotProperty(getString(PROPERTY_MARKERHOTSPOT),iMarkerSize);\n \n \t\tString sMarkerPrefix=getString(PROPERTY_MARKERIMAGE);\n \t\tif(bInit && !lMarkers.isEmpty())\n \t\t{\n \t\t\tif (sMarkerPrefix==null)\n \t\t\t{\n \t\t\t\tsetString(PROPERTY_MARKERIMAGE, \"canvasm\");\n \t\t\t\tsMarkerPrefix=\"canvasm\"+iMarkerSize;\n \t\t\t\ttry\n \t\t\t\t{\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\".gif\",\"image/gif\",\n \t\t\t\t\t\tIO.loadResource(CanvasComponent.class,sMarkerPrefix+\".gif\"));\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\"d.gif\",\"image/gif\",\n \t\t\t\t\t\tIO.loadResource(CanvasComponent.class,sMarkerPrefix+\"d.gif\"));\n \t\t\t\t}\n \t\t\t\tcatch(IOException e)\n \t\t\t\t{\n \t\t\t\t\tthrow new OmUnexpectedException(e);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tsMarkerPrefix+=iMarkerSize;\n \t\t\t\ttry\n \t\t\t\t{\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\".gif\",\"image/gif\",\n \t\t\t\t\t\t\tgetQuestion().loadResource(sMarkerPrefix+\".gif\"));\n \t\t\t\t\tqc.addResource(sMarkerPrefix+\"d.gif\",\"image/gif\",\n \t\t\t\t\t\t\tgetQuestion().loadResource(sMarkerPrefix+\"d.gif\"));\n \t\t\t\t}\n \t\t\t\tcatch(IOException e)\n \t\t\t\t{\n \t\t\t\t\tthrow new OmDeveloperException(\"Marker image not found: \"+sMarkerPrefix, e);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\telse\n \t\t{\n \t\t\tsMarkerPrefix+=iMarkerSize;\n \t\t}\n \t\tif(!lMarkers.isEmpty())\n \t\t{\n \t\t\tElement eScript=XML.createChild(eEnsureSpaces,\"script\");\n \t\t\teScript.setAttribute(\"type\",\"text/javascript\");\n \t\t\tXML.createText(eScript,\n \t\t\t\t\"addOnLoad(function() { canvasInit('\"+getID()+\"','\"+QDocument.ID_PREFIX+\"',\"+\n \t\t\t\tisEnabled()+\",\"+hotspotPositions[0]+\",\"+hotspotPositions[1]+\",\"+\n \t\t\t\t((int)(dZoom * 4.0)) + \",'\"+\n \t\t\t\t(getQuestion().isFixedColour() ? getQuestion().getFixedColourFG() : \"black\")+\n \t\t\t\t\"','\"+\n \t\t\t\t(getQuestion().isFixedColour() ? getQuestion().getFixedColourBG() :\n \t\t\t\t\tconvertHash(getBackground()))+\n \t\t\t\t\"',\" + (int)(dZoom * 10.0)+\n \t\t\t\t\"); });\");\n \t\t\tElement eDynamic=XML.createChild(eEnsureSpaces,\"div\");\n \t\t\teDynamic.setAttribute(\"id\",QDocument.ID_PREFIX+getID()+\"_dynamic\");\n \t\t}\n \n\t\tint iIndex=0;\n \t\tfor(Marker m : lMarkers)\n \t\t{\n \t\t\tElement eMarker=XML.createChild(eEnsureSpaces,\"img\");\n\t\t\teMarker.setAttribute(\"id\",QDocument.ID_PREFIX+getID()+\"_marker\"+iIndex);\n \t\t\teMarker.setAttribute(\"src\",\"%%RESOURCES%%/\"+sMarkerPrefix+\n \t\t\t\t(isEnabled() ? \"\" : \"d\") + \".gif\");\n \t\t\teMarker.setAttribute(\"class\",\"canvasmarker\");\n \t\t\tif(isEnabled())\teMarker.setAttribute(\"tabindex\",\"0\");\n \t\t\tElement eScript=XML.createChild(eEnsureSpaces,\"script\");\n \t\t\teScript.setAttribute(\"type\",\"text/javascript\");\n \t\t\tWorld w=m.sWorld==null ? null : getWorld(m.sWorld);\n \t\t\tXML.createText(eScript,\n \t\t\t\t\"addOnLoad(function() { canvasMarkerInit('\"+getID()+\"','\"+QDocument.ID_PREFIX+\"','\"+\n \t\t\t\tm.sLabelJS.replaceAll(\"'\",\"\\\\\\\\'\")+\"',\"+\n \t\t\t\tgetWorldFactors(w,dZoom)+\"); });\");\n \t\t\tElement eInputX=XML.createChild(eEnsureSpaces,\"input\");\n \t\t\teInputX.setAttribute(\"type\",\"hidden\");\n \t\t\teInputX.setAttribute(\"value\",\"\"+(int)(m.iX*dZoom));\n\t\t\teInputX.setAttribute(\"name\",QDocument.ID_PREFIX+\"canvasmarker_\"+getID()+\"_\"+iIndex+\"x\");\n \t\t\teInputX.setAttribute(\"id\",eInputX.getAttribute(\"name\"));\n \t\t\tElement eInputY=XML.createChild(eEnsureSpaces,\"input\");\n \t\t\teInputY.setAttribute(\"type\",\"hidden\");\n \t\t\teInputY.setAttribute(\"value\",\"\"+(int)(m.iY*dZoom));\n\t\t\teInputY.setAttribute(\"name\",QDocument.ID_PREFIX+\"canvasmarker_\"+getID()+\"_\"+iIndex+\"y\");\n \t\t\teInputY.setAttribute(\"id\",eInputY.getAttribute(\"name\"));\n \n\t\t\tif(isEnabled()) qc.informFocusable(QDocument.ID_PREFIX+getID()+\"_marker\"+iIndex,bPlain);\n \t\t}\n \t\tfor(MarkerLine ml : lLines)\n \t\t{\n \t\t\tWorld w=ml.sWorld==null ? null : getWorld(ml.sWorld);\n \n \t\t\tElement eScript=XML.createChild(eEnsureSpaces,\"script\");\n \t\t\teScript.setAttribute(\"type\",\"text/javascript\");\n \t\t\tXML.createText(eScript,\n \t\t\t\t\"addOnLoad(function() { canvasLineInit('\"+getID()+\"','\"+QDocument.ID_PREFIX+\"',\"+\n \t\t\t\tml.iFrom+\",\"+ml.iTo+\",'\"+ml.sLabelJS.replaceAll(\"'\",\"\\\\\\\\'\")+\"',\" +\n \t\t\t\tgetWorldFactors(w,dZoom)+\n \t\t\t\t\"); });\");\n \t\t}\n \n \t\tXML.createText(eEnsureSpaces,\" \");\n \t\tqc.addTextEquivalent(getString(\"alt\"));\n \t}", "public void startDocument()\r\n\t{\r\n\t marc_out.add(\"=LDR 00000nam\\\\\\\\22000007a\\\\4500\") ;\r\n\t marc_out.add(\"=001 etd_\" + pid);\r\n\t marc_out.add(\"=003 MiAaPQ\");\r\n\t marc_out.add(\"=006 m\\\\\\\\\\\\\\\\fo\\\\\\\\d\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\r\n\t marc_out.add(\"=007 cr\\\\mnu\\\\\\\\\\\\aacaa\");\r\n\t marc_out.add(\"=040 \\\\\\\\$aMiAaPQ$beng$cDGW$dDGW\");\r\n\t marc_out.add(\"=049 \\\\\\\\$aDGWW\");\r\n\t marc_out.add(\"=504 \\\\\\\\$aIncludes bibliographical references.\");\r\n\t marc_out.add(\"=538 \\\\\\\\$aMode of access: Internet\");\r\n marc_out.add(\"=996 \\\\\\\\$aNew title added ; 20\" + running_date);\r\n marc_out.add(\"=998 \\\\\\\\$cgwjshieh ; UMI-ETDxml conv ; 20\" + running_date);\r\n\t marc_out.add(\"=852 8\\\\$bgwg ed$hGW: Electronic Dissertation\");\r\n\t marc_out.add(\"=856 40$uhttp://etd.gelman.gwu.edu/\" + pid + \".html$zClick here to access.\");\r\n\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jTextFieldKey = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaText = new javax.swing.JTextArea();\n jLabel5 = new javax.swing.JLabel();\n jTextFieldLength = new javax.swing.JTextField();\n jButtonSave = new javax.swing.JButton();\n jButtonExtract = new javax.swing.JButton();\n jButtonEmbed = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jPanelImage = new javax.swing.JPanel();\n jLabelImageOut = new javax.swing.JLabel();\n jPanelImage1 = new javax.swing.JPanel();\n jLabelImageIn = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(250, 250, 250));\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 255)));\n\n jTextFieldKey.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n jTextFieldKey.setText(\"0\");\n jTextFieldKey.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldKeyActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 16)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel3.setText(\"Text\");\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 16)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel4.setText(\"Key\");\n\n jTextAreaText.setColumns(20);\n jTextAreaText.setRows(5);\n jScrollPane1.setViewportView(jTextAreaText);\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 1, 16)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel5.setText(\"Length\");\n\n jTextFieldLength.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n jTextFieldLength.setText(\"0\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 613, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextFieldKey, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextFieldLength, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(82, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextFieldLength, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextFieldKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(29, Short.MAX_VALUE))\n );\n\n jButtonSave.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jButtonSave.setText(\"Save\");\n jButtonSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSaveActionPerformed(evt);\n }\n });\n\n jButtonExtract.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jButtonExtract.setText(\"Extract\");\n jButtonExtract.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonExtractActionPerformed(evt);\n }\n });\n\n jButtonEmbed.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jButtonEmbed.setText(\"Embed\");\n jButtonEmbed.setPreferredSize(new java.awt.Dimension(97, 31));\n jButtonEmbed.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonEmbedActionPerformed(evt);\n }\n });\n\n jPanel2.setBackground(new java.awt.Color(250, 250, 250));\n\n jPanelImage.setBackground(new java.awt.Color(220, 220, 220));\n jPanelImage.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 255)));\n jPanelImage.setPreferredSize(new java.awt.Dimension(270, 270));\n\n jLabelImageOut.setBackground(new java.awt.Color(220, 220, 220));\n jLabelImageOut.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabelImageOut.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n jLabelImageOutMouseMoved(evt);\n }\n });\n jLabelImageOut.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelImageOutMouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabelImageOutMouseExited(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelImageLayout = new javax.swing.GroupLayout(jPanelImage);\n jPanelImage.setLayout(jPanelImageLayout);\n jPanelImageLayout.setHorizontalGroup(\n jPanelImageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelImageOut, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n );\n jPanelImageLayout.setVerticalGroup(\n jPanelImageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelImageOut, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n );\n\n jPanelImage1.setBackground(new java.awt.Color(220, 220, 220));\n jPanelImage1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 255)));\n jPanelImage1.setPreferredSize(new java.awt.Dimension(270, 270));\n\n jLabelImageIn.setBackground(new java.awt.Color(220, 220, 220));\n jLabelImageIn.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabelImageIn.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\zGararz\\\\Documents\\\\NetBeansProjects\\\\Encode_Image\\\\draw\\\\add1.png\")); // NOI18N\n jLabelImageIn.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n jLabelImageInMouseMoved(evt);\n }\n });\n jLabelImageIn.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabelImageInMouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jLabelImageInMouseExited(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelImage1Layout = new javax.swing.GroupLayout(jPanelImage1);\n jPanelImage1.setLayout(jPanelImage1Layout);\n jPanelImage1Layout.setHorizontalGroup(\n jPanelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelImageIn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n );\n jPanelImage1Layout.setVerticalGroup(\n jPanelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelImageIn, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)\n );\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\">>>\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addComponent(jPanelImage1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)\n .addComponent(jPanelImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanelImage1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanelImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(34, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addGap(155, 155, 155))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(259, 259, 259)\n .addComponent(jButtonEmbed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonExtract)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonSave)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonSave)\n .addComponent(jButtonEmbed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonExtract))\n .addGap(19, 19, 19))\n );\n\n pack();\n setLocationRelativeTo(null);\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 outputBook(){\n\t\tSystem.out.println(\"\\nOrder book: \");\n\t\tNode position = head.next;\n\t\twhile (position!=null){\n\t\t\tSystem.out.println(position.ord);\n\t\t\tposition=position.next; //next or previous\n\t\t}\n\t}", "public void loanPaymentReceitStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\np.emphasized(true);\np.underLine(2);\np.newLine();\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Loan Repayment Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Batch Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan ID: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \np.emphasized(false);\np.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX\"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine();\np.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\np.newLine();\np.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\np.newLine();\np.setText(\"Payment Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(12).toString()+p.underLine(0));\np.newLine();\np.setText(\"Payment Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(13).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Payment Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\np.newLine();\np.alignLeft();\np.setText(\"Loan Paid: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(9).toString()+\"/=\"+p.underLine(0));\np.newLine(); \n//p.alignLeft();\n//p.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\np.newLine();\n\np.addLineSeperator();\np.doubleStrik(true);\n\np.underLine(2) ;\np.newLine();\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\n\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.newLine();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n\np.addLineSeperator();\n//p.newLine();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n\n//p.addLineSeperator();\n//p.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public void logScreen(String imageName, String title) {\n this.logScreen(imageName, title, thumbHeight, thumbWidth);\n }", "private String getHistoryTabImgTitle(String title) {\n return \"<span style=\\\"font-family: 'calibri';\\\">\" + Canvas.imgHTML(\"pieces/16/history.png\") + \"&nbsp;\" + title + \"</span>\";\n }", "public static void main(String[] args){\n\tImage test = new Image(700,700);\n\t//addRectangle(test, 0, 0, 600, 600, -1, -1, -1);\n\t//test.display();\n\taddCircle(test, 300, 300, 100, 255, 255, 255);\n\taddCircle(test, 500, 300, 100, 255, 255, 255);\n\taddCircle(test, 400, 400, 150, 255, 255, 255);\n\taddCircle(test, 350, 350, 25, 0, 0, 0);\n\taddCircle(test, 450, 350, 25, 0, 0, 0);\n\taddCircle(test, 350, 350, 24, 255, 255, 255);\n\taddCircle(test, 450, 350, 24, 255, 255, 255);\n\taddCircle(test, 350, 350, 10, 0, 0, 0);\n\taddCircle(test, 450, 350, 10, 0, 0, 0);\n\taddRectangle(test, 325, 475, 150, 20, 0, 0, 0);\n\ttest.setPixel(0,0,255,255,255);\n\ttest.display();\n\tencrypt(test, \"PerfektDokumentation\");\n\ttest.display();\n\tdecrypt(test, \"PerfektDokumentation\");\n\t\n\ttest.display();\n\t}", "void drawStuff (Graphics g) {\n if (g instanceof PrintGraphics) \n g.setColor (parent.parent.parent.printImgBColor);\n else \n g.setColor (parent.parent.parent.normImgBColor);\n \n g.fillRect (0, 0, _xPix, _yPix - 3 * parent.lineSize);\n \n //draw the stuff\n drawBins (g);\n \n //Draw the Time Line\n drawTimeLine (g);\n }", "public interface PrintingIfc\n{\n /**\n revision number supplied by source-code-control system\n **/\n public static String revisionNumber = \"$Revision: /rgbustores_13.4x_generic_branch/1 $\";\n /**\n Date format for receipts and endorsements\n **/\n public static SimpleDateFormat DATE_LINE_FORMAT =\n new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a z\");\n /**\n ESC sequence for right justification on the slip printer\n **/\n public static String PRINTER_RIGHT_JUSTIFY = new String(\"\\u001b|rA\");\n /**\n Slip printer line size\n **/\n public static int SLIP_PRINTER_LINE_SIZE = 33;\n}", "public void drawKeysChipsPics() throws IOException {\n Graphics g = infoCanvas.getGraphics();\n\n // draw keys collected.\n List<Key> keys = board.getChip().getKeys();\n int size = infoCanvas.getHeight() / 16;\n int startX = infoCanvas.getWidth() / 2 - size * 3;\n for (int i = 0; i < 5; i++) {\n drawSquare((Graphics2D) g, startX + size * i, 14 * infoCanvas.getHeight() / 20, size);\n }\n if(keys.size() > 0){\n for(int i = 0; i < keys.size(); i++){\n Color color = keys.get(i).getColour();\n String pathName = \"./assets/Items/\";\n if(color.equals(Color.red)){\n pathName += \"KeyRed.png\";\n }else if(color.equals(Color.blue)){\n pathName += \"KeyBlue.png\";\n }else if(color.equals(Color.green)){\n pathName += \"KeyGreen.png\";\n }\n BufferedImage bi = ImageIO.read(new File(pathName));\n g.drawImage(bi, startX + size * i + 2, 14 * infoCanvas.getHeight()/20 + 2, size - 4, size -4, null);\n }\n }\n\n // draw chips collected.\n int chipsNum = originalChipNumber - board.getTreasureRemainingAmount();\n BufferedImage bi = ImageIO.read(new File(\"./assets/Items/Treasure.png\"));\n if(chipsNum > 0){\n int lineNumber = chipsNum / 6;\n int remainingInLastLine = chipsNum % 6;\n if(lineNumber > 0){\n for(int i = 0; i < lineNumber; i++){\n for(int j = 0; j < 6; j++){\n g.drawImage(bi, startX + size * j + 2, 14 * infoCanvas.getHeight()/20 + size * (i + 1) + 2, size - 4, size -4, null);\n }\n }\n }\n for(int i = 0; i < remainingInLastLine; i++){\n g.drawImage(bi, startX + size * i + 2, 14 * infoCanvas.getHeight()/20 + size * (1 + lineNumber) + 2, size - 4, size -4, null);\n }\n }\n }", "@FXML\n void printByDate(ActionEvent event) {\n \tString accInfo = db.printByDateOpen();\n \tmessageArea.setText(accInfo);\n }", "public void outputAfterRecipe_EM() {\n }", "private void init() {\n File file1 = new File(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n if (file1.exists()) file1.delete();\n PrintView<JianyiChuliTongzhidanListBean.DataListBean> printView1 = new PrintView<>(this,entity);\n String path1 = FileUtil.getInstance().save2Local(printView1.getcacheBitmap(), file1.getAbsolutePath());\n if (((User) SPUtils.getInstance().getObjectData(Constance.USER_OBJECT)).getZt() == 1) {\n saveAndStartPrintShare(FileUtil.getInstance().getCacheDirPath(), \"jianyichuli.jpg\");\n return;\n }\n phandler.sendEmptyMessage(104);\n while (true){\n BorisPrint bPrint = new BorisPrint(MyApplication.getContext(), null,phandler);\n int code = bPrint.print(path1, 2);\n if (code==0){\n break;\n }\n }\n }", "private BufferedImage getImage() {\n // calculate the size of the label text rendered with the specified TEXT_FONT\n FontRenderContext frc = getFontRenderContext();\n \n //Author\n TextLayout authorLayout = new TextLayout(author, AUTHOR_FONT, frc);\n\n // prepare and split up text\n // split into lines\n String [] lines = text.split(\"\\n\");\n // make each line fit into TEXT_WIDTH\n ArrayList<TextLayout> chunks = new ArrayList<TextLayout>();\n for(String s:lines){\n splitText(chunks, s);\n }\n\n // now we can do the heights\n // calculate the maximum height of the text including the ascents and\n // descents of the characters, both lines, padding between lines\n int textHeight = getImageHeight(authorLayout, chunks);\n\n \n int authorHeight= (int)(authorLayout.getAscent() + authorLayout.getDescent());\n TextLayout aLine = chunks.get(0);\n int actualTextLineHeight = (int)(aLine.getAscent() + aLine.getDescent());\n \n // create an image to render the text onto\n int totalWidth = PADDING_LEFT + ICON_WIDTH + PADDING_ICON + TEXT_WIDTH + PADDING_RIGHT;\n BufferedImage tweetImage = new BufferedImage(totalWidth+ BORDER_WIDTH*2, textHeight+BORDER_WIDTH*2, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2d = (Graphics2D) tweetImage.getGraphics();\n\n // draw background\n int x = 0 + BORDER_WIDTH;\n int y = 0 + BORDER_WIDTH;\n\n int h = textHeight;\n int w = totalWidth;\n\n int arc = 60;\n\n // draw background rectangle\n g2d.setColor(Color.WHITE);\n g2d.fillRoundRect(x, y, w, h, arc, arc);\n\n // draw border\n g2d.setStroke(new BasicStroke(BORDER_WIDTH));\n g2d.setColor(BORDER_COLOR);\n\n g2d.setPaintMode();\n g2d.drawRoundRect(x, y, w, h, arc, arc);\n\n // used to draw\n int textX = 0;\n int textY = 0;\n\n //draw the profile image icon\n profileImageIcon.paintIcon(null, g2d, PADDING_LEFT, PADDING_TOP);\n\n // draw author text\n textX = PADDING_LEFT + ICON_WIDTH + PADDING_ICON;\n textY = authorHeight + PADDING_TOP;\n g2d.setFont(AUTHOR_FONT);\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n g2d.setColor(DEFAULT_FONT_COLOR);\n g2d.drawString(author, textX, textY);\n\n // draw the tweet text\n textY += authorHeight + PADDING_LINE;\n g2d.setFont(TEXT_FONT);\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n g2d.setColor(DEFAULT_FONT_COLOR);\n for(TextLayout t:chunks){\n t.draw(g2d, textX, textY);\n textY += actualTextLineHeight + PADDING_LINE;\n }\n \n return tweetImage;\n }", "public void onEndPage(PdfWriter writer, Document document) {\r\n\r\n\t\tImage image;\r\n\t\tFont fontStyle = new Font();\r\n\t\tfontStyle.setColor(255, 255, 255);\r\n\t\tfontStyle.setSize(10);\r\n\t\ttry {\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-footer.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, 0);\r\n\t\t\tdocument.add(image);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tString date = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\r\n\t\tColumnText.showTextAligned(writer.getDirectContent(), Element.ALIGN_CENTER,\r\n\t\t\t\tnew Phrase(String.format(\"Page - %d, Printed on : %s %s\", pagenumber, date, domainName), fontStyle),\r\n\t\t\t\t(document.getPageSize().getWidth()) / 2, document.bottomMargin() - 25, 0);\r\n\t}", "void printBanner() {\n PrintStream printStream = System.out;\n for (String lineLocal : BANNER) {\n printStream.println(lineLocal);\n }\n printStream.print(line);\n String version = Audit4jBanner.class.getPackage().getImplementationVersion();\n if (version == null) {\n printStream.println(\"(v\" + CoreConstants.RELEASE_VERSION + \")\");\n } else {\n printStream.println(\"(v\" + version + \")\");\n }\n printStream.println();\n }", "public void printAnnouncements(){\n\n if (this.announcementLogbook.isEmpty() == false){\n\n for (String log : this.announcementLogbook){\n this.announcementLogs.setText(this.announcementLogs.getText() + log + \"\\n\");\n }\n }\n\n this.announcementLogbook.clear();\n }", "public void debugPrint() {\n System.out.println(\"### Image Handler ###\");\n System.out.println(\"Handling: \" + images.size());\n }", "public Scene drawKeyboard(Scene acc){\r\n //White keys first\r\n for(int i = 0; i < 15; i++){\r\n acc = acc.placeImage(new Rectangle(40, 120, keyMode(i), keyColor(i)), 60+i*40, 100);\r\n if(this.down.contains(this.draw.get(i))){\r\n acc = acc.placeImage(new Text(this.algo.noteName(this.draw.get(i)), 15, \"black\"), 60+i*40, 173);\r\n }\r\n }\r\n \r\n //Black keys\r\n for(int i = 0; i < 13; i++){\r\n if(i != 2 && i != 6 && i != 9){\r\n acc = acc.placeImage(new Rectangle(30, 60, \"solid\", keyColor(i+15)), 80+i*40, 60);\r\n if(this.down.contains(this.draw.get(i+15))){\r\n acc = acc.placeImage(new Text(this.algo.noteName(this.draw.get(i+15)), 15, \"black\"), 80+i*40, 173);\r\n }\r\n }\r\n }\r\n return acc;\r\n }", "void putdata()\n {\n System.out.printf(\"Book Title \\\"%s\\\", written by \\\"%s\\\" has %d pages and of %d rupees.\",title,writer,pages,price);\n }", "void displayMetadata(Node node, int level) {\n indent(level);\n if(level == 1)metadata +=\" \";\n else if(level == 2){\n metadata +=\" \";\n metadata +=\" \";\n }else if(level == 3){\n metadata +=\" \";\n metadata +=\" \";\n metadata +=\" \";\n }else if(level == 4){\n metadata +=\" \";\n metadata +=\" \";\n metadata +=\" \";\n metadata +=\" \";\n }\n metadata +=\" \";\n\n String nume1 = node.getNodeName();\n if(nume1.equals(\"markerSequence\")||nume1.equals(\"Palette\") || nume1.equals(\"PLTE\")){\n return;\n }\n System.out.print(\"\" + nume1);\n metadata +=\"\" + nume1;\n\n\n NamedNodeMap map = node.getAttributes();\n if (map != null) {\n\n // print attribute values\n int length = map.getLength();\n for (int i = 0; i < length; i++) {\n Node attr = map.item(i);\n String nume= attr.getNodeName();\n if(nume.endsWith(\"Entry\")){\n\n }else{\n System.out.print(\"\" + attr.getNodeName() +\n \"=\\\"\" + attr.getNodeValue() + \"\\\"\");\n \n metadata +=\" \" + attr.getNodeName() +\n \"=\\\"\" + attr.getNodeValue() + \"\\\"\";\n\n\n }\n }\n }\n\n Node child = node.getFirstChild();\n if (child == null) {\n // no children, so close element and return\n System.out.println(\"\");\n metadata +=\"\\n\";\n return;\n }\n\n // children, so close current tag\n System.out.println(\"\");\n metadata +=\"\\n\";\n\n if((child.getNodeName().equals(\"ColorTableEntry\") == false) && (child.getNodeName().equals(\"markerSequence\") == false) )\n while (child != null) {\n \n //if(child.equals(\"LocalColorTable\")){\n // child = null;\n //}\n // print children recursively\n displayMetadata(child, level + 1);\n child = child.getNextSibling();\n }\n\n // print close tag of element\n indent(level);\n //metadata +=\" \";\n //System.out.println(\"\" + node.getNodeName() + \"\");\n System.out.println(\"\");\n metadata +=\"\\n\";\n }", "private void displayEntity(ArrayList<Entity> entities){\n for(Entity entity : entities)\n entity.printImage();\n }", "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "public static void displayLogo(){\r\n System.out.println();\r\n }", "private void printEditMenu(){\n System.out.println(\"fh - Flip horizontal \\n fv - Flip vertical \\n sl - Slide left \\n sr - Slide right \\n su - Slide up \\n sd - Slide down \\n nr - Slide number right. Currently=\" + numberRight + \"\\n nl - Slide number left. Currently=\" + numberLeft + \"\\n nd - Slide number down. Currently=\" + numberDown + \"\\n nu - Slide number up. Currently=\" + numberUp + \"\\n r - Repeat last operation (Default slide left) \\n q - Quit (Return to main menu)\");\n }", "public static void main(String[] args) throws DocumentException, IOException {\n \t\n// // step 1\n// Document document = new Document();\n \n // step 1: creation of the document with a certain size and certain margins\n Document document = new Document(PageSize.A4, 50, 50, 50, 50);\n \n // step 2: create a writer (we have many type of writer, eg HtmlWriter, PdfWriter)\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(RESULT));\n \n /* step 3: BEFORE open the document we add some meta information to the document (that properties can be viewed with adobe reader or right click-properties)\n * they don't appear in the document view\n */\n document.addAuthor(\"Author Test\"); \n document.addSubject(\"This is the result of a Test.\"); \n \n // step 4\n document.open();\n \n //The com.itextpdf.text.Image is used to add images to IText PDF documents\n Image image1 = Image.getInstance(\"src/main/resources/sms.png\");\n document.add(image1);\n \n // step 5\n /*\n access at the content under the new pdf document just created (ie the writer object that i can control/move)\n PdfContentByte is the object that contains the text to write and the content of a page (it offer the methods to add content to a page)\n */\n PdfContentByte canvas = writer.getDirectContentUnder();\n \n //Sets the compression level to be used for streams written by the writer.\n writer.setCompressionLevel(0);\n canvas.saveState(); \n canvas.beginText(); \n //move the writer to tha X,Y position\n canvas.moveText(360, 788); \n canvas.setFontAndSize(BaseFont.createFont(), 12);\n \n Rectangle rectangle = new Rectangle(400, 300);\n rectangle.setBorder(2);\n document.add(rectangle);\n \n /* \n Writes something to the direct content using a convenience method\n A Phrase is a series of Chunks (A Chunk is the smallest significant part of text that can be added to a document)\n \n Conclusion: A chunk is a String with a certain Font ---> A Phrase is a series of Chunk\n Both Chunck and Font has a Font field (but if a Chunk haven't a Font uses the one of the Phrase that own it)\n */\n \n //------- Two modes to set a Phrase: --------\n \n //mode 1) set the phrase directly without a separate chunk object\n Phrase hello = new Phrase(\"Hello World3\");\n document.add(hello);\n \n //mode 2) create before a chunk, adjust it and after assign it to a Phrase(s) \n Chunk chunk2 = new Chunk(\"Setting the Font\", FontFactory.getFont(\"dar-black\"));\n chunk2.setUnderline(0.5f, -1.5f);\n \n Phrase p1 = new Phrase(chunk2);\n document.add(p1); \n \n canvas.showText(\"Hello sms\"); \n canvas.endText(); \n canvas.restoreState(); \n \n document.add(Chunk.NEWLINE);\n \n //i chunk posso aggiungerli solo tramite l'oggetto Document ?\n Chunk chunk = new Chunk(\"I'm a chunk\");\n chunk.setBackground(BaseColor.GRAY, 1f, 0.5f, 1f, 1.5f);\n document.add(chunk);\n \n /*\n * A Paragraph is a series of Chunks and/or Phrases, has the same qualities of a Phrase, but also some additional layout-parameters\n * A paragraph is a sub-section in the document. After each Paragraph a CRLF is added\n */\n Paragraph paragraph = new Paragraph(\"A:\\u00a0\");\n Chunk chunk1 = new Chunk(\"I'm a chunk1\");\n paragraph.add(chunk1);\n paragraph.setAlignment(Element.ALIGN_JUSTIFIED);\n document.add(paragraph);\n \n \n //----- Add a table to the document ------\n \n //A cell in a PdfPTable\n PdfPCell cell;\n \n PdfPTable table = new PdfPTable(2); //in argument vis the number of column\n table.setWidths(new int[]{ 1, 2 }); //the width of the first and second cell. The number of element in the array must be equal at the number of column\n \n table.addCell(\"Name:\");\n cell = new PdfPCell();\n //We can attach event at the cell\n //cell.setCellEvent(new TextFields(1));\n table.addCell(cell);\n \n table.addCell(\"Loginname:\");\n cell = new PdfPCell();\n //cell.setCellEvent(new TextFields(2));\n table.addCell(cell);\n \n table.addCell(\"Password:\");\n cell = new PdfPCell(); \n table.addCell(cell);\n \n table.addCell(\"Reason:\");\n cell = new PdfPCell(); \n cell.setFixedHeight(60);\n table.addCell(cell);\n \n document.add(table);\n \n //add an horizontal line\n LineSeparator ls = new LineSeparator(); \n ls.setLineWidth(0);\n document.add(new Chunk(ls));\n \n Anchor pdfRef = new Anchor(\"http://www.java2s.com\");\n document.add(pdfRef);\n \n // step 5\n document.close();\n }", "public void displayGivenImage() {\n\t\tthis.image.display();\n\t}", "public void loanStatamentStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\n//p.addLineSeperatorX();\n//p.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "public static void main( String[] args ) throws Exception\n {\n if( args.length != 2 )\n {\n System.out.println(\"Usage: <input pdf> <output file>\");\n }\n else\n {\n \tFile file = new File(\"./\"+args[0]);\n \tPDDocument document = PDDocument.load(file);\n\n \t List<PDPage> documentPages = document.getDocumentCatalog().getAllPages();\n\n \t\n try\n {\n \tPDPage page = documentPages.get(0);\n //document.addPage(page);\n List annotations = page.getAnnotations();\n\n // Setup some basic reusable objects/constants\n // Annotations themselves can only be used once!\n\n float inch = 72;\n PDGamma colourGreen = new PDGamma();\n colourGreen.setG(1);\n PDGamma colourBlue = new PDGamma();\n colourBlue.setB(1);\n\n PDBorderStyleDictionary borderThick = new PDBorderStyleDictionary();\n borderThick.setWidth(inch/12); // 12th inch\n PDBorderStyleDictionary borderThin = new PDBorderStyleDictionary();\n borderThin.setWidth(inch/72); // 1 point\n PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary();\n borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE);\n borderULine.setWidth(inch/72); // 1 point\n\n float pw = page.getMediaBox().getUpperRightX();\n float ph = page.getMediaBox().getUpperRightY();\n\n // Add the markup annotation, a highlight to PDFBox text\n PDFont font = PDType1Font.HELVETICA_BOLD;\n PDAnnotationTextMarkup txtMark = new PDAnnotationTextMarkup(PDAnnotationTextMarkup.SUB_TYPE_HIGHLIGHT);\n txtMark.setColour(colourBlue);\n txtMark.setConstantOpacity((float)0.1); // Make the highlight 20% transparent\n\n // Set the rectangle containing the markup\n\n float textWidth = (font.getStringWidth( \"PDFBox\" )/1000) * 18;\n PDRectangle position = new PDRectangle();\n position.setLowerLeftX(inch);\n position.setLowerLeftY( ph-inch-18 );\n position.setUpperRightX(72 + textWidth);\n position.setUpperRightY(ph-inch);\n txtMark.setRectangle(position);\n\n // work out the points forming the four corners of the annotations\n // set out in anti clockwise form (Completely wraps the text)\n // OK, the below doesn't match that description.\n // It's what acrobat 7 does and displays properly!\n float[] quads = new float[8];\n\n quads[0] = position.getLowerLeftX(); // x1\n quads[1] = position.getUpperRightY()-2; // y1\n quads[2] = position.getUpperRightX(); // x2\n quads[3] = quads[1]; // y2\n quads[4] = quads[0]; // x3\n quads[5] = position.getLowerLeftY()-2; // y3\n quads[6] = quads[2]; // x4\n quads[7] = quads[5]; // y5\n\n txtMark.setQuadPoints(quads);\n txtMark.setContents(\"Highlighted since it's important\");\n\n annotations.add(txtMark);\n\n\n \n\n // Now a square annotation\n\n PDAnnotationSquareCircle aSquare =\n new PDAnnotationSquareCircle( PDAnnotationSquareCircle.SUB_TYPE_SQUARE);\n aSquare.setContents(\"Square Annotation\");\n aSquare.setColour(colourGreen); // Outline in red, not setting a fill\n aSquare.setBorderStyle(borderThick);\n aSquare.setConstantOpacity((float)0.1);\n\n // Place the annotation on the page, we'll make this 1\" (72points) square\n // 3.5\" down, 1\" in from the right on the page\n\n position = new PDRectangle(); // Reuse the variable, but note it's a new object!\n position.setLowerLeftX(pw-(2*inch)); // 1\" in from right, 1\" wide\n position.setLowerLeftY(ph-(float)(3.5*inch) - inch); // 1\" height, 3.5\" down\n position.setUpperRightX(pw-inch); // 1\" in from right\n position.setUpperRightY(ph-(float)(3.5*inch)); // 3.5\" down\n aSquare.setRectangle(position);\n\n // add to the annotations on the page\n annotations.add(aSquare);\n\n\n\n document.save(args[1]);\n }\n finally\n {\n document.close();\n }\n }\n }", "private String formatImageText(SafeSearchAnnotation annotation) {\n return String.format(\"adult: %s\\nmedical: %s\\nspoofed: %s\\nviolence: %s\\n\",\n annotation.getAdult(),\n annotation.getMedical(),\n annotation.getSpoof(),\n annotation.getViolence());\n }", "private void IdentifyHeaderAndFooter() {\n receipt_Header = receipt_lines.length > 0 ? receipt_lines[0] : null;\n receipt_Footer = receipt_lines.length > 1 ? receipt_lines[receipt_lines.length - 1].split(\" \")[0] : null;\n }" ]
[ "0.57180816", "0.5473105", "0.5236102", "0.5058366", "0.49264365", "0.48885265", "0.48867944", "0.48375958", "0.4824404", "0.480956", "0.47862047", "0.47845933", "0.47706598", "0.47589335", "0.47437772", "0.47356206", "0.4723706", "0.47206548", "0.47201505", "0.47163492", "0.47149637", "0.47132492", "0.47012863", "0.47000813", "0.46966794", "0.46940312", "0.46871656", "0.4686467", "0.46772492", "0.46619514", "0.46561918", "0.46489242", "0.46479586", "0.46472743", "0.4640942", "0.46388793", "0.4631405", "0.46219686", "0.46192032", "0.4619131", "0.46141878", "0.46104482", "0.45773193", "0.45763946", "0.45744222", "0.45646212", "0.45629856", "0.45583767", "0.45570266", "0.45485872", "0.45433992", "0.45389903", "0.4518101", "0.45122012", "0.44993016", "0.44901747", "0.44887", "0.44860485", "0.44801027", "0.4479802", "0.44669053", "0.44667503", "0.44628665", "0.44611573", "0.4457822", "0.44568464", "0.44490138", "0.44477946", "0.44476536", "0.444365", "0.44418618", "0.44237992", "0.4417064", "0.43996087", "0.43973336", "0.4396658", "0.4390233", "0.4387967", "0.43812263", "0.43784928", "0.43762723", "0.43759975", "0.43742839", "0.43721238", "0.4370949", "0.43705702", "0.43643844", "0.43609613", "0.4360544", "0.4359858", "0.4359558", "0.43566668", "0.4354551", "0.43545428", "0.43520224", "0.4350364", "0.4350284", "0.43469334", "0.434688", "0.43457294" ]
0.5601667
1
Validate the function data
private void validateFunctionData(FunctionData functionData) throws EQException { FunctionValidate functionValidate = new FunctionValidate(fhd, screenSetPrint, functionData); functionValidate.setHaltOnError(false); functionValidate.setDefaultValues(false); functionValidate.setApplicationValidate(false); functionValidate.validate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateData() {\n }", "public String validate(Data[] data);", "protected boolean isValidData() {\n return true;\n }", "void validate();", "void validate();", "private void validateInputParameters(){\n\n }", "@Test\n\tpublic void testValidateFunction() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateFunction(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateFunction(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response function was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tfor(SurveyResponse.Function function : SurveyResponse.Function.values()) {\n\t\t\t\tAssert.assertEquals(function, SurveyResponseValidators.validateFunction(function.toString()));\n\t\t\t}\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public void validate() {}", "private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "public void validate(DataRecord value) {\n\r\n\t}", "void checkValid();", "protected boolean validateData(String [] data) {\n return true;\n }", "public abstract boolean validate();", "public void checkData(){\n\n }", "void validate(T regData, Errors errors);", "private boolean isInputValid() {\n return true;\n }", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "protected void validate() {\n // no op\n }", "private FunctionParametersValidator() {}", "boolean checkValidity();", "public boolean isDataValid() {\r\n return validData;\r\n }", "public void validate() throws org.apache.thrift.TException {\n if (functionName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'functionName' was not present! Struct: \" + toString());\n }\n if (className == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'className' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void setDataValidation(String dataValidation);", "ValidationResponse validate();", "private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }", "protected abstract boolean isInputValid();", "public boolean validateData(){\n boolean dataOk=true;\n if (etName.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Name field is void.\");\n dataOk=false;\n }\n if (etSurname.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Surname field is void.\");\n dataOk=false;\n }\n if (etDescription.getText().toString().equals(\"\")){\n Log.i(\"ProfileEditActivity\",\"Description field is void.\");\n dataOk=false;\n }\n return dataOk;\n }", "public boolean validate(Struct data) {\r\n\t\tif (data == null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tif (this.options.size() == 0) {\r\n\t\t\tOperationContext.get().errorTr(437, data);\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.options.size() == 1) \r\n\t\t\treturn this.options.get(0).validate(data);\r\n\t\t\r\n\t\tfor (DataType dt : this.options) {\r\n\t\t\tif (dt.match(data)) \r\n\t\t\t\treturn dt.validate(data);\r\n\t\t}\r\n\t\t\r\n\t\tOperationContext.get().errorTr(438, data);\t\t\t\r\n\t\treturn false;\r\n\t}", "@Test\n public void isInputDataValidTest() {\n boolean invoke = Deencapsulation.invoke(modificationFibonacci, \"isInputDataValid\", \"1\");\n assertTrue(invoke);\n }", "public boolean isValid();", "public boolean isValid();", "public boolean isValid();", "public boolean isValid();", "public boolean isValid();", "@Override\r\n\tprotected void validateData(ActionMapping arg0, HttpServletRequest arg1) {\n\t\t\r\n\t}", "public abstract boolean isValid();", "public abstract boolean isValid();", "public abstract boolean isValid();", "private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}", "boolean isValid();", "boolean isValid();", "boolean isValid();", "boolean isValid();", "boolean isValid();", "public void checkData2019() {\n\n }", "public boolean validate() {\n\t\tfor(int i=0; i<sensorData.size(); i++) {\n\t\t\tif(!sensorData.get(i).isValid()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean tableDataValid()\r\n {\r\n // if there are any form level validations that should go there\r\n int rowTotal = tblProtoCorresp.getRowCount();\r\n int colTotal = tblProtoCorresp.getColumnCount();\r\n for (int rowIndex = 0; rowIndex < rowTotal ; rowIndex++)\r\n {\r\n for (int colIndex = 0; colIndex < colTotal; colIndex++)\r\n {\r\n TableColumn column = codeTableColumnModel.getColumn(colIndex) ;\r\n\r\n ColumnBean columnBean = (ColumnBean)column.getIdentifier() ;\r\n\r\n if (columnBean.getColumnEditable()\r\n && !columnBean.getColumnCanBeNull())\r\n {\r\n if ( tblProtoCorresp.getValueAt(rowIndex,colIndex) != null)\r\n {\r\n if (tblProtoCorresp.getValueAt(rowIndex,colIndex).equals(\"\")\r\n || tblProtoCorresp.getValueAt(rowIndex,colIndex).toString().trim().equals(\"\") )\r\n {\r\n String msg = coeusMessageResources.parseMessageKey(\r\n \"checkInputValue_exceptionCode.2402\");\r\n String msgColName = \" \" + columnBean.getDisplayName() + \". \";\r\n CoeusOptionPane.showInfoDialog(msg + msgColName);\r\n tblProtoCorresp.changeSelection(rowIndex, colIndex, false, false) ;\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n String msg = coeusMessageResources.parseMessageKey(\r\n \"checkInputValue_exceptionCode.2402\");\r\n\r\n String msgColName = \" \" + columnBean.getDisplayName() + \". \";\r\n CoeusOptionPane.showInfoDialog(msg + msgColName);\r\n tblProtoCorresp.changeSelection(rowIndex, colIndex, false, false) ;\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n }\r\n return true ;\r\n }", "protected abstract boolean isValid();", "protected void validateFact(Fact[] param) {\r\n\r\n }", "public boolean validate(){\n return true;\n }", "public synchronized boolean validate(Object data) {\n if (!(data instanceof String)) {\n return false;\n }\n\n String dataString = (String) data;\n dataString = dataString.replaceAll(\"\\\\s\", \"\").replaceAll(\"-\", \"\");\n if (dataString.length() != 6) {\n return false;\n }\n\n for (Character c : dataString.substring(0, 2).toCharArray()) {\n if (!Character.isLetter(c)) {\n return false;\n }\n }\n for (Character c : dataString.substring(3, 5).toCharArray()) {\n if (!Character.isDigit(c)) {\n return false;\n }\n }\n return true;\n }", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "public abstract boolean verifyInput();", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\n\tpublic boolean checkData() {\n\t\treturn false;\n\t}", "private boolean validateData() {\n boolean validData = true;\n\n String email = mUserEmail.getText().toString().trim();\n String name = mUserName.getText().toString().trim();\n String password = mUserPassword.getText().toString();\n\n // If the Name text field is empty or Name is less then 3 characters,\n // give user a error message\n if (TextUtils.isEmpty(name) || name.length() < 3) {\n mUserNameWrapper.setError(getString(R.string.text_layout_invalid_name));\n validData = false;\n } else {\n mUserNameWrapper.setErrorEnabled(false);\n }\n\n // If the email text field is empty or email address is not per EMAIL_ADDRESS pattern,\n // give user a error message\n if (TextUtils.isEmpty(email) || !android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n mUserEmailWrapper.setError(getString(R.string.text_layout_invalid_email));\n validData = false;\n } else {\n mUserEmailWrapper.setErrorEnabled(false);\n }\n\n // If the password text field is emory or password is not between 5 and 8 digits,\n // give user a error message\n if (TextUtils.isEmpty(password) || password.length() < 5 || password.length() > 8) {\n mUserPasswordWrapper.setError(getString(R.string.text_layout_invalid_password));\n validData = false;\n } else {\n mUserEmailWrapper.setErrorEnabled(false);\n }\n return validData;\n }", "@Override\n public void validate(RateData data) throws RateLineParseException {\n }", "@Override\n\tprotected void validateModelSpecificInfo() throws InvalidDataTypeException {\n\t\t// Does each unwind map entry refer to a valid action?\n\t\tProgram program = getProgram();\n\t\tint numEntries = getCount();\n\t\tfor (int unwindBlockOrdinal = 0; unwindBlockOrdinal < numEntries; unwindBlockOrdinal++) {\n\t\t\tAddress actionAddress = getActionAddress(unwindBlockOrdinal);\n\t\t\tif ((actionAddress != null) &&\n\t\t\t\t!EHDataTypeUtilities.isValidForFunction(program, actionAddress)) {\n\t\t\t\tthrow new InvalidDataTypeException(getName() + \" data type at \" + getAddress() +\n\t\t\t\t\t\" doesn't refer to a valid location for an action.\");\n\t\t\t}\n\t\t}\n\t}", "public boolean isValid() {\r\n/* */ try {\r\n/* 326 */ validate();\r\n/* 327 */ } catch (ValidationException vex) {\r\n/* 328 */ return false;\r\n/* */ } \r\n/* 330 */ return true;\r\n/* */ }", "@Override\r\n public boolean validate() {\n return true;\r\n }", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "@Test\n public void isInputDataValidTestWithBadInput() {\n boolean invoke = Deencapsulation.invoke(modificationFibonacci, \"isInputDataValid\", \"a\");\n assertFalse(invoke);\n }", "public void validate() throws org.apache.thrift.TException {\n if (type != null) {\n type.validate();\n }\n if (returnType != null) {\n returnType.validate();\n }\n }", "@Override\r\n public void validate() {\r\n }" ]
[ "0.8144414", "0.74099684", "0.72160006", "0.69497067", "0.69497067", "0.6918719", "0.6866893", "0.68094087", "0.6794971", "0.66903317", "0.66649204", "0.6544241", "0.65109086", "0.6432007", "0.63811034", "0.633971", "0.63381237", "0.6291237", "0.6268101", "0.624516", "0.62436336", "0.6237581", "0.6225826", "0.62249964", "0.62038076", "0.6195851", "0.61521655", "0.6123895", "0.61189634", "0.6109079", "0.6109079", "0.6109079", "0.6109079", "0.6109079", "0.60959506", "0.6071884", "0.6071884", "0.6071884", "0.6058649", "0.6057583", "0.6057583", "0.6057583", "0.6057583", "0.6057583", "0.6011333", "0.60109127", "0.60101837", "0.5997072", "0.5994988", "0.5992039", "0.5978877", "0.5975079", "0.59714663", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.59456766", "0.5942165", "0.5937743", "0.59304047", "0.5920928", "0.5910993", "0.5908719", "0.5903339", "0.59014606", "0.58993435", "0.589185", "0.58866817" ]
0.8039164
1
Add the line to the lines
private void addLine() { lines.add(printerFormatter.markEOL()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addLine (String line) {\n writer.write (line);\n writer.newLine();\n // blockOut.append (line);\n // blockOut.append (GlobalConstants.LINE_FEED);\n }", "public synchronized void addLine(Line line)\r\n\t{\r\n\t\tlines.add(line);\r\n\t}", "private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}", "public void onOutputLineAdded(Window window, OutputLine line) {\n\t\t\t\n\t\t\tlinesLayout.addLine(line);\n\t\t}", "void addLine(int index, Coordinate start, Coordinate end);", "public void addLine(String line){\n if (line != null && line.trim().length() > 0){\n fileLines.add(line);\n parsed = false;\n }\n }", "public void addLine(Dialog line) {\n\t\tArrayList<Dialog> temp = new ArrayList<Dialog>();\n\t\ttemp.add(line);\n\t\tdecoupleGenericLines(temp);\n\t\tDialogueSystem.GLOBAL_DIALOG_LIST.add(line);\n\t}", "public void appendLine() {\n\t\t\tmBuilder.append(NewLineChar);\n\t\t\tlastAppendNewLine = true;\n\t\t}", "public void line(String line) {\n\t\t}", "public void addDataLine(String line) {\n this.data.textProperty().set(\n String.format(\n \"%s\\n%s\",\n this.data.textProperty().get(),\n line\n )\n );\n }", "public void addLine(String line) {\n if (methodMode) {\n methodCode.add(new AsmLine(line));\n } else {\n program.add(new AsmLine(line));\n }\n }", "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 }", "public void addItem(LineItem lineItem){\n\t\t\n\t\tlineItems.add(lineItem);\n\t}", "public Builder addLine(String line) {\n this.contentBuilder.append(line).append(\"\\n\");\n return this;\n }", "public void addLine(String file, int line) {\r\n\t\tif (!_fileLines.containsKey(file))\r\n\t\t\t_fileLines.put(file, new ArrayList<Integer>());\r\n\t\t_fileLines.get(file).add(line);\r\n\t}", "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 }", "public void newBufLine() {\n this.buffer.add(new ArrayList<Integer>());\n this.columnT = 0;\n this.lineT++;\n }", "public void addLine(String sCode) {\n\t\tif (sCode != null) {\n\t\t\tvecLines.add(sCode);\n\t\t}\n\t}", "private void addNewLine(StringBuilder builder, String line){\r\n\t\tbuilder.append(line);\r\n\t\tbuilder.append(\"\\n\");\r\n\t}", "public Builder add(String line) {\n this.contentBuilder.append(line);\n return this;\n }", "public void addPolyLine() {\n abstractEditor.drawNewShape(new ELineDT());\n }", "public void endLine() {\n if (currentLine != null) {\n lines.add(currentLine);\n currentLine = null;\n }\n }", "public void addLineNum(int lnNum)\n {\n //checks if this is the first instance of the word.\n if(lineNums.isEmpty())\n lineNums.append(lnNum);\n //checks if the word has already been seen on that line before adding it.\n //only works if the file is read in order.\n else if(lineNums.lastPos() != lnNum)\n lineNums.append(lnNum);\n }", "public void addEmptyLine() {\n addLine(\"\");\n }", "org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ExternalOrderLine addNewExternalOrderLine();", "public void addLine(Line l) {\n\t\tlines.add(l);\n\t\t// vypocitaj bounding rect\n\t\tfloat x, y, w, h;\n\t\tif (l.getX1() < l.getX2()) {\n\t\t\tx = l.getX1();\n\t\t\tw = l.getX2() - l.getX1();\n\t\t} else {\n\t\t\tx = l.getX2();\n\t\t\tw = l.getX1() - l.getX2();\n\t\t}\n\t\tif (l.getY1() < l.getY2()) {\n\t\t\ty = l.getY1();\n\t\t\th = l.getY2() - l.getY1();\n\t\t} else {\n\t\t\ty = l.getY2();\n\t\t\th = l.getY1() - l.getY2();\n\t\t}\n\t\tif (boundingRect==null) {\n\t\t\tboundingRect = new Rectangle(x, y, w, h);\n\t\t} else {\n\t\t\tif (x < boundingRect.getX()) {\n\t\t\t\tboundingRect.setX(x);\n\t\t\t}\n\t\t\tif (y < boundingRect.getY()) {\n\t\t\t\tboundingRect.setY(y);\n\t\t\t}\n\t\t\tif (w > boundingRect.getW()) {\n\t\t\t\tboundingRect.setW(w);\n\t\t\t}\n\t\t\tif (h > boundingRect.getH()) {\n\t\t\t\tboundingRect.setH(h);\n\t\t\t}\n\t\t}\n\t}", "public void addAssemblyLine(AssemblyLine line) {\n\t\tlines.add(line);\n\t}", "public void addValueLine(String line) {\n\t\tvaluesBuilder.append(line);\n\t\tif (!line.endsWith(NEW_LINE)) {\n\t\t\tvaluesBuilder.append(NEW_LINE);\n\t\t}\n\t\tthis.dirtyAttributes.add(Constants.VALUES);\n\t}", "public void setLine ( String value )\n {\n line = value;\n }", "public void addLine(int lineno, String line)\n throws AbnormalTerminationException {\n this._lines.add(new MacroLineFactory().parseLine(line, lineno, this));\n }", "public void addActualExpenseLine(ActualExpense line) {\n line.setDocumentLineNumber(getActualExpenses().size() + 1);\n final String sequenceName = line.getSequenceName();\n final Long sequenceNumber = getSequenceAccessorService().getNextAvailableSequenceNumber(sequenceName, ActualExpense.class);\n line.setId(sequenceNumber);\n line.setDocumentNumber(this.documentNumber);\n notifyChangeListeners(new PropertyChangeEvent(this, TemPropertyConstants.ACTUAL_EXPENSES, null, line));\n getActualExpenses().add(line);\n logErrors();\n }", "protected void append(String line) {\n\t\t\tout.append(line);\n\t\t}", "public void processAddLine() {\n AppTextColorEnterDialogSingleton dialog = AppTextColorEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Metro Line\", \"Enter Name and Color of the Metro Line:\", Color.web(\"#cccc33\"));\n\n // IF THE USER SAID YES\n if (dialog.getSelection()) {\n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_LINE_MODE);\n }\n }", "public abstract AbstractLine newLine() throws IOException;", "public void addPoint(Point p) {\r\n line.add(p);\r\n }", "Line createLine();", "public void makeLine() {\n \t\tList<Pellet> last_two = new LinkedList<Pellet>();\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 2));\n \t\tlast_two.add(current_cycle.get(current_cycle.size() - 1));\n \n \t\tPrimitive line = new Primitive(GL_LINES, last_two);\n \t\tMain.geometry.add(line);\n \n \t\tActionTracker.newPolygonLine(line);\n \t}", "public void addLine(String codeLine) {\n checkNotNull(codeLine);\n CodeLine line = new CodeLine(codeLine, currentDepth);\n codeLines.add(line);\n }", "public void lineTo(double x, double y)\n {\n\tPoint2D pos = transformedPoint(x,y);\n\tdouble tx = pos.getX();\n\tdouble ty = pos.getY();\n\t\n\tLine line = new Line(_currentx, _currenty, tx, ty);\n\n\tSystem.out.println(\"+Line: \" + line.toString());\n\t_currentPath.add(line);\n\t_currentx = tx;\n\t_currenty = ty;\n }", "public static void addLine(String string, int line) {\r\n\t\tif(string.length() > lineLength)\r\n\t\t\tstring = string.substring(0, lineLength);\r\n\t\telse if(string.length() < lineLength)\r\n\t\t\tstring = string + repeatString(\" \", lineLength - string.length());\r\n\t\tLCD.drawString(string, 0, line);\r\n\t}", "void putLine(String line);", "public void computeLine ()\r\n {\r\n line = new BasicLine();\r\n\r\n for (GlyphSection section : glyph.getMembers()) {\r\n StickSection ss = (StickSection) section;\r\n line.includeLine(ss.getLine());\r\n }\r\n\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\r\n line + \" pointNb=\" + line.getNumberOfPoints() +\r\n \" meanDistance=\" + (float) line.getMeanDistance());\r\n }\r\n }", "public void setLine (int Line);", "private void moveLineOn() {\n getScroller().startScroll(getOffsetX(),getOffsetY(),0,getLineHeight(),0);\n }", "public static void addLine(File file, String lineToAdd) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n\n while ((line = in.readLine()) != null) {\n vLines.add(line + \"\\n\");\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.write(lineToAdd);\n out.close();\n }", "void markLine() {\n lineMark = cursor;\n }", "public void setLine(int line);", "public void newLine()\n {\n rst += NEW_LINE;\n }", "public void addLines(ArrayList<Dialog> lines) {\n\t\tdecoupleGenericLines(lines);\n\t\tDialogueSystem.GLOBAL_DIALOG_LIST.addAll(lines);\n\t}", "public Log agregar(String linea) {\n cadenas.add(linea);\n return this;\n }", "public void newLine() {\n text.append(\"\\n\");\n }", "private static void lineTo(float x, float y) {\n setPenDown();\n mPivotX = mPenX = x;\n mPivotY = mPenY = y;\n mPath.lineTo(x * mScale, y * mScale);\n elements.add(\n new PathElement(ElementType.kCGPathElementAddLineToPoint, new Point[] {new Point(x, y)}));\n }", "public void setline(String line) {\n\t\t_line = line;\n\t}", "private void addLine()\n{\n BaleElement first = null;\n BaleElement last = null;\n BaleElement eol = null;\n boolean havecmmt = false;\n for (BaleElement ce : line_elements) {\n eol = ce;\n if (!ce.isEmpty() && !ce.isComment()) {\n\t if (first == null) first = ce;\n\t last = ce;\n }\n else if (ce.isComment()) havecmmt = true;\n }\n\n if (first != null && cur_parent.isComment()) cur_parent = cur_parent.getBaleParent();\n if (first == null && !cur_parent.isComment() && !havecmmt) ++num_blank;\n else if (first != null || cur_parent.isComment()) num_blank = 0;\n\n // fix outer parent to ensure it includes this line\n fixOuterParent(first,last,eol);\n\n // Create nodes for block comments\n BaleElement.Branch cpar = null;\n if (first == null) {\n if (!cur_parent.isComment() && (havecmmt || num_blank >= 2)) {\n\t cpar = new BaleElement.BlockCommentNode(for_document,cur_parent);\n\t addElementNode(cpar,num_blank);\n\t cpar.setAstNode(cur_ast);\n\t cpar.setStartTokenState(token_state);\n\t cur_parent = cpar;\n }\n }\n\n if (cpar != null && cur_parent != cpar) {\n BoardLog.logE(\"BALE\",\"UNUSED COMMENT\");\n }\n\n // Add the current line\n BaleElement.Branch lastpar = cur_parent;\n cur_line = new BaleElement.LineNode(for_document,cur_parent);\n cur_line.setAstNode(cur_ast);\n cur_line.setStartTokenState(token_state);\n addElementNode(cur_line,0);\n cur_parent = cur_line;\n\n boolean haveindent = true;\n for (BaleElement ce : line_elements) {\n fixInnerParent(ce);\n ce = fixLeafElement(ce,haveindent);\n haveindent = false;\n addElementNode(ce,0);\n token_state = ce.getEndTokenState();\n }\n\n cur_line.setEndTokenState(token_state);\n cur_parent = lastpar;\n cur_line = null;\n}", "public void addCompositeLine(CompositeLine col) {\n\t\tcl.add(col);\n\t}", "public void lineDraw(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2) {\n Line l = new Line((int) l1.data.xCo, (int) l1.data.yCo, (int) l2.data.xCo, (int) l2.data.yCo);\n l.setTranslateX(mapImage.getLayoutX());\n l.setTranslateY(mapImage.getLayoutY());\n ((Pane) mapImage.getParent()).getChildren().add(l);\n }", "public OMAbstractLine() {\n super();\n }", "private void drawLine(double x1, double y1, double x2, double y2) {\r\n\t\tGLine line = new GLine(x1,y1,x2,y2);\r\n\t\tadd(line);\r\n\t}", "void showNewLine(String lineNumber, String directionId);", "public void addLines(){\n\t\tif (controlPoints.size() == 1) return;\n\t\t\n\t\tif (lineLists.size() < controlPoints.size()-1){\n\t\t lineLists.add(new LinkedList<Line>());\n\t\t}\n\t\t\n\t\t\n\t\tint numControlLines = controlPoints.size() - 1;\n\t\t\n\t\tfor (int i = 0; i < numControlLines; i++){\n\t\t\tLine line = new Line();\n\t\t\tif (i == 0){\n\t\t\t\tline.setStroke(Color.LIGHTGRAY);\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showPrimaryLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t\tline.toBack();\n\t\t\t} else {\n\t\t\t\tdouble hue = 360 * (((i-1)%controlPoints.size())/(double)controlPoints.size());\n\t\t\t\tdouble sat = .4;\n\t\t\t\tdouble bri = .8;\n\t\t\t\tline.setStroke(Color.hsb(hue, sat, bri));\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showSubLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t}\n\t\t\tLinkedList<Line> list = lineLists.get(i);\n\t\t\tlist.add(line);\n\t\t}\n\t}", "private void defineLinePoints(int x1, int y1,int x2,int y2){\n Line line1 = new Line(x1, y1, x2, y2);\n for(int i = 0; i < line1.points.size(); i++){\n super.points.add(line1.points.get(i));\n }\n }", "protected void writeLine(String line) throws IOException {\n writer.write(line);\n writer.write(EOL);\n }", "private void processLine(String line, String fileName) {\n splitedLine = textProcess.lemmatize(line);\n indexer.addLineToDoc(fileName, splitedLine);\n }", "void storeline(String linebuffer, fileInfo pinfo) {\n\t\tint linenum = ++pinfo.maxLine; /* note, no line zero */\n\t\tif (linenum > fileInfo.MAXLINECOUNT) {\n\t\t\tSystem.err.println(\"MAXLINECOUNT exceeded, must stop.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tpinfo.symbol[linenum] = node.addSymbol(linebuffer, pinfo == oldinfo,\n\t\t\t\tlinenum);\n\t}", "@Override\n public void lineTo(double x, double y) {\n graphicsEnvironmentImpl.lineTo(canvas, x, y);\n }", "private void addLineToSegments(Pair newPair){\n\t\tfor(int i =0; i < npairs;i++){\n\t\t\tint result = slopeCompare(mypairs[i],newPair);\n\t\t\tif(result == -1) continue;\n\t\t\tif(result == 1) mypairs[i] = newPair;\n\t\t\treturn;\n\t\t}\n\t\t//Add to segment\n\t\tresize();\n\t\tmypairs[npairs] = newPair;\n\t\tnpairs++;\n\t}", "private void addLine(int number, int x, int y, int z) {\n grid[x][y][z] = \"L\" + number;\n }", "public void drawLine(float[] line) {\n\t\tparent.line(line[0], line[1], line[2], line[3]);\n\t}", "@Override\n public Line getLine() {\n return line;\n }", "public void setLineId(String line_id)\r\n {\r\n this.line_id = line_id;\r\n }", "public void setLine(String line) {\n this.line = line;\n //System.out.println(this.line + \" \" + line);\n }", "public abstract AbstractLine newLine(byte[] data) throws IOException;", "@SuppressWarnings(\"unchecked\")\n\tpublic void addChatLine(String name, String line){\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tListBox lb = nifty.getScreen(\"hud\").findNiftyControl(\"listBoxChat\",ListBox.class);\n\t\tif (line.length() + name.length() > 55){\n\t\t\twhile (line.length() > 35){\n\t\t\t\tString splitLine = line.substring(0,35);\n\t\t\t\tlb.addItem(\"<\"+name+\">\"+\": \"+splitLine);\n\t\t\t\tline = line.substring(35);\n\t\t\t}\n\t\t}\n\t\tlb.addItem(\"<\"+name+\">\"+\": \"+line);\n\t\tlb.showItem(lb.getItems().get(lb.getItems().size()-1));\n\t}", "private void addLine(int textStart, int textEnd, boolean isDisjoin, LayoutContext lc, boolean glue) {\n //String s = new String(text, textStart,textEnd-textStart);\n int xx = style.getControlAlignment(true); //flsobral@tc126: use the new method to get the line's alignment.\n if (xx == 0 || xx == Control.LEFT) {\n xx = lc.nextX; //flsobral@tc126: always use nextX when left aligned.\n }\n int yy = lc.nextY;\n if (glue) {\n yy -= Edit.prefH;\n }\n if (lc.atStart()) {\n yy += style.topMargin;\n }\n TextLine l = new TextLine(textStart, textEnd);\n parent.add(l);\n l.setFont(font);\n if (style.alignment == Style.ALIGN_LEFT) {\n lc.verify(l.getPreferredWidth());\n }\n l.setRect(xx, yy, PREFERRED, PREFERRED);\n if (style.alignment == Style.ALIGN_CENTER || style.alignment == Style.ALIGN_RIGHT) {\n l.setRect(xx, KEEP, KEEP, KEEP, lc.parentContainer); //flsobral@tc126: make line relative to the layout context parent container when aligned with center or right.\n }\n if (isDisjoin) {\n lc.disjoin();\n } else {\n lc.update(l.getWidth());\n }\n lc.lastControl = l;\n }", "public void addLine(LabelLine labelLine) {\n\n\t\tfloat fLineHeight = labelLine.getHeight();\n\t\tfloat fLineWidth = labelLine.getWidth();\n\n\t\tif ((fLineWidth + 2.0f * CONTAINER_BOUNDARY_SPACING) > fWidth) {\n\t\t\tfWidth = fLineWidth + 2.0f * CONTAINER_BOUNDARY_SPACING;\n\t\t}\n\n\t\tfloat fXLinePosition = fXContainerLeft + CONTAINER_BOUNDARY_SPACING;\n\t\tfloat fYLinePosition;\n\n\t\tif (alLabelLines.size() == 0) {\n\t\t\tfHeight += 2.0f * CONTAINER_BOUNDARY_SPACING + fLineHeight;\n\t\t\tfYLinePosition = fYContainerCenter + (fHeight / 2.0f)\n\t\t\t\t\t- CONTAINER_BOUNDARY_SPACING - fLineHeight;\n\t\t} else {\n\t\t\tfHeight += CONTAINER_LINE_SPACING + fLineHeight;\n\t\t\tupdateLinePositions();\n\t\t\tLabelLine lastLine = alLabelLines.get(alLabelLines.size() - 1);\n\t\t\tfYLinePosition = lastLine.getPosition().y() - CONTAINER_LINE_SPACING\n\t\t\t\t\t- fLineHeight;\n\t\t}\n\n\t\tlabelLine.setPosition(fXLinePosition, fYLinePosition);\n\t\talLabelLines.add(labelLine);\n\t}", "public void add(String line, int lineNumber) {\n\t\t\tint splitIndex = line.indexOf('=');\n\t\t\tif (splitIndex < 0) {\n\t\t\t\terror(lineNumber, \"Missing required \\\"=\\\" for propery line: \\\"\" + line + \"\\\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tString key = line.substring(0, splitIndex).trim();\n\t\t\tString value = line.substring(splitIndex + 1, line.length()).trim();\n\t\t\tif (key.isBlank()) {\n\t\t\t\terror(lineNumber, \"Missing key for propery line: \\\"\" + line + \"\\\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value.isBlank()) {\n\t\t\t\terror(lineNumber, \"Missing value for propery line: \\\"\" + line + \"\\\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (properties.containsKey(key)) {\n\t\t\t\terror(lineNumber, \"Duplicate key found in this file!: \\\"\" + key + \"\\\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tproperties.put(key, value);\n\t\t\tlineNumbers.put(key, lineNumber);\n\n\t\t}", "public void agregar_linea(RecyclingImageView c)\n {\n array_lineas.add(c);\n }", "private void lineCheck(int linesToAdd) {\n\n\t\tTermio terminal = new Termio();\n\n\t\tif (lineCount >= maxLinesDisplayed) {\n\n\t\t\tlineCount = 0;\n\t\t\tSystem.out.print(\"\\n*** Press Enter To Continue ***\");\n\t\t\tterminal.keyboardReadChar();\n\n\t\t} else {\n\n\t\t\tlineCount += linesToAdd;\n\n\t\t} // if\n\n\t}", "protected boolean appendLine(final String filename, final String line) {\n final StringBuilder finalLine = new StringBuilder();\n \n if (addtime) {\n String dateString;\n try {\n final DateFormat dateFormat = new SimpleDateFormat(timestamp);\n dateString = dateFormat.format(new Date()).trim();\n } catch (IllegalArgumentException iae) {\n // Default to known good format\n final DateFormat dateFormat = new SimpleDateFormat(\"[dd/MM/yyyy HH:mm:ss]\");\n dateString = dateFormat.format(new Date()).trim();\n \n eventBus.publishAsync(new UserErrorEvent(ErrorLevel.LOW, iae,\n \"Dateformat String '\" + timestamp + \"' is invalid. For more information: \"\n + \"http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html\",\n \"\"));\n }\n finalLine.append(dateString);\n finalLine.append(' ');\n }\n \n if (stripcodes) {\n finalLine.append(Styliser.stipControlCodes(line));\n } else {\n finalLine.append(line);\n }\n \n try {\n final BufferedWriter out;\n if (openFiles.containsKey(filename)) {\n final OpenFile of = openFiles.get(filename);\n of.lastUsedTime = System.currentTimeMillis();\n out = of.writer;\n } else {\n out = new BufferedWriter(new FileWriter(filename, true));\n openFiles.put(filename, new OpenFile(out));\n }\n out.write(finalLine.toString());\n out.newLine();\n out.flush();\n return true;\n } catch (IOException e) {\n /*\n * Do Nothing\n *\n * Makes no sense to keep adding errors to the logger when we can't write to the file,\n * as chances are it will happen on every incomming line.\n */\n }\n return false;\n }", "public void addLines(String file, ArrayList<Integer> lines) {\r\n\t\tif (!this._fileLines.containsKey(file))\r\n\t\t\tthis._fileLines.put(file, new ArrayList<Integer>());\r\n\t\tthis._fileLines.get(file).addAll(lines);\r\n\t}", "public void lineTo(int x, int y){\n paint.setColor(Color.parseColor(\"#000000\"));\n //ToDo: implement line drawing here\n\n canvas.drawLine(lastX, lastY, x, y, paint);\n lastX = x;\n lastY = y;\n Log.d(\"Canvas Element\", \"drawing line from: \" + lastX + \", \" + lastY +\",\" + \" to: \" + x +\", \" + y);\n }", "public Log nuevaLinea() {\n cadenas.add(\"\\n\");\n return this;\n }", "public void setLinePos(int linePos) {\n this.linePos = linePos;\n }", "public abstract void newLine();", "public void line(String line, int lineNumber) {\n\t\t\tline(line);\n\t\t}", "void endLine() {\n\t\tif (loaded != null && loaded.length() > 0) {\n\t\t\tlineContainer.set(loaded.toString());\n\t\t}\n\t\tloaded = new StringBuilder();\n\t}", "public void newLogFileLine(String line) {\n System.out.println(line);\n }", "public void addPriorityLine(Dialog line, NFPlayer player) {\n\t\t\n\t\tDialog[] temp = new Dialog[1];\n\t\t\n\t\tif(this.requiredDialog.get(player.getUUID()) != null) {\n\t\t\ttemp = this.requiredDialog.get(player.getUUID());\n\t\t} else {\n\t\t\ttemp[0] = line;\n\t\t}\n\t\t\n\t\tthis.requiredDialog.put(player.getUUID(), temp);\n\t}", "void updateLines(HashMap<String, List<TimedLineProblem>> problemsToAdd);", "@Override\n public void onLineInserted(int y, String line) {\n if (cursor.getY() == file.getLineCount() - 1) {\n if (file.getLineCount() > 1) {\n throw new IllegalStateException();\n }\n return;\n }\n if (y <= cursor.getY()) {\n cursor.moveBy(1, 0);\n }\n fireSizeChanged();\n }", "public void newChatLine(String line) {\n\t\tSystem.out.println(line);\n\t}", "public void addLine(String startNode, String endNode) {\n int startIndex =Integer.parseInt(startNode);\n int endIndex = Integer.parseInt(endNode);\n\n if (startIndex >= 0 && endIndex >= 0) {\n// visited[startIndex]=-1;\n// visited[endIndex]=-1;\n adjacencyMatrix[startIndex][endIndex] = 1;\n }\n }", "public ActionScriptBuilder line(String scriptLine){\n\t\tscriptLine.replace(\"\\n\", \" \");\n\t\tactionScriptLines.add(scriptLine);\n\t\treturn this;\n\t}", "@Override\r\n\tpublic void itemAdded() {\r\n\t\tif (sendLines.size() == 1){\r\n\t\t\tgrblPort.addNewLineListener(this);\r\n\t\t\tgrblPort.sendDataLine(sendLines.get(0));\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void setLineTime( float newLineTime )\n\t{\n\t\tlineTime = newLineTime;\n\t}", "private void updatePolyLine(LatLng latLng) {\n List<LatLng> points = polyLine.getPoints();\n points.add(latLng);\n polyLine.setPoints(points);\n }", "public void addHelpLine(String line)\r\n\t{\r\n\t\thelpLines.add(line);\r\n\t}", "public MAJOR_JAVA_TYPE addLine(MAJOR_JAVA_TYPE v) {\n\t\tlines++;\n\t\tlog.trace(\"Registering `{}` in line {}\", v, lines);\n\n\t\tif (v == null) {\n\t\t\tnullLines++;\n\t\t}\n\t\telse {\n\t\t\tregisterValue(v);\n\t\t}\n\t\treturn v;\n\t}", "public void newLine()\n\t{\n\t\toutput.append(\"\\n\");\n\t}", "private void appendToPane(String line, boolean comment) {\n\n Color textColor;\n if (comment) {\n textColor = theme.getDisabledTextColor();\n } else {\n textColor = theme.getForegroundColor();\n }\n StyleContext styleContext = StyleContext.getDefaultStyleContext();\n AttributeSet attributeSet = styleContext.addAttribute(SimpleAttributeSet.EMPTY,\n StyleConstants.Foreground, textColor);\n\n int length = queryTextPane.getDocument().getLength();\n if (length == queryTextPane.getCaretPosition()) {\n queryTextPane.setCharacterAttributes(attributeSet, false);\n queryTextPane.replaceSelection(line);\n } else {\n queryTextPane.setCaretPosition(length);\n queryTextPane.setCharacterAttributes(attributeSet, false);\n queryTextPane.replaceSelection(line);\n }\n }" ]
[ "0.7852864", "0.78481245", "0.7782374", "0.74158436", "0.7328401", "0.7214674", "0.71765435", "0.71512175", "0.7074357", "0.70353484", "0.69965965", "0.6983149", "0.69727725", "0.695723", "0.69443893", "0.6889224", "0.68708616", "0.6870325", "0.6852695", "0.6844908", "0.68308866", "0.6776387", "0.66509897", "0.66422343", "0.66262794", "0.6625848", "0.66174173", "0.66158235", "0.66156167", "0.66040933", "0.6585584", "0.6568957", "0.6559969", "0.6559719", "0.65470874", "0.65174973", "0.6515457", "0.64387953", "0.64161694", "0.63952565", "0.63937277", "0.6383414", "0.6377836", "0.6353078", "0.6335755", "0.6326368", "0.6324422", "0.63234246", "0.63199145", "0.6316943", "0.6304637", "0.63029647", "0.6298047", "0.6285429", "0.6284037", "0.626579", "0.6260222", "0.6258919", "0.62510574", "0.62399507", "0.6232044", "0.62189823", "0.6194762", "0.61881316", "0.6181374", "0.61810195", "0.61803854", "0.6171648", "0.6133188", "0.6127673", "0.612353", "0.6120726", "0.6116421", "0.6111281", "0.6109706", "0.6109496", "0.6106464", "0.6102092", "0.60916984", "0.6082836", "0.60742086", "0.60658455", "0.60482025", "0.60363793", "0.60332084", "0.602721", "0.60219914", "0.6004813", "0.5993536", "0.59870327", "0.5983277", "0.5970215", "0.5969813", "0.59650326", "0.5961471", "0.5952682", "0.59345424", "0.59338236", "0.59319186", "0.5924778" ]
0.8163847
0
Print the details of the display item list
private void print(InputFieldSet inputFieldSet, DisplayAttributesSet displayAttributeSet, DisplayItemList displayItems) throws EQException { // display all details for (IDisplayItem displayItem : displayItems) { if (displayItem instanceof DisplayAttributes) { DisplayAttributes displayAttributes = (DisplayAttributes) displayItem; InputField inputField = inputFieldSet.getInputField(displayAttributes.getId()); if (printHiddenFields || !displayAttributes.getVisible().equals(DisplayAttributes.VISIBLE_NO)) { printField(inputField, displayAttributes); } } else if (displayItem instanceof DisplayGroup) { DisplayGroup displayGroup = (DisplayGroup) displayItem; // non-repeating group only if (displayGroup.getRepeatingGroup().length() == 0) { if (printHiddenFields || !displayGroup.getVisible().equals(DisplayAttributes.VISIBLE_NO)) { print(inputFieldSet, displayAttributeSet, displayGroup.getDisplayItems()); } } // repeating group else { printRepeatingData(functionDataAft.getRepeatingDataManager(displayGroup.getRepeatingGroup()), inputFieldSet, displayGroup); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void printItems();", "public void print() {\n for (Entry entry : listentries) {\n System.out.println(\"These are the tasks currently on your lists:\");\n System.out.println(\"Name of Task:\" + entry.getName());\n System.out.println(\"Status:\" + entry.getStatus());\n System.out.println(\"Due Date:\" + entry.getDueDate());\n System.out.println(\"Days Left To do Tasks:\" + entry.getDaysLeft());\n }\n }", "@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public void display() {\r\n System.out.println(\" Cart Information \" + System.lineSeparator() +\r\n \"=========================\" + System.lineSeparator() +\r\n \"Customer ID: \" + getCustID() + System.lineSeparator() + \r\n \"Cart Total: \" + getTotal()+ System.lineSeparator());\r\n items.display();\r\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void printList() {\n userListCtrl.showAll();\n }", "private void displayItem(){\n synchronized(this){\n for(ClientHandler client : clientArray){\n client.getOutput().println(\"\" + currentItem.getItem() +\n \" price starts at \" + currentItem.getStartingPrice() +\n \".\\n\");\n }\n }\n }", "private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }", "public String showItemInfo()\n {\n return \"The room has 1 \" + currentItem.getDescription() \n + \" weighted \" + currentItem.getWeight() + \" pounds\"; \n }", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "public void showInformation() {\n\t\tSystem.out.println(\"Title: \" + getTitle());\n\t\tSystem.out.println(\"Time: \" + getTime());\n\t\tSystem.out.println(\"Number: \" + getNumber());\n\t}", "public void print() {\n\t\tif (cs213.isEmpty()) {\n\t\t\tSystem.out.println(\"List is empty!\");\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tcs213.print();\n\t\t}\n\t\treturn;\n\t\t}", "public static void print()\n {\n ProductGUI.Display(\"\\n\");\n for(Product element: productList)\n {\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }", "void printList() {\n BookList current = this;\n\n while (current.next!=null){\n current.book.display();\n current = current.next;\n if (current.next == null){\n current.book.display();\n }\n }\n \n }", "void examineItems(){\n\t\t\tif (!this.items.isEmpty())\n\t\t\t\tfor (int i = 0; i < this.items.size(); i++)\n\t\t\t\t\tSystem.out.print(this.items.get(i).itemName + \", \");\n\t\t}", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "public void print() {\n System.out.println(\"**List of books in the library.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "void displayDetails(String title, String description);", "public static void displayList(ExtendedListInterface aList) throws ListException {\r\n Object dataItem;\r\n\r\n for (int index = 1; index < aList.size(); index++){\r\n dataItem = aList.get(index);\r\n System.out.print(dataItem + \", \");\r\n }\r\n if (aList.size() >= 1) {\r\n dataItem = aList.get(aList.size());\r\n System.out.println(dataItem + \".\");\r\n } else {\r\n throw new ListException(\"displayList on an empty list\");\r\n }\r\n }", "public void printItems()\n {\n if (getItems().size()==0){\n System.out.println(\"There are no items in this room.\");\n }\n else{\n System.out.print(\"The item(s) in this room are: \");\n int i=0;\n while(i<getItems().size()){\n if(i<getItems().size()-1){\n System.out.print(getItems().get(i).getName()+\", \");\n }\n else{\n System.out.println(getItems().get(i).getName()+\".\");\n }\n i++;\n }\n }\n }", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\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}", "public void display() {\n System.out.println(\"Title: \" + this.title);\n System.out.println(\"Description: \" + this.des);\n System.out.println(\"Price Per Night: $\" + this.price);\n System.out.println(\"Max Guests: \" + this.guests);\n System.out.println(\"Length of stay: \" + this.days + \" days\");\n System.out.println(\"Total for stay: $\" + this.total);\n System.out.println(\"-----------------------------------\");\n }", "public static void displayProductsList(List list){\r\n Iterator iter = list.iterator();\r\n if (!iter.hasNext()){\r\n System.out.println(\"No products to display.\");\r\n return;\r\n }\r\n while (iter.hasNext()){\r\n Product product = (Product) iter.next();\r\n String msg = product.getSupplier().getName() + \"\\t\";\r\n msg += product.getName() + \"\\t\";\r\n msg += product.getPrice() + \"\\t\";\r\n msg += product.getDescription();\r\n System.out.println(msg);\r\n }\r\n }", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "public void showSupplierList(){\n\t\tfor(int i = 0; i<supplierList.size();i++) {\n\t\t\tSystem.out.println(supplierList.get(i).getSupID()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getCompanyName()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getAddress()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getSaleRep());\n\t\t}\n\t}", "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public String displayDetails()\n\t{\n\t\tString displayDetail = \"\";\n\t\t \n\t\tdisplayDetail = (\"Make of your System\\t\\t=>\\t\" + make + \n\t\t\t\t\t\t\"\\nModel of your System\\t\\t=>\\t\" + model + \n\t\t\t\t\t\t\"\\nSpeed of your System\\t\\t=>\\t\" + speed + \n\t\t\t\t\t\t\"\\nMemory of your System\\t\\t=>\\t\" + memorySize + \" MB \" +\n\t\t\t\t\t\t\"\\nHard Disk of your System\\t=>\\t\" + hardDiskSize + \" GB \" +\n\t\t\t\t\t\t\"\\nPurchase Cost of your System\\t=>\\t\" + purchaseCost);\n\t\t\n\t\treturn displayDetail;\n\t}", "public void printItems() {\n for (Item item1 : items) {\n System.out.println(item1.toString());\n }\n }", "public void print() {\r\n\t\tif(isEmpty()) {\r\n\t\t\tSystem.out.printf(\"%s is Empty%n\", name);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.printf(\"%s: %n\", name);\r\n\t\tNode<E> current = first;//node to traverse the list\r\n\t\t\r\n\t\twhile(current != null) {\r\n\t\t\tSystem.out.printf(\"%d \", current.data);\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "public void display() {\n\t\tSystem.out.println(\"[\" + recDisplay(head) + \"]\");\n\t}", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "void printList() {\n Entry<T> node = header;\n while(node!=null){\n System.out.print(node.element+\" \");\n node = node.next;\n }\n }", "void display() {\n System.out.println(\"============================================================================================\");\n System.out.println(\"Name of the book:: \" + Bname);\n System.out.println(\"Price of the book:: Rs \" + price);\n System.out.println(\"============================================================================================\");\n }", "void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }", "public void displayAll() {\n\t\tSystem.out.println(\"Title \"+this.getTitle());\n\t\tSystem.out.println(\"Artist \"+this.getArtist());\n\t\tSystem.out.println(\"Genre \"+this.genre);\n\t}", "public void displayDetails() {\r\n\t\tSystem.out.println(\"*******************Profile Details*********************\");\r\n\t\tSystem.out.println(\"\\tUsername :\\t\" + uName);\r\n\t\tSystem.out.println(\"\\tFull Name :\\t\" + fullName);\r\n\t\tSystem.out.println(\"\\tPhone :\\t\" + phone);\r\n\t\tSystem.out.println(\"\\tE-Mail :\\t\" + email);\r\n\t}", "public String showPlayListInformation(){\n\t\t\n\t\tString text = \"\";\n\t\t\n\t\treturn text;\n\t}", "public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public void print() {\n System.out.println(\"Code: \"+this.productCode);\n System.out.println(\"Name: \"+ this.productName);\n System.out.println(\"Price: \"+this.price);\n System.out.println(\"Discount: \"+this.discount+\"%\");\n }", "public String printGrabbedItems() {\n return \"Items in your inventory: \" + grabbedItems;\n }", "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}", "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 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}", "public String toString() {\r\n\t\treturn super.display() + \"\\n\" + listAllCards() + \r\n\t\t\t\t\"Purchased tickets: \\n\" + listAllTickets() +\r\n\t\t\t\t\"___________________________________________\";\r\n\t}", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "public String PrintInventoryList()\r\n {\r\n String inventoryInformation = \"\";\r\n\r\n System.out.println(\"Inventory: \");\r\n //You may print the inventory details here\r\n for (Product product: productArrayList) // foreach loop to iterate through the ArrayList\r\n {\r\n // TODO: check if this code is right\r\n inventoryInformation += product.getId() + \" \" + product.getName() + \" \" +\r\n product.getCost() + \" \" + product.getQuantity() + \" \" + product.getMargin() + \"\\n\";\r\n }\r\n System.out.println(inventoryInformation);\r\n return inventoryInformation;\r\n }", "public void Print(ActionEvent actionEvent) {\n //System.out.println(call.title);\n TitleDisplay.setText(\"\");\n for (int i = 0; i < call.getToDoListTitle().size(); i++) {\n text = \"Item #\" + (i + 1);\n TitleDisplay.appendText(text);\n TitleDisplay.appendText(\"\\n\");\n TitleDisplay.appendText(\"Name: \");\n TitleDisplay.appendText(call.getToDoListTitle().get(i));\n TitleDisplay.appendText(\"\\nDescription: \");\n TitleDisplay.appendText(call.getToDoListDescription().get(i));\n TitleDisplay.appendText(\"\\nDue Date: \");\n TitleDisplay.appendText(call.getToDoListDueDate().get(i));\n TitleDisplay.appendText(\"\\n\\n\");\n }\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "private void displayListings() {\r\n\r\n //Lists all current listings\r\n System.out.println(\"Current Listings: \\n\" + cars.getListings());\r\n placeBid();\r\n }", "public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }", "private static final void displayAttractionSummary()\r\n {\r\n System.out.println(\"Display Attraction Summary Feature Selected!\");\r\n System.out.println(\"--------------------------------------\");\r\n \r\n // step through array of attractions with for loop\r\n for(int i = 0; i < attractionCount; i++)\r\n {\r\n attractionList[i].printDetails();\r\n System.out.println();\r\n }\r\n }", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "public void print(){\n\t\tif(isEmpty()){\n\t\t\tSystem.out.printf(\"Empty %s\\n\", name);\n\t\t\treturn;\n\t\t}//end if\n\n\t\tSystem.out.printf(\"The %s is: \", name);\n\t\tListNode current = firstNode;\n\n\t\t//while not at end of list, output current node's data\n\t\twhile(current != null){\n\t\t\tSystem.out.printf(\"%s \", current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}//end while\n\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void displayActionItemScreen() throws SQLException, ClassNotFoundException {\n String item = console_actionItemList.getSelectionModel().getSelectedItem();\n all_teams();\n all_members();\n if(item != null && !item.isEmpty())\n getAction_Name().setDisable(true);\n actionItemClass obj = new actionItemClass();\n obj.displayActionItemScreen(this,item);\n }", "public void display(){\n if (this.listSize == 0){\n System.out.println(\"This is an empty list!\");\n return;\n }else if(this.head.getNextNode() == null){\n System.out.print(this.head.getData()); //single-node list\n return;\n }\n System.out.print(this.head.getData() + \" -> \"); //print out head node\n singlyListNode ptr = this.head.getNextNode();\n while(ptr.getNextNode() != null){\n System.out.print(ptr.getData() + \" -> \");\n ptr = ptr.getNextNode();\n }\n //when ptr reaches second last node\n System.out.println(ptr.getData());\n }", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public static void inventoryListHeader() {\n System.out.println(\n UI.prettyPrint(\"Items Name\", 15) + \" | \"\n + UI.prettyPrint(\"Price\", 10) + \" | \"\n + UI.prettyPrint(\"Quantity\", 5));\n }", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "public static void printMenu() {\n System.out.print(\"\\n(A)dd Item (R)emove Item (F)ind Item (I)nitialize Tree (N)ew Tree (Q)uit\\n\");\n }", "public void print(){\r\n\t\t\t\r\n\t\t\tint i=1;\r\n\t\t\t//Iterator<Receipt> iter=reciptlist.iterator();\r\n\t\t\t\r\n\t\t\tfor(Receipt R : reciptlist){\r\n\t\t\t\r\n\t\t\t\tSystem.out.println( \"--------------------------------------\");\r\n\t\t\t\tSystem.out.println( \"Reciet number: \" +i );\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println( \"ShoeType: \" + R.getShoeType());\r\n\t\t\t\t\tSystem.out.println( \" Amount: \" + R.getAmountSold());\r\n\t\t\t\t\tSystem.out.println( \" Discounted: \" + R.getDiscount());\r\n\t\t\t\t\tSystem.out.println( \" issuedTick : \" + R.getIssuedTick());\r\n\t\t\t\t\tSystem.out.println( \" requestd tick : \" + R.getRequestTick());\r\n\t\t\t\t\tSystem.out.println( \" customer : \" + R.getCustomer());\r\n\t\t\t\t\tSystem.out.println( \" seller : \" + R.getSeller());\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}", "public synchronized String getItemDetails(){\n \tString s = \"\\n========================================\";\n \ts += \"\\nID: \"+ ID;\n \ts += \"\\nName: \"+ item_name;\n \ts += \"\\nStarting Price: \"+ start_price;\n \ts += \"\\nNumber Of bidders: \" + bids.size();\n \ts += \"\\n status: \" + status;\n\n \tif(status == \"open\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: No bids yet\";\n \t\t}else{\n \t\t\ts += \"\\n last_bidder: \"+ last_bidderName;\n \t\t}\n \t}else if(status == \"closed\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: Closed with No bids\";\n \t\t}else{\n \t\t\ts += \"\\n Won by: \"+ last_bidderName +\" at price of \"+ start_price;\n \t\t}\n \t}\n \ts += \"\\n========================================\";\n return s;\n }", "public String visibleItems() {\n \tStringBuilder s = new StringBuilder(\"\");\n for (Item item : items) {\n if (item instanceof Visible && item.isVisible()) {\n s.append(\"\\nThere is a '\").append(item.detailDescription()).append(\"' (i.e. \" + item.description() + \" ) here.\");\n }\n }\n return s.toString();\n }", "public void print() {\r\n\t\tint size = list.size();\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"┌───────────────────────────┐\");\r\n\t\tSystem.out.println(\"│ \t\t\t성적 출력 \t\t │\");\r\n\t\tSystem.out.println(\"└───────────────────────────┘\");\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\r\n\t\t\tExam exam = list.get(i);\r\n\t\t\tint kor = exam.getKor();\r\n\t\t\tint eng = exam.getEng();\r\n\t\t\tint math = exam.getMath();\r\n\r\n\t\t\tint total = exam.total();// kor + eng + math;\r\n\t\t\tfloat avg = exam.avg();// total / 3.0f;\r\n\t\t\tSystem.out.printf(\"성적%d > 국어:%d, 영어:%d, 수학:%d\", i + 1, kor, eng, math);\r\n\t\t\tonPrint(exam);\r\n\t\t\tSystem.out.printf(\"총점:%d, 평균:%.4f\\n\", total, avg);\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"─────────────────────────────\");\r\n\r\n\t}", "public void displayMedicines(Medicine med) {\n System.out.printf(\"%10s %5s %30s %5s %20s %5s %20s %5s %15s %5s %10s\", \"ID\", \"|\", \"Generic Name\", \"|\", \"Brand Name\", \"|\", \"Type of Medicine\", \"|\", \"Price\", \"|\", \"Stock (Pieces)\\n\");\n System.out.printf(\"%s\", \"------------------------------------------------------------------------------------------------------------------------------------------------\\n\");\n for (int i = 0; i < med.getMedicineList().size(); i++) {\n System.out.printf(\"%10s %5s %30s %5s %20s %5s %20s %5s %15s %5s %10s \\n\", med.getMedicineList().get(i).getId(), \"|\", med.getMedicineList().get(i).getGenericName(), \"|\", med.getMedicineList().get(i).getBrandName(), \"|\", med.getMedicineList().get(i).getMedicineType(), \"|\", med.getMedicineList().get(i).getPrice(), \"|\", med.getMedicineList().get(i).getStock());\n }\n// System.out.printf(\"%30s %5s %20s %5s %20s %5s %15s %5s %10s\", \"Generic Name\", \"|\", \"Brand Name\", \"|\",\"Type of Medicine\",\"|\", \"Price\",\"|\", \"Stock (Pieces)\\n\");\n// System.out.printf(\"%s\", \"-------------------------------------------------------------------------------------------------------------------------------\\n\");\n// for(int i=0; i<med.getMedicineList().size();i++){\n// System.out.printf(\"%30s %5s %20s %5s %20s %5s %15s %5s %10s\", med.getMedicineList().get(i).getGenericName(), \"|\", med.getMedicineList().get(i).getBrandName(), \"|\",med.getMedicineList().get(i).getMedicineType(),\"|\", med.getMedicineList().get(i).getPrice(),\"|\", med.getMedicineList().get(i).getStock()+\"\\n\");\n// }\n }", "void display()\r\n\t{\r\n\t\tSystem.out.println(\"bikeid=\"+bikeid+\" bike name==\"+bikename);\r\n\t}", "public void print() {\r\n\t\tSystem.out.print(\"|\");\r\n\t\t//loop executes until all elements of the list are printed\r\n\t\tfor (int i=0;i<capacity;i++) {\r\n\t\t\tSystem.out.print(list[i]+\" |\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "private void viewActiveCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < activeCourseList.size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(activeCourseList.get(i));\n } else {\n System.out.println((i + 1) + \": \" + activeCourseList.get(i).getName());\n }\n }\n\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "@Override\r\n\tpublic void showList() {\n\t\tSystem.out.println(\"I am a MAC list\");\r\n\t}", "public void display() {\n System.out.println(\"Displaying Order properties:\\n Order ID number: \" + getOrderID() + \"\\n Customer ID Number: \" + getCustomerID() + \"\\n Order Status: \" + getStatus());\n }", "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 }" ]
[ "0.7610583", "0.75506574", "0.74809915", "0.7410634", "0.7286606", "0.7264083", "0.72454053", "0.72262895", "0.72046113", "0.7203087", "0.7193401", "0.718431", "0.7149147", "0.7134114", "0.71274793", "0.7046675", "0.704417", "0.70250785", "0.7021687", "0.699841", "0.697904", "0.6966743", "0.69506866", "0.6949546", "0.6945849", "0.6943747", "0.69309175", "0.69246083", "0.6912514", "0.6912", "0.6892314", "0.6891779", "0.6884923", "0.68824875", "0.6868405", "0.6857466", "0.6857015", "0.6844823", "0.68318385", "0.68228024", "0.68049777", "0.68047726", "0.67985934", "0.6798538", "0.67943805", "0.6783896", "0.67778987", "0.67747086", "0.67704594", "0.67424756", "0.6727507", "0.6716212", "0.67115045", "0.6704169", "0.66983134", "0.66956675", "0.6686181", "0.66647893", "0.666042", "0.6658173", "0.66548747", "0.6653824", "0.66522247", "0.66472256", "0.6631448", "0.663042", "0.6629238", "0.66282135", "0.6620551", "0.6619918", "0.6618104", "0.6609042", "0.66036403", "0.6601484", "0.66001105", "0.65947616", "0.6591535", "0.6588057", "0.65861267", "0.65829986", "0.6573995", "0.6564375", "0.65562564", "0.655335", "0.65526325", "0.65516484", "0.65471315", "0.6524827", "0.65215766", "0.65120095", "0.6510185", "0.6503992", "0.6498154", "0.6497044", "0.64906436", "0.6484929", "0.64802504", "0.6478568", "0.6478248", "0.6474791", "0.64700705" ]
0.0
-1
Print detail of a repeating data
private void printRepeatingData(RepeatingDataManager repeatingDataManager, InputFieldSet inputFieldSet, DisplayGroup dislayGroup) throws EQException { // print the repeating group id addLine(); String label = dislayGroup.rtvLabel(fhd.getEquationUser()); printerFormatter.printFieldTitle(label); addLine(); // loop through all the data repeatingDataManager.moveFirst(); while (repeatingDataManager.next()) { for (IDisplayItem displayItem : dislayGroup.getDisplayItems()) { if (displayItem instanceof DisplayAttributes) { DisplayAttributes displayAttributes = (DisplayAttributes) displayItem; InputField inputField = inputFieldSet.getInputField(displayAttributes.getId()); if (printHiddenFields || !displayAttributes.getVisible().equals(DisplayAttributes.VISIBLE_NO)) { printField(inputField, displayAttributes); } } } addLine(); } addLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print() {\r\n System.out.print(\"[id: <\" + this.id + \"> \");\r\n if (this.dimension > 0) {\r\n System.out.print(this.data[0]);\r\n }\r\n for (int i = 1; i < this.dimension * 2; i++) {\r\n System.out.print(\" \" + this.data[i]);\r\n }\r\n System.out.println(\"]\");\r\n }", "private void printData() {\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tlog(\" *** data index \" + i + \" = \" + data.elementAt(i));\n\t\t}\n\t}", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }", "private String printData() {\n reportStar += \"Total insert Stars: \" + insertStarStatus + \".\\n\";\n reportStar += \"Duplicates Stars found: \" + duplicatesStar + \". \\n\";\n return reportStar;\n }", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "private void printData() {\n\n System.out.println(\"No of Stars '\" + myStars.size() + \"'.\");\n\n// Iterator<Star> it = myStars.iterator();\n// System.out.println(\"First 20 in the list\");\n// int i=0;\n// while (it.hasNext()) {\n// System.out.println(it.next().toString());\n// i++;\n// if(i==19){\n// break;\n// }\n// }\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "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 void showInformation() {\n\t\tSystem.out.println(\"Title: \" + getTitle());\n\t\tSystem.out.println(\"Time: \" + getTime());\n\t\tSystem.out.println(\"Number: \" + getNumber());\n\t}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "@Override\n public String getRecordDetail() {\n return \"[\" + type + \"] \"\n + \"[\" + people + \" pax] \"\n + \"[\" + \"Total: $\" + amount + \"] \"\n + \"[\" + amountToMoney() + \" per person] \"\n + nameList;\n }", "@Override\n public String toString() {\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();\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "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}", "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 printInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nBill Summary :\");\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\t\t\tSystem.out.println(invoiceInfo[i].toString());\r\n\t\t}\r\n\t}", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "@Override\n public void visualize() {\n if (this.count() > 0){\n for (int i = 0; i < this.count(); i++){\n System.out.println(i + \".- \" + this.bench.get(i).getName() + \" (ID: \" + this.bench.get(i).getId() + \")\");\n }\n } else {\n System.out.println(\"La banca está vacía.\");\n }\n\n }", "void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }", "public void show() {\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < columnCount; j++)\n System.out.printf(\"%9.4f \", data[i][j]);\n System.out.println();\n }\n }", "public void print() {\n\tfor (int i = 0; i &lt; mCalendarMarkings.sizeCalendarMarkingList(); i++) {\n\t CalendarMarking marking = mCalendarMarkings.getCalendarMarking(i);\n\t // get first occurrence:\n\t Calendar firstDay = Calendar.getInstance();\n\t firstDay.setTimeInMillis(marking.getStartDate());\n\t RepetitionHandler handler = sHandlerMap.get(marking.getRepeatType());\n\t firstDay = handler.getFirst(firstDay, marking);\n\t printDate(firstDay);\n\t while (firstDay != null) {\n\t\tfirstDay = handler.getNext(firstDay, marking);\n\t\tprintDate(firstDay);\n\t }\n\t}\n }", "@Override\n public void print() {\n for (int i = 1; i <= itertion; i++) {\n if(n <0){\n this.result = String.format(\"%-3d %-3s (%-3d) %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }else {\n this.result = String.format(\"%-3d %-3s %-3d %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }\n }\n }", "public void debug()\r\n\t{\r\n\t\tfloat entriesPerSlot = (float) numEntries / (float) numFilledSlots;\r\n\r\n\t\tString result = \"Format of display is\\n\";\r\n\t\tresult += \"Slot number: data record\\n\\n\";\r\n\t\tresult += \"Current table size:\\t\\t\\t\\t\\t\\t\" + table.length + \"\\n\";\r\n\t\tresult += \"Number of elements in table:\\t\\t\\t\" + numEntries + \"\\n\";\r\n\t\tresult += \"Number of filled slots in table:\\t\\t\" + numFilledSlots + \"\\n\";\r\n\t\tresult += \"Average number of entries per slot is:\\t\" + entriesPerSlot + \"\\n\";\r\n\t\tSystem.out.println(result);\r\n\r\n\t\tfor (int i = 0; i < table.length; i++)\r\n\t\t{\r\n\t\t\t// If the current slot has a value in it\r\n\t\t\tif (table[i] != null && !table[i].isTombstone)\r\n\t\t\t{\r\n\t\t\t\t// Store the key that it stores\r\n\t\t\t\tresult = \"\\n\" + i + \":\\t\" + ((i < 100) ? \"\\t\" : \"\") + \"[\" + table[i].key.toString() + \", \";\r\n\r\n\t\t\t\t// Loop through all of the entries at that key\r\n\t\t\t\tfor (V entry : table[i].value)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Store the next value at that key\r\n\t\t\t\t\tresult += \"(\" + entry.toString() + \"), \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult = result.substring(0, result.length() - 2) + \"]\";\r\n\t\t\t\tSystem.out.println(result);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void print(){\r\n\t\t\t\r\n\t\t\tint i=1;\r\n\t\t\t//Iterator<Receipt> iter=reciptlist.iterator();\r\n\t\t\t\r\n\t\t\tfor(Receipt R : reciptlist){\r\n\t\t\t\r\n\t\t\t\tSystem.out.println( \"--------------------------------------\");\r\n\t\t\t\tSystem.out.println( \"Reciet number: \" +i );\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println( \"ShoeType: \" + R.getShoeType());\r\n\t\t\t\t\tSystem.out.println( \" Amount: \" + R.getAmountSold());\r\n\t\t\t\t\tSystem.out.println( \" Discounted: \" + R.getDiscount());\r\n\t\t\t\t\tSystem.out.println( \" issuedTick : \" + R.getIssuedTick());\r\n\t\t\t\t\tSystem.out.println( \" requestd tick : \" + R.getRequestTick());\r\n\t\t\t\t\tSystem.out.println( \" customer : \" + R.getCustomer());\r\n\t\t\t\t\tSystem.out.println( \" seller : \" + R.getSeller());\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}", "@Override\r\n\tpublic void print()\r\n\t{\t//TODO méthode à compléter (TP1-ex11)\r\n\t\tfor (IndexEntry indexEntry : data) {\r\n\t\t\tif(indexEntry ==null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(indexEntry.toString());\r\n\t\t}\r\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public String printDetail(){\r\n\t\tString str=\"Room Details: \\n\";\r\n\t\tString str1=\"\";\r\n\t\tString str2=\"\";\r\n\t\tString str3=\"\";\r\n\t\tString str4=\"\";\r\n\t\tstr3=\"\\tSeats: \"+this.getNumSeats()+\"\\n\";\r\n\t\tif(this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tHas Whiteboard\\n \";\r\n\t\tif(!this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tDoesn't have Whiteboard\\n\";\r\n\t\tif(this.hasChalkboard)\r\n\t\t\tstr2=\"\\tHas Chalkboard\\n \";\r\n\t\tif(!this.hasChalkboard)\r\n\t\t\tstr2=\"\\tDoen't have Chalkboard\";\r\n\t\tstr4=\"\\tAV Amenities: \"+this.getAVEquipmentList().toString()+\"\\n\";\r\n\t\tstr=str+str3+str1+str2+str4;\r\n\t\treturn str;\r\n\t}", "public void print() {\n System.out.print(datum+\" \");\n if (next != null) {\n next.print();\n }\n }", "@Override\n public String toString() {\n return detail;\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void print(){\n\t\t\n\t\tfor(int i=0;i<maxindex;i++)\n\t\t{\n\t\t\tif(data[i] != 0)\n\t\t\t{\n\t\t\t\tSystem.out.print(data[i]+\"x\"+i+\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "public void print() {\n for (int i = 0; i < headers.length; i++) {\n System.out.printf(headers[i] + \", \"); // Print column headers.\n }\n System.out.printf(\"\\n\");\n for (int i = 0; i < (data.length - 1); i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.printf(data[i][j] + \" \"); // Print value at i,j.\n }\n System.out.printf(\"\\n\");\n }\n }", "public void printSummary() {\n\t\tSystem.out.println(MessageFormat.format(\"\\nSummary:\\n Name: {0}\\n Range: 1 to {1}\\n\", this.name, this.numSides));\n\t}", "@Override\n\tpublic void showPatientDetails() {\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"S.No Patient's name ID Mobile Age\");\n\t\tfor (int i = 1; i <= UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i - 1);\n\t\t\tSystem.out.print(\" \" + i + \" \" + jsnobj.get(\"Patient's name\") + \" \" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t+ \" \" + jsnobj.get(\"Mobile\") + \" \" + jsnobj.get(\"Age\") + \"\\n\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic void display() {\n\t\tStringBuilder string = new StringBuilder();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hashArray[i] == null)\n\t\t\t\tstring.append(\"** \");\n\t\t\telse if (hashArray[i] == deleted)\n\t\t\t\tstring.append(hashArray[i].value + \" \");\n\t\t\telse\n\t\t\t\tstring.append(\"[\" + hashArray[i].value + \", \"\n\t\t\t\t\t\t+ hashArray[i].frequency + \"] \");\n\t\t}\n\t\tSystem.out.println(string.toString());\n\t}", "void display() {\n System.out.println(id + \" \" + name);\n }", "public void print() {\r\n\t\tint size = list.size();\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"┌───────────────────────────┐\");\r\n\t\tSystem.out.println(\"│ \t\t\t성적 출력 \t\t │\");\r\n\t\tSystem.out.println(\"└───────────────────────────┘\");\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\r\n\t\t\tExam exam = list.get(i);\r\n\t\t\tint kor = exam.getKor();\r\n\t\t\tint eng = exam.getEng();\r\n\t\t\tint math = exam.getMath();\r\n\r\n\t\t\tint total = exam.total();// kor + eng + math;\r\n\t\t\tfloat avg = exam.avg();// total / 3.0f;\r\n\t\t\tSystem.out.printf(\"성적%d > 국어:%d, 영어:%d, 수학:%d\", i + 1, kor, eng, math);\r\n\t\t\tonPrint(exam);\r\n\t\t\tSystem.out.printf(\"총점:%d, 평균:%.4f\\n\", total, avg);\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"─────────────────────────────\");\r\n\r\n\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public void printSpeciesData(){\n\n System.out.println(\"A \" + this.name + \" has \" + this.legs + \" legs, \" + this.numberOfWings +\n \" wings, it is \" + this.wingColor + \", and likes a plant called \" + this.favFlower);\n\n }", "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 void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "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 }", "@Override\n\tpublic void print() {\n\t\tSystem.out.println(\"Avaliable Media items are\");\n\t\t\n\t\tSystem.out.println(\"Identification Number number of copies title of item\");\n\n\t\t\t\tfor(int i =0; i<getTitle().length; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(getIdentificatioNumber()[i]+\" \"\n\t\t\t\t\t+getNumberOfCopies()[i]+\" \"+getTitle()[i]);\n\t\t\t\t}\n\t\t\t}", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\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 print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public String printPatronInfo(){\n String printingStr = \"\";\n if (this.servingPatron.getBooks().size() > 0){\n printingStr += \"The books currently checked out to this patron are:\";\n printingStr += '\\n';\n printingStr += \"{\";\n for (int i = 0;i < (this.servingPatron.getBooks().size());i++){\n this.numberedListOfServing.put(i+1, this.servingPatron.getBooks().get(i));\n //print the numbered list out!\n printingStr += (i+1);\n printingStr += \" : \";\n printingStr += this.servingPatron.getBooks().get(i).toString();\n printingStr += \"; \";\n }\n printingStr = printingStr.substring(0, printingStr.length()-2);\n printingStr += \"}\";\n }\n else {\n printingStr = \"This patron currently possesses no book. \";\n }\n return printingStr;\n }", "@Override\n public void showInfo() {\n System.out.println(\"Garage {\");\n System.out.println(\"\\tGarage is \" + (isBig ? \"big\" : \"small\"));\n int i = 0;\n for (T car : carsInGarage) {\n System.out.println(\"\\tCar №\" + i + \": \" + car.getShortInfo());\n i++;\n }\n System.out.println(\"}\");\n }", "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}", "public void print () \r\n\t{\r\n\t\tfor (int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\tif (index % 5 == 0) // print 5 columns\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\tSystem.out.print(array[index] + \"\\t\");\t// print next element\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn this.element +\" \"+duplicateCount+\" \"+probeCount;\n\t}", "public void print() {\r\n\t\tfor (int i = front; i <= rear; i++) {\r\n\t\t\tSystem.out.print(arr[i].getData() + \"\\t\");\r\n\t\t}\r\n\t}", "public void showSamples(){\n\t\tfor(int i=0; i<arrIns.size(); i++){\n\t\t\tfor(int j=0; j<arrIns.get(i).numAttributes(); j++){\n\t\t\t\tSystem.out.print(\" | \" + arrIns.get(i).value(j) + \" | \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void printDataset() {\n for (int i = 0; i < getNumPoints(); i++) {\n System.out.println(\"\\n\" + getPoint(i));\n }\n System.out.println(\" \");\n }", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "public void printData () {\n System.out.println (products.toString ());\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 }", "public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void print() {\r\n\t\tif(isEmpty()) {\r\n\t\t\tSystem.out.printf(\"%s is Empty%n\", name);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.printf(\"%s: %n\", name);\r\n\t\tNode<E> current = first;//node to traverse the list\r\n\t\t\r\n\t\twhile(current != null) {\r\n\t\t\tSystem.out.printf(\"%d \", current.data);\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void printt() {\n for (int i=0 ; i<number ; i++) {\n System.out.println(\"LAB\" + (i+1) + \" ON \" + labs[i].getDay() + \" TEACHING BY: \" + labs[i].getTeacher());\n for (int j=0 ; j<labs[i].getCurrentSize() ; j++) {\n System.out.println(labs[i].getStudents()[j].getFirstName() + \" \" + labs[i].getStudents()[j].getLastName() + \" \" + labs[i].getStudents()[j].getId() + \" \" +labs[i].getStudents()[j].getGrade());\n }\n System.out.println(\"THE CAPACITY OF THE LAB IS: \" + labs[i].getCapacity());\n System.out.println(\"THE AVERAGE IS : \" + labs[i].getAvg());\n System.out.println();\n }\n }", "public void print() {\n int n = getSeq().size();\n int m = n / printLength;\n for (int i = 0; i < m; i++) {\n printLine(i * printLength, printLength);\n }\n printLine(n - n % printLength, n % printLength);\n System.out.println();\n }", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \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}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void print() {\r\n\t\tSystem.out.println(\"** Metadata **\");\r\n\t\tfor (final Map<String, Object> m : _data) {\r\n\t\t\tSystem.out.println(\" + ALBUM\");\r\n\t\t\tfor (final String key : m.keySet()) {\r\n\t\t\t\tfinal Object o = m.get(key);\r\n\r\n\t\t\t\t// Most stuff is string, we can just dump that out.\r\n\t\t\t\tif (o instanceof String) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \": \" + (String) o);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (o instanceof ArrayList) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \":\");\r\n\t\t\t\t\tfor (final Object oo : (ArrayList<GracenoteMetadataOET>) o) {\r\n\t\t\t\t\t\tif (oo instanceof GracenoteMetadataOET) {\r\n\t\t\t\t\t\t\tfinal GracenoteMetadataOET oet = (GracenoteMetadataOET) oo;\r\n\t\t\t\t\t\t\toet.print();\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}", "public String print() {\n\t\tString offID = getID();\n\t\tString offName = getName();\n\t\tint offAge = getAge();\n\t\tString offState = getState();\n\t\tString data = String.format(\"ID: %-15s \\t Name: %-35s \\t Age: %-15s \\t State: %s\", offID, offName, offAge, offState);\n\t\treturn data;\n\t}", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\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 printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "public String printInfo()\n\t{\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tbuilder.append(AppID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(updateID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating - appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(twoStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(threeStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fourStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fiveStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar + twoStar + threeStar + fourStar + fiveStar);\n\t\treturn builder.toString();\n\t}", "public void print() {\n\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n System.out.format(\"%.4f\", data[i][j]);\n if (j != this.cols - 1)\n System.out.print(\" \");\n }\n System.out.println(\"\");\n }\n }", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "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}", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void print()\n {\n for(int i = 0; i < this.data.length; i++)\n {\n for(int j = 0; j<this.data[0].length; j++)\n {\n if(this.data[i][j] == 83)\n {\n System.out.print(\"S\");\n }\n\n else if(this.data[i][j] == 69)\n {\n System.out.print(\"E\");\n }\n\n else\n {\n System.out.print(this.data[i][j]);\n }\n }\n System.out.println();\n }\n }", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "private void printSampleData() {\n\n System.out.println(\"Sentences: \" + sentenceList.size());\n System.out.println(\"Words before cleanup: \" + map.size());\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public void printData()\n {\n reader.printData();\n }", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public void print() {\n\t\tcounter++;\n\t\tSystem.out.print(counter + \" \");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int j = 0; j < size; j++) {\n\t\t\t\tSystem.out.print(squares[j][i].getValue());\n\t\t }\n\t\t System.out.print(\"//\");\n\t\t}\n\t\tSystem.out.println();\n }", "public void printArray(){\n\n\t\tfor (int i=0;i<1;i++){\n\n\t\t\tfor (int j=0;j<population[i].getLength();j++){\n\n\t\t\t\tSystem.out.println(\"X\" + j + \": \" + population[i].getX(j) + \" \" + \"Y\"+ j + \": \" + population[i].getY(j));\n\t\t\t\tSystem.out.println();\n\n\t\t\t}//end j\n\n\t\t\tSystem.out.println(\"The duplicate count is: \" + population[i].duplicateCheck());\n\t\t\tSystem.out.println(\"The fitness is \" + population[i].computeFitness());\n\t\t\t//population[i].computeFitness();\n\n\t\t}//end i\n\n\t}", "public void print() {\n System.out.println(\"Code: \"+this.productCode);\n System.out.println(\"Name: \"+ this.productName);\n System.out.println(\"Price: \"+this.price);\n System.out.println(\"Discount: \"+this.discount+\"%\");\n }", "private void GetDetailAnalysisText() {\n\t\tMap<Integer, ArrayList<ReportPluDayComboModifier>> combMap = getCombItemMap(this.comb);\n\n\t\tComparatorPluDayItem comparatorPluDayItem = new ComparatorPluDayItem();\n\t\tCollections.sort(reportPluDayItems, comparatorPluDayItem);\n//\t\tList<ReportPluDayItem> cop = new ArrayList<ReportPluDayItem>();\n\t\tint allQty = 0;\n\t\tBigDecimal allAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\tboolean showMainCategory = true;\n//\t\t\tint mainCategoryId = 0;\n\t\tboolean lastLinePrinted = false;\n//\t\tBigDecimal categoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\tString name = \"\";\n//\t\tint id = 0;\n\t\tMap<Integer, ReportPluDayItem> map = new HashMap<Integer, ReportPluDayItem>();\n\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t//ObjectFactory.getInstance().getReportPluDayItem(reportPluDayItem);\n\t\t\tif(map.containsKey(reportPluDayItem.getItemMainCategoryId().intValue())){\n\t\t\t\tReportPluDayItem amountReportPluDayItem = map.get(reportPluDayItem.getItemMainCategoryId().intValue());\n\t\t\t\tBigDecimal amount = BH.add(BH.getBD(amountReportPluDayItem.getItemAmount()), BH.getBD(reportPluDayItem.getItemAmount()), false);\n\t\t\t\tamountReportPluDayItem.setItemAmount(amount.toString());\n\t\t\t}else{\n\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n\t\t\t\trr.setItemMainCategoryId(reportPluDayItem.getItemMainCategoryId());\n\t\t\t\trr.setItemMainCategoryName(reportPluDayItem.getItemMainCategoryName());\n\t\t\t\trr.setItemAmount(BH.formatMoney(reportPluDayItem.getItemAmount()));\n\t\t\t\tmap.put(reportPluDayItem.getItemMainCategoryId().intValue(), rr);\n\t\t\t}\n//\t\t\t\tif(mainCategoryId == 0 || mainCategoryId == reportPluDayItem.getItemMainCategoryId().intValue()){\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\n//\t\t\t\t\tif(mainCategoryId == 0)\n//\t\t\t\t\t\tmainCategoryId = id;\n//\n//\t\t\t\t\tif( j == reportPluDayItems.size() - 1){\n//\t\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\t}\n//\t\t\t\t}else{\n//\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\t\t\t\t\tmainCategoryId = id;\n//\t\t\t\t\tcategoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\n//\t\t\t\t}\n\t\t}\n\n\t\tIterator<Map.Entry<Integer, ReportPluDayItem>> entries = map.entrySet().iterator();\n\t\tboolean isFirst = true;\n\t\twhile (entries.hasNext()){\n\t\t\tMap.Entry<Integer, ReportPluDayItem> entry = entries.next();\n\t\t\tif(!isFirst){\n\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t}\n\t\t\tisFirst = false;\n\t\t\tReportPluDayItem amontReportPluDayItem = entry.getValue();\n\t\t\tthis.AddItem(amontReportPluDayItem.getItemMainCategoryName(), \"\", \"\", BH.formatMoney(amontReportPluDayItem.getItemAmount()).toString(), 1);\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t\tif (amontReportPluDayItem.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n\t\t\t\t\t// Print comb modifier\n\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n\n\t\t\t\t\t\tint mm = 0;\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n\t\t\t\t\t\t\t\tBH.formatThree(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n\t\t\t\t\t\t\tif (count > 0) {\n\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n\t\t\t\t\t\t\t\t\t\t\"(\" + BH.formatThree(modifierPrice.toString()) + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + BH.formatThree(modifierAmount.toString())+ \")\", 1);\n\t\t\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mm == comItems.size() && mm > 0) {\n\t\t\t\t\t\t\tif (!lastLinePrinted)\n\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\t\tlastLinePrinted = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + BH.formatMoney(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t}\n\t\t\t\t\t//END Comb modifier print\n\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n\t\t\t\t\tallAmount = BH.add(allAmount,\n\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tfor(ReportPluDayItem category : cop) {\n//\t\t\t\tif(cop.indexOf(category) != 0){\n//\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t}\n//\t\t\t\tthis.AddItem(category.getItemMainCategoryName(), \"\", \"\", category.getItemAmount(), 1);\n//\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n//\n//\t\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n////\t\t\t\t\tif (mainCategoryId != reportPluDayItem.getItemMainCategoryId().intValue()) {\n////\t\t\t\t\t\tif (mainCategoryId != 0) {\n////\t\t\t\t\t\t\tif (!lastLinePrinted)\n////\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t\t}\n////\t\t\t\t\t\tmainCategoryId = reportPluDayItem.getItemMainCategoryId().intValue();\n////\t\t\t\t\t\tshowMainCategory = true;\n////\t\t\t\t\t}\n////\t\t\t\t\tif (showMainCategory) {\n////\t\t\t\t\t\tthis.AddItem(reportPluDayItem.getItemMainCategoryName(), \"\", \"\", \"\", 1);\n////\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\tshowMainCategory = false;\n////\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t}\n//\t\t\t\t\tif (category.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n//\t\t\t\t\t\t//Bob: Print comb modifier\n//\t\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n//\t\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n//\t\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n//\n//\t\t\t\t\t\t\tint mm = 0;\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n//\t\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n//\t\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n//\t\t\t\t\t\t\t\tif (count > 0) {\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n//\t\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n//\t\t\t\t\t\t\t\t\t\t\t\"(\" + modifierPrice.toString() + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + modifierAmount.toString() + \")\", 1);\n//\t\t\t\t\t\t\t\t\tlastLinePrinted = false;\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 (mm == comItems.size() && mm > 0) {\n//\t\t\t\t\t\t\t\tif (!lastLinePrinted)\n//\t\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\t\tlastLinePrinted = true;\n//\t\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + reportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t//END Comb modifier print\n//\t\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n//\t\t\t\t\t\tallAmount = BH.add(allAmount,\n//\t\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\tif (allQty != 0) {\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tthis.AddItem(PrintService.instance.getResources().getString(R.string.total), \"\", allQty + \"\", BH.formatMoney(allAmount.toString()), 1);\n\t\t}\n\n\n\t}", "public String summaryInfo() {\r\n DecimalFormat df = new DecimalFormat(\"#,##0.0##\");\r\n String output = \"\";\r\n output += \"----- Summary for \" + getName() + \" -----\";\r\n output += \"\\nNumber of PentagonalPyramid: \" + list.size();\r\n output += \"\\nTotal Surface Area: \" + df.format(totalSurfaceArea());\r\n output += \"\\nTotal Volume: \" + df.format(totalVolume());\r\n output += \"\\nAverage Surface Area: \" + df.format(averageSurfaceArea());\r\n output += \"\\nAverage Volume: \" + df.format(averageVolume());\r\n return output;\r\n }", "@Override\n public String toString(){\n StringBuilder ret = new StringBuilder(\"The round track contains:\");\n for (int i=1; i<getRound(); i++)\n ret.append(\"Round \").append(i).append(\": \").append(this.getDice(i).toString());\n return ret.toString();\n }", "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "public void printInfo()\n {\n System.out.println(\"position Value:\" + pos_.get(0).getPosition());\n System.out.println(\"velocitiy Value:\" + vel_.get(0).getVelocity());\n System.out.println(\"lastUpdateTime Value:\" + lastPosUpdateTime_);\n System.out.println(\"KalmanGain_ Value:\" + KalmanGain_);\n }", "void show() {\r\n System.out.println(\"regno:\"+regno + \"\\n name\"+ name + \"\\n marks :\" + m1+\",\"+m2+\",\"+m3);\r\n }", "public void display()\n\t{\n\t\tSystem.out.println(data+\" \");\n\t}", "void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }" ]
[ "0.68858314", "0.68529177", "0.6661787", "0.664626", "0.6601011", "0.65856814", "0.6561637", "0.6560119", "0.6448271", "0.63893896", "0.6369494", "0.636759", "0.6360958", "0.635897", "0.63544124", "0.6350168", "0.63317406", "0.63006216", "0.6286215", "0.6272734", "0.62469625", "0.62377644", "0.6223172", "0.6221452", "0.62209874", "0.62143296", "0.62030107", "0.6196982", "0.6188754", "0.61711323", "0.61711013", "0.6170847", "0.6168826", "0.6162385", "0.6157299", "0.6150313", "0.61415184", "0.61357135", "0.61355263", "0.61339605", "0.61318433", "0.61288244", "0.61255133", "0.61227983", "0.6115839", "0.6106535", "0.6104532", "0.6095684", "0.6092048", "0.60917294", "0.60917157", "0.6088945", "0.60850203", "0.6084761", "0.6070567", "0.6068536", "0.606626", "0.6032861", "0.60278386", "0.6026539", "0.60265285", "0.6023423", "0.6018179", "0.6017428", "0.601576", "0.6015031", "0.6014069", "0.6009413", "0.6004533", "0.59958845", "0.59907615", "0.5989592", "0.59867567", "0.5981369", "0.5966291", "0.59619826", "0.59619313", "0.59589905", "0.59512824", "0.5944828", "0.5941807", "0.59405077", "0.5939573", "0.5935744", "0.5918045", "0.5905962", "0.5905176", "0.5904591", "0.59012824", "0.5898223", "0.589623", "0.58951586", "0.5895106", "0.58899814", "0.5889964", "0.58895856", "0.5884623", "0.58845955", "0.5870696", "0.5863203" ]
0.6342146
16
Print the details in the before and after image function data
private List<String> print() throws EQException { // Retrieve the layout Layout layout = screenSetPrint.getLayout(); // Setup the array list lines.clear(); // LINE 1: function title if (printHeader) { printerFormatter.printFieldTitle(screenSetPrint.getLayout().rtvLabel(fhd.getEquationUser())); addLine(); addLine(); } // LINE 2: before and after image column header if (functionDataBef != null) { printerFormatter.printColumnHeader(true, true); } else if (functionDataBef == null && beforeImage) { printerFormatter.printColumnHeader(false, true); } else { printerFormatter.printColumnHeader(true, false); } addLine(); // LINE 3 and onwards // get all the output fieldSets List<InputFieldSet> fieldSets = screenSetPrint.getFunction().getInputFieldSets(); for (int i = 0; i < fieldSets.size(); i++) { // Retrieve the field set InputFieldSet fieldSet = fieldSets.get(i); // Print the record name if (printHeader) { addLine(); printerFormatter.printRecordName(fieldSet.getId(), fieldSet.rtvLabel(fhd.getEquationUser())); addLine(); } // Retrieve the layout for this screen set DisplayAttributesSet displayAttributeSet = layout.getDisplayAttributesSet(fieldSet.getId()); print(fieldSet, displayAttributeSet, displayAttributeSet.getDisplayItems()); } return (getLines()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "public void displayImageToConsole();", "static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}", "public void printImage() {\n\t System.out.print(\"\\n\");\n for (int i=0; i<width*height; i++) {\n if (i % width==0) System.out.print(\"\\n\");\n System.out.print(image[i]+ \" \");\n }\n System.out.print(\"\\n\\n\");\n }", "public void debugPrint() {\n System.out.println(\"### Image Handler ###\");\n System.out.println(\"Handling: \" + images.size());\n }", "void ProcessImage() {\n DoDescribe();\n }", "private void showImageDetail() {\n }", "public void drawInfo(Graphics g) {\n if (db == null) return;\n int zVal = zSliceSel == null ? 1 : zSliceSel.getValue();\n int tVal = tSliceSel == null ? 1 : tSliceSel.getValue();\n \n int textGap = 0;\n \n int nSlices = imp.getStackSize();\n \n // ImageStack stack = imp.getStack();\n int currentSlice = imp.getCurrentSlice();\n \n StringBuffer sb = new StringBuffer();\n sb.append(currentSlice);\n sb.append(\"/\");\n sb.append(nSlices);\n sb.append(\"; \");\n if (db.hasZ) {\n sb.append(zString);\n sb.append(\": \");\n sb.append(zVal);\n sb.append(\"/\");\n sb.append(db.numZ);\n sb.append(\"; \");\n }\n if (db.hasT) {\n sb.append(tString);\n sb.append(\": \");\n sb.append(tVal);\n sb.append(\"/\");\n sb.append(db.numT);\n sb.append(\"; \");\n }\n if (db.names != null) {\n String name = db.names[currentSlice - 1];\n if (name != null) {\n sb.append(name);\n sb.append(\"; \");\n }\n }\n \n int width = imp.getWidth(), height = imp.getHeight();\n Calibration cal = imp.getCalibration();\n if (cal.pixelWidth != 1.0 || cal.pixelHeight != 1.0) {\n sb.append(IJ.d2s(width * cal.pixelWidth, 2));\n sb.append(\"x\");\n sb.append(IJ.d2s(height * cal.pixelHeight, 2));\n sb.append(\" \");\n sb.append(cal.getUnits());\n sb.append(\" (\");\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\"); \");\n }\n else {\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\" pixels; \");\n }\n int type = imp.getType();\n int stackSize = imp.getStackSize();\n int size = (width * height * stackSize) / 1048576;\n switch (type) {\n case ImagePlus.GRAY8:\n sb.append(\"8-bit grayscale\");\n break;\n case ImagePlus.GRAY16:\n sb.append(\"16-bit grayscale\");\n size *= 2;\n break;\n case ImagePlus.GRAY32:\n sb.append(\"32-bit grayscale\");\n size *= 4;\n break;\n case ImagePlus.COLOR_256:\n sb.append(\"8-bit color\");\n break;\n case ImagePlus.COLOR_RGB:\n sb.append(\"RGB\");\n size *= 4;\n break;\n }\n sb.append(\"; \");\n sb.append(size);\n sb.append(\"M\");\n \n Insets insets = super.getInsets();\n g.drawString(sb.toString(), 5, insets.top + textGap);\n }", "private void reanderImage(ImageData data) {\n \n }", "private static void print(int[][] image) {\n for(int i = 0; i < image.length; i++) {\n for(int j = 0; j < image[0].length; j++) {\n System.out.print(image[i][j] + \" \");\n }\n System.out.println(\"\\n\");\n }\n }", "void displayDebugInformation() {\n\t\tmyParent.text(\"X\", X.x + 10, X.y + 5);\n\t\tmyParent.text(\"Y\", Y.x + 10, Y.y + 5);\n\t\tmyParent.text(\"Z\", Z.x + 10, Z.y + 5);\n\t\tmyParent.text(\"Q\", Q.x + 10, Q.y + 5);\n\t\tmyParent.fill(255);\n\n\t\tString pointFocuses = \"\";\n\t\tString stickedPoints = \"\";\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tpointFocuses += point[i].isFocusedOnThePoint() + \" \";\n\t\t\tstickedPoints += point[i].sticked + \" \";\n\n\t\t\t// fill(200);\n\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5);\n\t\t}\n\n\t\tmyParent.text(\"state: \" + state + \"\\nfocused on line: \" + selectedLine + \"\\nfocused on point: \" + selectedPoint\n\t\t\t\t+ \"\\nmouseLockedToLine: \" + mouseLockedToLine + \"\\npointFocuses: \" + pointFocuses + \"\\nstickedPoints: \"\n\t\t\t\t+ stickedPoints + \"\\ndragLock: \" + dragLock + \"\\ndiagonal scale factor: \" + diagonalScaleFactor\n\t\t\t\t+ \"\\npress D to hide debug\", 40, myParent.height - 160);\n\n\t\t// diplayNeighborPoints();\n\t}", "private static byte[] mergeImageAndText(BufferedImage im, String name, String event, Point pointName, Point pointEvent) throws IOException {\n\t\tGraphics2D g2 = im.createGraphics(); //graohics obj banaya to draw\n\t\tSystem.out.println(name);\n\t\tg2.setFont(new Font(\"TimesRoman\", Font.BOLD,28));\n\t\tg2.setColor(Color.BLACK);\n\t\tg2.drawString(name, pointName.x, pointName.y);//write text\n\t\tg2.drawString(event, pointEvent.x, pointEvent.y);//write text\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tImageIO.write(im, \"jpg\", baos);\n\t\treturn baos.toByteArray();\n\t}", "@Override\n public String toString() {\n return \"code: \" + this.paintCode + \"secCode: \" + this.secCode + \", image: \" + this.image;\n }", "@Override\r\n public void sendInfo() {\n System.out.println(\"发送带图片和文字的信息\");\r\n }", "public void showSamples(){\n\t\tfor(int i=0; i<arrIns.size(); i++){\n\t\t\tfor(int j=0; j<arrIns.get(i).numAttributes(); j++){\n\t\t\t\tSystem.out.print(\" | \" + arrIns.get(i).value(j) + \" | \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "@Override\n\tpublic String getInfo()\n\t{\n\t\tString result = \"Adjust image levels, gamma, and/or change bit depth\";\n\t\treturn result;\n\t}", "private void displayProcessedImage(Measurement measurement) {\n DecimalFormat df = new DecimalFormat(\"#0.000\");\n String pupilL_str = df.format(measurement.getPupilLeft()) + \"mm\";\n String pupilR_str = df.format(measurement.getPupilRight()) + \"mm\";\n String diff_str = df.format(measurement.getDifference()) + \"mm\";\n double difference = measurement.getDifference();\n String filepath = measurement.getFilepath();\n Bitmap imgBitmap = translateImgToBitmap(filepath);\n\n textLeftPupil.setText(pupilL_str);\n textRightPupil.setText(pupilR_str);\n textDifference.setText(diff_str);\n if(imgBitmap != null) resultImg.setImageBitmap(imgBitmap);\n\n if(difference > 0.0f) textResult1.setText(\"L > R\");\n if(difference < 0.0f) textResult1.setText(\"L < R\");\n if(difference == 0.0f) textResult1.setText(\"L = R\");\n\n showLayout(resultLayout);\n }", "public void renderImage()\n {\n for (int i = 0; i < _imageWriter.getNx(); i++)\n {\n for (int j = 0; j < _imageWriter.getNy(); j++)\n {\n Ray ray;\n ray = new Ray(_scene.getCamera().constructRayThroughPixel(_imageWriter.getNx(), _imageWriter.getNy(),j,i,\n _scene.getScreenDistance(), _imageWriter.getWidth(),_imageWriter.getHeight()));\n\n if(i==255 && j==255)\n System.out.print(\"111\");\n Map<Geometry, List<Point3D>> intersectionPoints = new HashMap<>(getSceneRayIntersections(ray));\n\n if(intersectionPoints.isEmpty())\n _imageWriter.writePixel(j, i, _scene.getBackground());\n else\n {\n Map<Geometry, Point3D> closestPoint = getClosestPoint(intersectionPoints);\n Map.Entry<Geometry,Point3D> entry;\n Iterator<Entry<Geometry, Point3D>> it = closestPoint.entrySet().iterator();\n entry = it.next();\n _imageWriter.writePixel(j, i, calcColor(entry.getKey(), entry.getValue(), ray));\n }\n\n }\n }\n //printGrid(1);\n\n }", "void display(DisplayInfo info, Coordinates position, Graphics2D g, ImageObserver io);", "private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}", "@Override\n\tpublic void outputData() {\n\t\tSystem.out.println(\"输出显示器中的相对物理坐标!\");\n\t}", "public void showDetails(){\r\n\t\tSystem.out.println(\"Length is : \"+getLength());\r\n\t\tSystem.out.println(\"Width is : \"+getWidth());\r\n\t\tSystem.out.println(\"Area Of Rectangle is : \"+area());\r\n\t}", "public static void printChunkInfo(Bitmap bm) {\n byte[] chunk = bm.getNinePatchChunk();\n if (null == chunk) {\n System.out.println(\"can't find chunk info from this bitmap(\" + bm\n + \")\");\n return;\n }\n int xLen = chunk[1];\n int yLen = chunk[2];\n int cLen = chunk[3];\n \n StringBuilder sb = new StringBuilder();\n int peddingLeft = getInt(chunk, 12);\n int paddingRight = getInt(chunk, 16);\n int paddingTop = getInt(chunk, 20);\n int paddingBottom = getInt(chunk, 24);\n sb.append(\"peddingLeft=\" + peddingLeft);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingRight=\" + paddingRight);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingTop=\" + paddingTop);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingBottom=\" + paddingBottom);\n sb.append(\"\\r\\n\");\n \n sb.append(\"x info=\");\n for (int i = 0; i < xLen; i++) {\n int vv = getInt(chunk, 32 + i * 4);\n sb.append(\",\" + vv);\n }\n sb.append(\"\\r\\n\");\n sb.append(\"y info=\");\n for (int i = 0; i < yLen; i++) {\n int vv = getInt(chunk, xLen * 4 + 32 + i * 4);\n sb.append(\",\" + vv);\n }\n sb.append(\"\\r\\n\");\n sb.append(\"color info=\");\n for (int i = 0; i < cLen; i++) {\n int vv = getInt(chunk, xLen * 4 + yLen * 4 + 32 + i * 4);\n sb.append(\",\" + vv);\n }\n System.err.println(\"\" + sb);\n }", "public void printDataset() {\n for (int i = 0; i < getNumPoints(); i++) {\n System.out.println(\"\\n\" + getPoint(i));\n }\n System.out.println(\" \");\n }", "public String showVision()\r\n {\r\n balayer();\r\n String res=\"Vision : +\\n\";\r\n for (int i=0; i<LONGUEUR ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<LARGEUR; j++) {\r\n res+=Vision[i][j][0];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesHor[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesVert[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n System.out.println(res);\r\n return res;\r\n }", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }", "private void logLocalMessage(String methodName, int status, String message, BufferedImage image) {\r\n\t\t// Save image into file\r\n\t\tif (image != null) {\r\n\t\t\tString absoluteImagePath = null;\r\n\t\t\t\r\n\t\t\t// kiedy wywolujemy bezposrednio z eclipsa\r\n\t\t\tif (!System.getProperty(\"user.dir\").contains(\"results\")) {\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/results/temp/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/results/temp/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t} else {\t\t\t\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFile outputFile = new File(absoluteImagePath);\r\n\t\t\t\tImageIO.write(image, IMG_FORMAT, outputFile);\r\n\t\t\t\tSystem.out.println(\"*HTML*<img src=\\\"\" + absoluteImagePath + \"\\\">\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\tswitch (status) {\r\n\t\tcase PASSED:\r\n\t\t\tSystem.out.println(\"|PASS|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase FAILED:\r\n\t\t\tSystem.err.println(\"|FAIL|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase WARNING:\r\n\t\t\tSystem.out.println(\"|WARN|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"|INFO|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void printInfo()\n {\n System.out.println(\"position Value:\" + pos_.get(0).getPosition());\n System.out.println(\"velocitiy Value:\" + vel_.get(0).getVelocity());\n System.out.println(\"lastUpdateTime Value:\" + lastPosUpdateTime_);\n System.out.println(\"KalmanGain_ Value:\" + KalmanGain_);\n }", "@Override\n public void mouseMoved(MouseEvent me)\n {\n double facEscala = 1.0;\n if (escala >= 0)\n {\n facEscala = escala+1;\n }\n else\n {\n facEscala = Math.pow(2,escala);\n }\n \n \n\t this.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));\n if (escala!=0)\n {\n readIterator = RandomIterFactory.create(this.source, null); // creates the iterator.\n }\n else\n {\n readIterator = RandomIterFactory.create(this.source, null); // creates the iterator.(Por ser de byte)\n }\n \n pixelInfo.setLength(0); // clear the StringBuffer\n int x = me.getX();\n int y = me.getY();\n if ((x >= width*facEscala) || (y >= height*facEscala))\n {\n pixelInfo.append(\"No data!\");\n return;\n }\n if (isDoubleType) // process the pixel as an array of double values\n {\n \treadIterator.getPixel(me.getX(),me.getY(),dpixel); // read the pixel\n \tString valpixel = new String(ic.buscar(133)); // Tag 133\n \tfor(int b=0;b<ipixel.length;b++)\n \t {\n \t\t valpixel = valpixel.concat(ic.buscar(134)+b+\": \"+ipixel[b]+\", \"); // Tag 134 \t\n \t }\n \t if (gdata!=null)\n \t {\n \t\t double geoX = x*facEscala*scales[0]+tiepoints[0][3];\n \t\t double geoY = y*facEscala*scales[1]+tiepoints[0][4];\n \t\t \n \t\t principal.getStatus().setText(valpixel\n +\"(\"\n +x\n +\", \"\n +y\n +\")\"\n +ic.buscar(135)\n +geoX\n +\" \"\n +linearunits\n +\", \"\n +geoY\n +\" \"\n +linearunits\n +ic.buscar(136)\n +geozone); // Tag 135, 136\n \t }\n \t else\n \t {\n \t\t principal.getStatus().setText(valpixel+\"(\"+x+\", \"+y+\")\");\n \t }\n }\n else // pixel type is not floating point, will be processed as integers.\n {\n if (isIndexed) // if color model is indexed\n {\n\n readIterator.getPixel(me.getX(),me.getY(),ipixel); // read the pixel\n\n for(int b=0;b<ipixel.length;b++)\n {\n \tprincipal.getStatus().setText(\" RGB:\"+lutData[0][ipixel[0]]+\",\"+\n lutData[1][ipixel[0]]+\",\"+\n lutData[2][ipixel[0]]+\"(\"+x+\", \"+y+\")\");\n }\n }\n else // pixels are of integer type, but not indexed\n {\n \n readIterator.getPixel(me.getX(),me.getY(),ipixel); // read the pixel\n String valpixel = new String(ic.buscar(133)); // Tag 133\n \t for(int b=0;b<ipixel.length;b++)\n \t {\n \t\t valpixel = valpixel.concat(ic.buscar(134)+b+\": \"+ipixel[b]+\", \"); // Tag 134\n \t }\n \t if (gdata!=null)\n \t {\n \n \n \t\t double geoX=0, geoY=0;\n \t\t if (tiepoints[0][0]==0 && tiepoints[0][1]==0)\n \t\t {\n \t\t\t geoX = x*facEscala*scales[0]+tiepoints[0][3];\n \t\t\t geoY = y*facEscala*scales[1]+tiepoints[0][4];\n \t\t }\n \t\t else\n \t\t {\n \t\t\t double despx = x-tiepoints[0][0];\n \t\t\t double despy = y-tiepoints[0][1];\n \t\t\t geoX = Math.abs(despx)*facEscala*scales[0]+(Math.signum(despx)*tiepoints[0][3]);\n \t\t\t geoY = Math.abs(despy)*facEscala*scales[1]+(Math.signum(despy)*tiepoints[0][4]);\n \t\t }\n \t\t \n \t\tDecimalFormat df = new DecimalFormat(\"0.000\"); //No me gusta poner punto\n\t\t String geoXs = df.format(geoX);\n\t\t String geoYs = df.format(geoY);\n\t\t String [] latlong = GeoInfo.convertirUTM(geozona, georef, geoX, geoY, unidad, elipsoide, ic);\n\t\t principal.getStatus().setText(valpixel\n +\"(\"\n +x\n +\", \"\n +y\n +\")\"\n +ic.buscar(135)\n +geoXs\n +\" \"\n +linearunits\n +\", \"\n +geoYs\n +\" \"\n +linearunits\n +\") | Lat: \"\n +latlong[0]\n +\" Long: \"\n +latlong[1]\n +ic.buscar(136)\n +geozone); // Tag 135, 136\n \t }\n \t else\n \t {\n \t\t principal.getStatus().setText(valpixel+\"(\"+x+\", \"+y+\")\");\n \t }\n \t\n }\n } // pixel is integer type\n }", "public void printCurrentState() {\n\t\t//getX() and getY() are methods from the Point class\n\t\tSystem.out.println(\"Avatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n\t\tSystem.out.println(\"Points: \" + avatar.getScore());\n\t}", "protected abstract String exportHelp(BufferedImage img) throws IllegalArgumentException;", "public void Func_imagefile(){\n\n\t\tswf_env.containImg = true;\n\n\n\t\tthis.value = new SWFValue(\"Func\");\n\n\t\tString path = this.getAtt(\"path\", \".\");\n\t\tString filename = this.getAtt(\"default\");\n\t\tString type = \"auto\";\n\t\tvalue.instanceName = \"img\"+ Integer.toString(swf_env.instanceID);\n\t\tvalue.data = \"\";\n\t\tvalue.imgpath = path + \"/\" + filename;\n\t\tvalue.inter_imgpath = path + \"/\" + filename;\n\t\tvalue.inter_name = \"intimg\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.tmp = \"tmp\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.lnum = Integer.toString(swf_env.visibleflag_counter);\n\n\n\t\tif(!path.startsWith(\"/\")) {\n\t\t\tString basedir = GlobalEnv.getBaseDir();\n\t\t\tLog.out(\"basedir= \" +basedir);\n\t\t\tif(basedir != null && basedir != \"\") {\n\t\t\t\tpath = basedir + path;\n\t\t\t}\n\t\t}\n\n\t\tString filepath = path + \"/\" + filename;\n\n\n\t\tsetDecoration1();\n\t\tvalue.margin = margin;\n\n\n\t\tSystem.out.println(\"filepath = \"+filepath);\n\t\tint img = swf_env.open_image_file(type, filepath);\n\t\tvalue.img = img;\n\n\t\tdata_width = swf_env.get_value(\"imagewidth\", img);\n\t\tdata_height = swf_env.get_value(\"imageheight\", img);\n\t\tSystem.out.println(\"imagesize: \"+data_width+\" \"+data_height);\n\t\twidth = data_width + margin * 2;\n\t\theight = data_height + margin * 2;\n\n\n\t\tsetDecoration2();\n\n\t\tif(data_width > width){\n\t\t\tint original_width = data_width;\n\t\t\tdata_width = width - margin * 2;\n\t\t\tint scale = data_width / original_width;\n\t\t\tdata_height = data_height * scale;\n\t\t\theight = data_height + margin * 2;\n\t\t}\n\t\tif(data_height > height){\n\t\t\tint original_height = data_height;\n\t\t\tdata_height = height - margin * 2;\n\t\t\tint scale = data_height / original_height;\n\t\t\tdata_width = data_width * scale;\n\t\t\twidth = data_width + margin * 2;\n\t\t}\n\n\t\tvalue.data_width = data_width;\n\t\tvalue.data_height = data_height;\n\t\tvalue.width = width;\n\t\tvalue.height = height;\n\t\t//morya wrote\n\t\tvalue.int_w = width;\n\t\tvalue.int_h = height;\n\n\n\t\tsetDecoration3();\n\n\t\tswf_env.tmp_width = width;\n\t\tswf_env.tmp_height = height;\n\n\n\t\tswf_env.instanceID++;\n\n\t}", "public static void main(String[] args) {\n\r\n List<Image> imageList = new ArrayList<>();\r\n imageList.add(new ProxyImage(\"Dali_Atomicus_1948\", \"Dalí Atomicus, photo by Philippe Halsman (1948), shown before support wires were removed from the image\"));\r\n imageList.add(new ProxyImage(\"The_Falling_Soldier_1936\", \"Original title Loyalist Militiaman at the Moment of Death, Cerro Muriano, September 5, 1936\"));\r\n imageList.add(new ProxyImage(\"The_Seven_Year_Itch\", \"Monroe posing for photographers while filming the subway grate scene for The Seven Year Itch in September 1954\"));\r\n imageList.add(new ProxyImage(\"Robert_Mapplethorpe\", \"Self portrait (1980)\"));\r\n \r\n System.out.println(\"Show data\");\r\n for (Image image : imageList) {\r\n\t\t\timage.showData();\r\n\t\t}\r\n \r\n System.out.println(\"\\nLoad & display images\");\r\n for (Image image : imageList) {\r\n\t\t\timage.displayImage();\r\n\t\t}\r\n\t}", "public static void printAlpha(FqImage imh) {\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"a\"+imh.points[i][j].getAlpha()+\"a\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public void printResult(String image, String value) {\n\t\ttry {\n\t\t\t// Read in the image.\n\t\t\tBufferedImage img = new BufferedImage(I1.getRowDimension(), \n\t\t\t\t\tI1.getColumnDimension(),\n\t\t\t\t BufferedImage.TYPE_INT_RGB);\n\t\t\tdouble n[][] = new double[I1.getRowDimension()][I1.getRowDimension()];\n\t\t\tif (value.equals(\"X\"))\n\t\t\t\tn = normalize255(this.Nx);\n\t\t\telse if (value.equals(\"Y\"))\n\t\t\t\tn = normalize255(this.Ny);\n\t\t\telse if (value.equals(\"Z\"))\n\t\t\t\tn = normalize255(this.Nz);\n\t\t\telse if (value.equals(\"D\"))\n\t\t\t\tn = normalize255(this.D);\n\t\t\t// Transform the image into a grayscale image.\n\t\t\tfor (int i=0; i < I1.getRowDimension(); i++) {\n\t\t\t\tfor (int j=0; j < I1.getColumnDimension(); j++) {\n\t\t\t\t\tint albedo = (int) n[i][j];\n\t\t\t\t\timg.setRGB(i, j, new Color(albedo, albedo, albedo).getRGB());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tImageIO.write(img, \"png\", new File(image));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error reading \" + \"yeah\");\n\t\t}\n\t}", "void energyImageDisplay(BufferedImage imgToEnergize, String label,\n boolean doWePrintSeam, ImageView myImage, Label seamPrintingLabel,\n Label energyPrintingLabel) {\n seamPrintingLabel.setTextFill(javafx.scene.paint.Color.BLACK);\n if (this.tempImg.equals(\"Energy computation\")\n || this.tempImg.equals(\"Show next seam\")) {\n seamPrintingLabel\n .setTextFill(javafx.scene.paint.Color.PALEVIOLETRED);\n myImage.setImage(SwingFXUtils.toFXImage(imgToEnergize, null));\n this.tempImg = \"null\";\n } else {\n if (imgToEnergize != null)\n energyPrintingLabel.setTextFill(javafx.scene.paint.Color.GREEN);\n assert imgToEnergize != null;\n BufferedImage bImageEnergized = SeamCarver\n .energizedImage(imgToEnergize);\n if (doWePrintSeam) {\n int totalRedRgb = 255 << 16;\n int[] seamToPrint = SeamCarver.bestSeam(bImageEnergized,\n this.getDirection());\n if (this.getDirection().equals(\"H\")) {\n for (int y = 0; y < seamToPrint.length; y++)\n bImageEnergized.setRGB(seamToPrint[y], y, totalRedRgb);\n } else {\n for (int x = 0; x < seamToPrint.length; x++)\n bImageEnergized.setRGB(x, seamToPrint[x], totalRedRgb);\n }\n }\n myImage.setImage(SwingFXUtils.toFXImage(bImageEnergized, null));\n this.tempImg = label;\n }\n }", "public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "public static void main(String[] args) \n\t{\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME );\n\t\tMatToBufferedImage M2B = new MatToBufferedImage();\n \tMat mat = Highgui.imread(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\Projects\\\\OpenCV\\\\image6.png\",Highgui.CV_LOAD_IMAGE_COLOR);\n \tMat newMat = new Mat(mat.rows(), mat.cols(), mat.type());\n \tmat.convertTo(mat, CvType.CV_64FC3); //CV_64FC3 it can use double[] instead of byte[] \n \t//Mat newMat = mat.clone();\n \n \t//byte buff[] = new byte[(int) (mat.total() * mat.channels())];\n \tdouble buff[] = new double[(int) (mat.total() * mat.channels())];\n \n\t\tdouble alpha = 2.2;\n \tint beta = 50; \n \n \tSystem.out.println(mat.type());\n \n \tmat.get(0, 0, buff);\n \n \tImageShow imshow = new ImageShow(M2B.getBufferedImage(mat));\n \n \tfor( int i = 0; i<buff.length; i++)\n \t{\n \t\tbuff[i] = (alpha*buff[i]+beta);\n \t}\n \n \tnewMat.put(0, 0, buff);\n \n\t\tImageShow imshow1 = new ImageShow(M2B.getBufferedImage(newMat));\n \n\n\t}", "private String addDisplay() {\n\t\t// One Parameter: DisplayName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|image:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}", "public native void annotateImage(DrawInfo info);", "static void insertion(BufferedImage img, BufferedImage waterImg, int width, int height, StringBuilder binary, int[] Estimator_pos) {\n int block_num = 0;\r\n int msg_counter = 0;\r\n\r\n for (int x = 0; x < width; x++) {\r\n for (int y = 0; y < height; y++) {\r\n\r\n int b1 = img.getRGB(x, y);\r\n int p1 = (b1 >> 16) & 0xff;\r\n int b2 = img.getRGB(x, y + 1);\r\n int p2 = (b2 >> 16) & 0xff;\r\n int b3 = img.getRGB(x + 1, y);\r\n int p3 = (b3 >> 16) & 0xff;\r\n int b4 = img.getRGB(x + 1, y + 1);\r\n int p4 = (b4 >> 16) & 0xff;\r\n\r\n //geting a random 1-4 for estimator\r\n Random rn = new Random();\r\n int estimator = rn.nextInt(4) + 1;\r\n //System.out.println(estimator);\r\n Estimator_pos[block_num] = estimator;\r\n// System.out.println(\" p1 : \"+p1 + \"| p2 : \" + p2 + \"| p3 : \" + p3 + \"| p4 : \" + p4);\r\n //-----------comparing estimator with pixels ------------------\r\n if ((p1 < 255) && (p2 < 255) && (p3 < 255) && (p4 < 255)) {\r\n\r\n // System.out.println(estimator);\r\n switch (estimator) {\r\n\r\n case 1: //------------------------------------------------------------------------------------- case 1\r\n //System.out.println(\"case 1\");\r\n estimator = p1;\r\n ////writing back estimator \r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n if (Math.abs(estimator - p2) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p2 = p2 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p2 = p2 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p2 > 0) {\r\n\r\n p2 = p2 - 2;\r\n } else if (estimator - p2 < 0) {\r\n p2 = p2 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n\r\n waterImg.setRGB(x, y + 1, p2);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p3) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p3 = p3 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p3 = p3 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p3 > 0) {\r\n\r\n p3 = p3 - 2;\r\n } else if (estimator - p3 < 0) {\r\n p3 = p3 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p4) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p4 = p4 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p4 = p4 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p4 > 0) {\r\n\r\n p4 = p4 - 2;\r\n } else if (estimator - p4 < 0) {\r\n p4 = p4 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n break;\r\n case 2: //------------------------------------------------------------------------------------- case 2\r\n //System.out.println(\"case 2\");\r\n estimator = p2;\r\n ////writing back estimator \r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x, y + 1, p2);\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n\r\n if (Math.abs(estimator - p1) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p1 = p1 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p1 = p1 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p1 > 0) {\r\n\r\n p1 = p1 - 2;\r\n } else if (estimator - p1 < 0) {\r\n p1 = p1 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p3) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p3 = p3 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p3 = p3 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p3 > 0) {\r\n\r\n p3 = p3 - 2;\r\n } else if (estimator - p3 < 0) {\r\n p3 = p3 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p4) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p4 = p4 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p4 = p4 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p4 > 0) {\r\n\r\n p4 = p4 - 2;\r\n } else if (estimator - p4 < 0) {\r\n p4 = p4 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n break;\r\n case 3: //------------------------------------------------------------------------------------- case 3\r\n //System.out.println(\"case 3\");\r\n estimator = p3;\r\n ////writing back estimator\r\n\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n\r\n if (Math.abs(estimator - p1) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p1 = p1 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p1 = p1 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p1 > 0) {\r\n\r\n p1 = p1 - 2;\r\n } else if (estimator - p1 < 0) {\r\n p1 = p1 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p2) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p2 = p2 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p2 = p2 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p2 > 0) {\r\n\r\n p2 = p2 - 2;\r\n } else if (estimator - p2 < 0) {\r\n p2 = p2 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x, y + 1, p2);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p4) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p4 = p4 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p4 = p4 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p4 > 0) {\r\n\r\n p4 = p4 - 2;\r\n } else if (estimator - p4 < 0) {\r\n p4 = p4 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n break;\r\n case 4: //------------------------------------------------------------------------------------- case 4\r\n estimator = p4;\r\n //wrinting back estimator pixel\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n //System.out.println(\"case 4\");\r\n //compare with pixel a\r\n //System.out.println(\"comparing with a\");\r\n if (Math.abs(estimator - p1) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p1 = p1 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p1 = p1 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p1 > 0) {\r\n\r\n p1 = p1 - 2;\r\n } else if (estimator - p1 < 0) {\r\n p1 = p1 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n\r\n //compare with pixel b\r\n //System.out.println(\"comparing with b\");\r\n if (Math.abs(estimator - p2) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p2 = p2 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p2 = p2 - 2;\r\n }\r\n msg_counter++;\r\n }\r\n } else if (estimator - p2 > 0) {\r\n\r\n p2 = p2 - 2;\r\n } else if (estimator - p2 < 0) {\r\n p2 = p2 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x, y + 1, p2);\r\n\r\n //compare with pixel c\r\n //System.out.println(\"comparing with c\");\r\n if (Math.abs(estimator - p3) < 2) {\r\n if (msg_counter < binary.length()) {\r\n if (Character.getNumericValue(binary.charAt(msg_counter)) == 1) {\r\n p3 = p3 + 2;\r\n } else if (Character.getNumericValue(binary.charAt(msg_counter)) == 0) {\r\n p3 = p3 - 2;\r\n }\r\n msg_counter++;\r\n\r\n }\r\n } else if (estimator - p3 > 0) {\r\n\r\n p3 = p3 - 2;\r\n } else if (estimator - p3 < 0) {\r\n p3 = p3 + 2;\r\n }\r\n //System.out.println(p1 + \" \" + p2 + \" \" + p3 + \" \" + p4);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x + 1, y, p3);\r\n\r\n break;\r\n }\r\n// p1 = (p1 >> 16) & 0xff;\r\n// p2 = (p2 >> 16) & 0xff;\r\n// p3 = (p3 >> 16) & 0xff;\r\n// p4 = (p4 >> 16) & 0xff;\r\n// System.out.println(\" p1 : \"+p1 + \"| p2 : \" + p2 + \"| p3 : \" + p3 + \"| p4 : \" + p4);\r\n\r\n } else {\r\n p1 = (p1 << 16) | (p1 << 8) | p1;\r\n waterImg.setRGB(x, y, p1);\r\n p2 = (p2 << 16) | (p2 << 8) | p2;\r\n waterImg.setRGB(x + 1, y, p2);\r\n p3 = (p3 << 16) | (p3 << 8) | p3;\r\n waterImg.setRGB(x, y + 1, p3);\r\n p4 = (p4 << 16) | (p4 << 8) | p4;\r\n waterImg.setRGB(x + 1, y + 1, p4);\r\n\r\n }\r\n block_num = block_num + 1;\r\n\r\n y++;\r\n\r\n }\r\n x++;\r\n }\r\n\r\n }", "public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}", "public String getDetails()\n\t{\n\t return \"Point (\"+x+\",\"+y+\")\";\n\t}", "public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\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 void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }", "public void displayGivenImage() {\n\t\tthis.image.display();\n\t}", "public void show() {\n\t\tImageJFunctions.show( imageFloat );\t\t\n\t}", "void printInfo(String name) {\n System.out.println(\"Info for \" + name + \": \");\n showStyle();\n showDim();\n System.out.println(\"Area is \" + area());\n }", "private void displayPrevious() {\r\n\t\ti--;\r\n\t\tdisplayCurrentPicture();\r\n\t}", "public void displayCurrentValues() {\n currentX.setText(Float.toString(singleSample[0]));\n currentY.setText(Float.toString(singleSample[1]));\n currentZ.setText(Float.toString(singleSample[2]));\n }", "@Override\r\n\tvoid indicators() {\n\t\tSystem.out.println(\"general indicators\");\r\n\t}", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "@Override\r\n public String toString() {\r\n return imgWithError + \" was not found.\";\r\n }", "@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n// steering = (TextView) findViewById(R.id.steering_angle);\n\n\n Mat frame = inputFrame.rgba();\n steering_angle_ = get_steering_prediction(frame.clone());\n Mat displayMat = null;\n// if(counterFrme % 10 == 0 || counterFrme %10 ==1 || counterFrme %10 ==2 || counterFrme %10 ==3 || counterFrme %10 ==4 ) {\n displayMat = draw_LaneLines(frame.clone());\n// displayMat = CarDetect(displayMat);\n// displayMat = PedestrainDet(frame.clone());\n\n// }else{\n// displayMat = frame;\n// }\n\n counterFrme ++;\n if(steering_angle_< 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn left \" + steering_angle_ * -1 + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n if(steering_angle_ > 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn right \" + steering_angle_ + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n\n return displayMat;\n\n }", "public void info() {\n\t\tSystem.out.println(\"중심 좌표 [ \" + getX() + \", \" + getY() + \" ]\");\n\t\txyInfo(); // Coord클래스의 메서드 호출\n\t\tSystem.out.println(\"반지름 : \" + radius);\n\t}", "@Override\n\tpublic void acreage() {\n\t\tSystem.out.println(\"梯形的面积\"+getAcreage());\n\t}", "public void showBeforeAfterLocation() {\n\t\tfor (Integer key : afterLoc.keySet()) {\n\t\t\tdouble[] ary = afterLoc.get(key);\n\n\t\t\tString locationA = \"\";\n\t\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t\tlocationA += Config.roundTwoDecimals(ary[i]) + \"\\t\";\n\t\t\t}\n\n\t\t\tdouble[] ary2 = beforeLoc.get(key);\n\n\t\t\tString locationB = \"\";\n\t\t\tfor (int i = 0; i < ary2.length; i++) {\n\t\t\t\tlocationB += Config.roundTwoDecimals(ary2[i]) + \"\\t\";\n\t\t\t}\n\t\t\tCaller.log(\" AFTER: \" + key + \" | \" + locationA + \"\\t|\" + attractors.get(key).count);\n\t\t}\n\t}", "public static void main(String args[]) {\n\t\tint[][][] pic = read(\"tinypic.ppm\"); \n\t\tSystem.out.println(\"Standart pic \\n\"); // For a clean code\n\t\t// Displays the array's data on standard output\n\t\tprint(pic);\n\n\t\tSystem.out.println(\"flipHorizontally pic \\n\");\n\t\tprint(flipHorizontally(pic));\n\n\t\tSystem.out.println(\"flipVertically pic \\n\");\n\t\tprint(flipVertically(pic));\n\n\t\tSystem.out.println(\"greyScale pic \\n\");\n\t\tprint(greyScale(pic));\n\n\t}", "@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }", "public static void printRGB(FqImage imh){\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"rgb\"+imh.points[i][j].getRGB() );\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public String toString() {\n String res = \"\";\n \n for ( int[] row : img ) {\n for ( int x : row )\n res += x + \" \";\n res += \"\\n\";\n }\n return res;\n }", "public void arrow()\n{\n\nPImage img1,img2;\nimg1=loadImage(\"compass.png\");\nimage(img1,630,110);\nimg2=loadImage(\"compass.png\");\nimage(img2,1490,110);\n\n}", "public void print() {\r\n System.out.print(\"[id: <\" + this.id + \"> \");\r\n if (this.dimension > 0) {\r\n System.out.print(this.data[0]);\r\n }\r\n for (int i = 1; i < this.dimension * 2; i++) {\r\n System.out.print(\" \" + this.data[i]);\r\n }\r\n System.out.println(\"]\");\r\n }", "public void showbitmap3() {\n \n \t}", "public byte[] readImagePNG(BufferedImage bufferedimage) throws IOException{\n byte[] data = ImageUtil.toByteArray(bufferedimage);\r\n /* \r\n for (int i = 0; i < data.length; i++) {\r\n if(i!=0&&i%4==0)\r\n System.out.println();\r\n System.out.format(\"%02X \",data[i]);\r\n }\r\n */ \r\n \r\n \r\n \r\n \r\n byte[] stximage = getStximage();\r\n byte[] etximage = getEtximage();\r\n \r\n byte[] stxdata = new byte[stximage.length];\r\n byte[] etxdata = new byte[etximage.length];\r\n byte[] length = new byte[4];\r\n \r\n boolean stxsw=false;\r\n boolean etxsw=false;\r\n byte[] full_data=null;\r\n byte[] only_data=null;\r\n try{\r\n for (int i = 0; i < data.length; i++) {\r\n System.arraycopy(data, i, stxdata,0, stxdata.length);\r\n stxsw = ByteUtil.equals(stximage, stxdata);\r\n int subindex=i+stxdata.length;\r\n if(stxsw){\r\n System.arraycopy(data, subindex, length,0, length.length);\r\n int length_fulldata = ConversionUtil.toInt(length);\r\n // System.out.format(\"%02X %d subIndex[%d]\",data[subindex],length_fulldata,subindex);\r\n \r\n \r\n subindex+=i+length.length;\r\n int etx_index= subindex+ length_fulldata;\r\n // System.out.println(\"subindex : \"+subindex+\" etx_index : \"+etx_index);\r\n System.arraycopy(data, etx_index, etxdata,0, etxdata.length);\r\n \r\n// for (int j = 0; j < etxdata.length; j++) {\r\n// System.out.format(\"%02X \",etxdata[j]);\r\n// }\r\n \r\n etxsw = ByteUtil.equals(etximage, etxdata);\r\n if(etxsw){\r\n full_data = new byte[etx_index-subindex];\r\n System.arraycopy(data, subindex, full_data,0, full_data.length); //fulldata\r\n break;\r\n }else{\r\n continue;\r\n }\r\n }\r\n \r\n \r\n }\r\n \r\n /////only data search\r\n System.arraycopy(full_data, 0, length,0, length.length);\r\n int length_onlydata = ConversionUtil.toInt(length); \r\n only_data = new byte[length_onlydata];\r\n System.arraycopy(full_data, length.length, only_data,0, only_data.length);\r\n \r\n \r\n \r\n }catch (Exception e) {\r\n return null;\r\n }\r\n \r\n return only_data;\r\n \r\n }", "private void displayNext() {\r\n\t\ti++;\r\n\t\tdisplayCurrentPicture();\r\n\t}", "private void diplay() {\n\t\tSystem.out.println(new StringBuilder(HUMIDITY_CONSTANT + humidity + TEMPRETURE_CONSTANT + temp\n\t\t\t\t+ PRESSURE_CONSTANT + pressure));\n\n\t}", "public static void printRed(FqImage imh) {\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"r\"+imh.points[i][j].getRed()+\"r\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public static String _imglarvas_click() throws Exception{\nmostCurrent._butpaso2.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 211;BA.debugLine=\"butPaso3.Visible = False\";\nmostCurrent._butpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 212;BA.debugLine=\"butPaso4.Visible = False\";\nmostCurrent._butpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 213;BA.debugLine=\"lblLabelPaso1.Visible = False\";\nmostCurrent._lbllabelpaso1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 214;BA.debugLine=\"lblPaso2a.Visible = False\";\nmostCurrent._lblpaso2a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 215;BA.debugLine=\"lblPaso2b.Visible = False\";\nmostCurrent._lblpaso2b.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 216;BA.debugLine=\"lblPaso3.Visible = False\";\nmostCurrent._lblpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 217;BA.debugLine=\"lblPaso3a.Visible = False\";\nmostCurrent._lblpaso3a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 218;BA.debugLine=\"lblPaso4.Visible = False\";\nmostCurrent._lblpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 219;BA.debugLine=\"imgPupas.Visible = False\";\nmostCurrent._imgpupas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 220;BA.debugLine=\"imgLarvas.Visible = False\";\nmostCurrent._imglarvas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 221;BA.debugLine=\"imgMosquito.Visible = False\";\nmostCurrent._imgmosquito.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 222;BA.debugLine=\"imgMosquito1.Visible = False\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 223;BA.debugLine=\"imgHuevos.Visible = False\";\nmostCurrent._imghuevos.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 224;BA.debugLine=\"lblEstadio.Visible = False\";\nmostCurrent._lblestadio.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 226;BA.debugLine=\"lblFondo.Initialize(\\\"\\\")\";\nmostCurrent._lblfondo.Initialize(mostCurrent.activityBA,\"\");\n //BA.debugLineNum = 227;BA.debugLine=\"lblFondo.Color = Colors.ARGB(30,255,94,94)\";\nmostCurrent._lblfondo.setColor(anywheresoftware.b4a.keywords.Common.Colors.ARGB((int) (30),(int) (255),(int) (94),(int) (94)));\n //BA.debugLineNum = 228;BA.debugLine=\"Activity.AddView(lblFondo,0,0,100%x,100%y)\";\nmostCurrent._activity.AddView((android.view.View)(mostCurrent._lblfondo.getObject()),(int) (0),(int) (0),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (100),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (100),mostCurrent.activityBA));\n //BA.debugLineNum = 230;BA.debugLine=\"panelPopUps_2.Initialize(\\\"\\\")\";\nmostCurrent._panelpopups_2.Initialize(mostCurrent.activityBA,\"\");\n //BA.debugLineNum = 231;BA.debugLine=\"panelPopUps_2.LoadLayout(\\\"lay_Mosquito_PopUps\\\")\";\nmostCurrent._panelpopups_2.LoadLayout(\"lay_Mosquito_PopUps\",mostCurrent.activityBA);\n //BA.debugLineNum = 233;BA.debugLine=\"lblPopUp_Descripcion.Text = \\\"\\\"\";\nmostCurrent._lblpopup_descripcion.setText(BA.ObjectToCharSequence(\"\"));\n //BA.debugLineNum = 234;BA.debugLine=\"imgPopUp.Visible = True\";\nmostCurrent._imgpopup.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 235;BA.debugLine=\"imgPopUp.RemoveView\";\nmostCurrent._imgpopup.RemoveView();\n //BA.debugLineNum = 236;BA.debugLine=\"imgPopUp.Initialize(\\\"\\\")\";\nmostCurrent._imgpopup.Initialize(mostCurrent.activityBA,\"\");\n //BA.debugLineNum = 237;BA.debugLine=\"imgPopUp.Bitmap = LoadBitmap(File.DirAssets, \\\"mos\";\nmostCurrent._imgpopup.setBitmap((android.graphics.Bitmap)(anywheresoftware.b4a.keywords.Common.LoadBitmap(anywheresoftware.b4a.keywords.Common.File.getDirAssets(),\"mosquito_larvaFoto.png\").getObject()));\n //BA.debugLineNum = 238;BA.debugLine=\"imgPopUp.Gravity = Gravity.FILL\";\nmostCurrent._imgpopup.setGravity(anywheresoftware.b4a.keywords.Common.Gravity.FILL);\n //BA.debugLineNum = 239;BA.debugLine=\"btnCerrarPopUp.RemoveView\";\nmostCurrent._btncerrarpopup.RemoveView();\n //BA.debugLineNum = 240;BA.debugLine=\"btnCerrarPopUp.Initialize(\\\"btnCerrarPopUp_Larvas\\\"\";\nmostCurrent._btncerrarpopup.Initialize(mostCurrent.activityBA,\"btnCerrarPopUp_Larvas\");\n //BA.debugLineNum = 241;BA.debugLine=\"btnCerrarPopUp.Typeface = Typeface.FONTAWESOME\";\nmostCurrent._btncerrarpopup.setTypeface(anywheresoftware.b4a.keywords.Common.Typeface.getFONTAWESOME());\n //BA.debugLineNum = 242;BA.debugLine=\"btnCerrarPopUp.Text = \\\"\\\"\";\nmostCurrent._btncerrarpopup.setText(BA.ObjectToCharSequence(\"\"));\n //BA.debugLineNum = 243;BA.debugLine=\"btnCerrarPopUp.TextSize = 30\";\nmostCurrent._btncerrarpopup.setTextSize((float) (30));\n //BA.debugLineNum = 244;BA.debugLine=\"btnCerrarPopUp.Color = Colors.ARGB(150,255,255,25\";\nmostCurrent._btncerrarpopup.setColor(anywheresoftware.b4a.keywords.Common.Colors.ARGB((int) (150),(int) (255),(int) (255),(int) (255)));\n //BA.debugLineNum = 245;BA.debugLine=\"btnCerrarPopUp.TextColor = Colors.ARGB(255,255,11\";\nmostCurrent._btncerrarpopup.setTextColor(anywheresoftware.b4a.keywords.Common.Colors.ARGB((int) (255),(int) (255),(int) (117),(int) (117)));\n //BA.debugLineNum = 246;BA.debugLine=\"panelPopUps_2.AddView(imgPopUp, 0%x, 0%y, 70%x, 7\";\nmostCurrent._panelpopups_2.AddView((android.view.View)(mostCurrent._imgpopup.getObject()),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (0),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (0),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (70),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (70),mostCurrent.activityBA));\n //BA.debugLineNum = 247;BA.debugLine=\"panelPopUps_2.AddView(btnCerrarPopUp, 56%x, 0%y,\";\nmostCurrent._panelpopups_2.AddView((android.view.View)(mostCurrent._btncerrarpopup.getObject()),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (56),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (0),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (50)),anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (50)));\n //BA.debugLineNum = 248;BA.debugLine=\"Activity.AddView(panelPopUps_2, 15%x, 15%y, 70%x,\";\nmostCurrent._activity.AddView((android.view.View)(mostCurrent._panelpopups_2.getObject()),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (15),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (15),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (70),mostCurrent.activityBA),anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (70),mostCurrent.activityBA));\n //BA.debugLineNum = 249;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "@Override\r\n public String getInfo() {\r\n return \"Photo name: \"+this.info;\r\n }", "private void postProcessing() {\n // create the element for erode\n Mat erodeElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_ERODE + 1,2 * KERNELSIZE_ERODE + 1 ),\n new Point(KERNELSIZE_ERODE, KERNELSIZE_ERODE));\n // create the element for dialte\n Mat dialElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_DILATE + 1,2 * KERNELSIZE_DILATE + 1 ),\n new Point(KERNELSIZE_DILATE, KERNELSIZE_DILATE));\n\n // erode image to remove small noise\n Imgproc.erode(binary, binary, erodeElement);\n\n // dilate the image DILATETIMES to increase what we see\n for (int i = 0; i < DILATETIMES; i++)\n Imgproc.dilate(binary, binary, dialElement);\n }", "private void printData() {\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tlog(\" *** data index \" + i + \" = \" + data.elementAt(i));\n\t\t}\n\t}", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "public void run(String[] args) {\n if (args.length == 0){\n System.out.println(\"Not enough parameters!\");\n System.out.println(\"Program Arguments: [image_path]\");\n System.exit(-1);\n }\n\n // Load the image\n Mat src = Imgcodecs.imread(args[0]);\n\n // Check if image is loaded fine\n if( src.empty() ) {\n System.out.println(\"Error opening image: \" + args[0]);\n System.exit(-1);\n }\n\n // Show source image\n HighGui.imshow(\"src\", src);\n //! [load_image]\n\n //! [gray]\n // Transform source image to gray if it is not already\n Mat gray = new Mat();\n\n if (src.channels() == 3)\n {\n Imgproc.cvtColor(src, gray, Imgproc.COLOR_BGR2GRAY);\n }\n else\n {\n gray = src;\n }\n\n // Show gray image\n showWaitDestroy(\"gray\" , gray);\n //! [gray]\n\n //! [bin]\n // Apply adaptiveThreshold at the bitwise_not of gray\n Mat bw = new Mat();\n Core.bitwise_not(gray, gray);\n Imgproc.adaptiveThreshold(gray, bw, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 15, -2);\n\n // Show binary image\n showWaitDestroy(\"binary\" , bw);\n //! [bin]\n\n //! [init]\n // Create the images that will use to extract the horizontal and vertical lines\n Mat horizontal = bw.clone();\n Mat vertical = bw.clone();\n //! [init]\n\n //! [horiz]\n // Specify size on horizontal axis\n int horizontal_size = horizontal.cols() / 30;\n\n // Create structure element for extracting horizontal lines through morphology operations\n Mat horizontalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(horizontal_size,1));\n\n // Apply morphology operations\n Imgproc.erode(horizontal, horizontal, horizontalStructure);\n Imgproc.dilate(horizontal, horizontal, horizontalStructure);\n\n // Show extracted horizontal lines\n showWaitDestroy(\"horizontal\" , horizontal);\n //! [horiz]\n\n //! [vert]\n // Specify size on vertical axis\n int vertical_size = vertical.rows() / 30;\n\n // Create structure element for extracting vertical lines through morphology operations\n Mat verticalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size( 1,vertical_size));\n\n // Apply morphology operations\n Imgproc.erode(vertical, vertical, verticalStructure);\n Imgproc.dilate(vertical, vertical, verticalStructure);\n\n // Show extracted vertical lines\n showWaitDestroy(\"vertical\", vertical);\n //! [vert]\n\n //! [smooth]\n // Inverse vertical image\n Core.bitwise_not(vertical, vertical);\n showWaitDestroy(\"vertical_bit\" , vertical);\n\n // Extract edges and smooth image according to the logic\n // 1. extract edges\n // 2. dilate(edges)\n // 3. src.copyTo(smooth)\n // 4. blur smooth img\n // 5. smooth.copyTo(src, edges)\n\n // Step 1\n Mat edges = new Mat();\n Imgproc.adaptiveThreshold(vertical, edges, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 3, -2);\n showWaitDestroy(\"edges\", edges);\n\n // Step 2\n Mat kernel = Mat.ones(2, 2, CvType.CV_8UC1);\n Imgproc.dilate(edges, edges, kernel);\n showWaitDestroy(\"dilate\", edges);\n\n // Step 3\n Mat smooth = new Mat();\n vertical.copyTo(smooth);\n\n // Step 4\n Imgproc.blur(smooth, smooth, new Size(2, 2));\n\n // Step 5\n smooth.copyTo(vertical, edges);\n\n // Show final result\n showWaitDestroy(\"smooth - final\", vertical);\n //! [smooth]\n\n System.exit(0);\n }", "public void printInfo(){\n System.out.println(\" this is my y \"+(y+1)+\" this is my x \"+ X.valueOfInt(x));\n System.out.println(\"i am full: \"+ isFull);\n }", "private void enhanceImage(){\n }", "public void logScreen(String imageName) {\n this.logScreen(imageName, imageName, thumbHeight, thumbWidth);\n }", "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() + \n \" height \" + getHeight() \n + \" width \" + getWidth();\n return output;\n \n }", "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() + \n \" height \" + getHeight() \n + \" width \" + getWidth();\n return output;\n \n }", "public void stegoTest() {\n\t\tSequentialImageAccessScheme seqImScheme = new SequentialImageAccessScheme();\n\t\tDualLSBImageHidingScheme imHidingScheme = new DualLSBImageHidingScheme();\n\t\tSimpleComponentModulationScheme compModScheme = new SimpleComponentModulationScheme();\n\t\n\t\tCarrierImage carrierImage = new CarrierImage(seqImScheme, imHidingScheme, compModScheme);\n\t\tStoreToList store = new StoreToList(\"logfile.txt\");\n\t\tCharacter nodeForward = '3';\n\t\tCharacter cCMsg = null;\n\t\t\n\t \n\t\tImageManager imgManager = new ImageManager();\n\t\ttry {\n\t\t\t\t//the image to embed data in\n\t\t\t\tFile f = new File(\"Truecolor.png\");\n\t\t\t\tif(f.exists()) {\n\t\t\t\t\t//get the list of encrypted data to embed\n\t\t\t\t\tstore.generateList();\n\t\t\t\t\tList<String> data = store.getEncryptedList();\n\t\t\t\t\t\n\t\t\t\t\tString stegText = nodeForward + \":\" + cCMsg + \":\";\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0; i < data.size(); i++) {\n\t\t\t\t\t\tstegText = stegText + data.get(i) + \" \";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"stegText: \" + stegText);\n\t\t\t\t\t\n\t\t\t\t\tRenderedImage img = imgManager.loadImage(f);\n\t\t\t\t\t\n\t\t\t\t\tcarrierImage.setCarrierImage(img);\n\t\t\t\t \n\t\t\t\t\tHidingText hidingText = new HidingText();\n\t\t\t\t\thidingText.setText(stegText);\n\t\t\t\t\t\n\t\t\t\t\t//embed data in the image chosen\n\t\t\t\t\tcarrierImage.hide(hidingText);\n\t\t\t\t\t//create a new image file to write the stego image to\n\t\t\t\t\tFile fS = new File(\"downloaded/image0.png\");\n\t\t\t\t\tImageManager.writeImage(carrierImage.getCarrierImage(), fS, true);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Finished Steganography\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"File does not exist :/\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t} catch (InvalidTypeException 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} catch (CarrierInitializationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (HidingComponentInitializationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (HidingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (HidingComponentSizeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CarrierSizeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CarrierAccessSchemeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CarrierHidingSchemeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CompatibilityException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\timgManager.terminate();\n\t\t}\n\t}", "public void renderAboutManager()\n {\n background(background);\n t = millis();\n t /= 200.0f;\n shift = -150;\n //imageMode(CENTER);\n image(createdBy,width/2-createdBy.width/2+40,20);\n //image(info,width/2-info.width/2+40,450);\n for(int i = 0; i < img.length; i++)\n {\n image(img[i],width/2+shift,height/5+sin(t-i*0.4f-1)*4);\n shift += img[i].width;\n }\n imageMode(CORNERS);\n }", "private void drawImages() {\n\t\t\r\n\t}", "public static void printHHSV(FqImage imh){\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"h\"+imh.points[i][j].getHHSV() );\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public byte[] getBytes(EscPosImage image) {\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n //\n bytes.write(ESC);\n bytes.write('a');\n bytes.write(justification.value);\n //\n int paramSize = image.getRasterSizeInBytes() + 10;\n int pL = paramSize & 0xFF;\n int pH = (paramSize & 0xFF00) >> 8 ;\n\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(pL); // pl\n bytes.write(pH); // ph\n bytes.write(48); // m\n bytes.write(112); //fn\n bytes.write(48); // a\n bytes.write(graphicsImageBxBy.bx); // bx\n bytes.write(graphicsImageBxBy.by); // by\n bytes.write(49); // c\n\n // bits in horizontal direction for the bit image\n int horizontalBits = image.getWidthOfImageInBits();\n int xL = horizontalBits & 0xFF;\n int xH = (horizontalBits & 0xFF00) >> 8 ;\n // \n // bits in vertical direction for the bit image\n int verticalBits = image.getHeightOfImageInBits();\n // getting first and second bytes separatted\n int yL = verticalBits & 0xFF;\n int yH = (verticalBits & 0xFF00) >> 8 ;\n \n bytes.write(xL);\n bytes.write(xH);\n bytes.write(yL);\n bytes.write(yH);\n // write bytes\n byte [] rasterBytes = image.getRasterBytes().toByteArray();\n bytes.write(rasterBytes,0,rasterBytes.length);\n \n // function 050\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(2); // pl\n bytes.write(0); // ph\n bytes.write(48); //m\n bytes.write(50); //fn\n \n \n \n\n //\n return bytes.toByteArray();\n \n }", "public static void main(String[] args) {\n try {\n File image = new File(\"petite_image.png\");\n ImageSerializer serializer = new ImageSerializerBase64Impl();\n\n // Sérialization\n String encodedImage = (String) serializer.serialize(image);\n System.out.println(splitDisplay(encodedImage,76));\n\n // Désérialisation\n byte[] deserializedImage = (byte[]) serializer.deserialize(encodedImage);\n\n // Vérifications\n // 1/ Automatique\n assert (Arrays.equals(deserializedImage, Files.readAllBytes(image.toPath())));\n System.out.println(\"Cette sérialisation est bien réversible :)\");\n // 2/ Manuelle\n File extractedImage = new File(\"petite_image_extraite.png\");\n new FileOutputStream(extractedImage).write(deserializedImage);\n System.out.println(\"Je peux vérifier moi-même en ouvrant mon navigateur de fichiers et en ouvrant l'image extraite dans le répertoire de ce Test\");\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void showbitmap4() {\n \n \t}", "public void baseTest() {\n\t\tfinal String metaJson = \"{\\\"encoding\\\":\\\"raw\\\",\\\"offset\\\":0,\\\"lookForCompanion\\\":true,\\\"initializeHelper\\\":false,\\\"filtered\\\":false,\\\"datasetName\\\":\\\"dt-helix.nhdr\\\",\\\"table\\\":{\\\"axis maxs\\\":\\\"NaN 2 2 2\\\",\\\"sizes\\\":\\\"7 38 39 40\\\",\\\"data file\\\":\\\"./dt-helix.raw\\\",\\\"type\\\":\\\"float\\\",\\\"axis mins\\\":\\\"NaN -2 -2 -2\\\",\\\"encoding\\\":\\\"raw\\\",\\\"dimension\\\":\\\"4\\\",\\\"endian\\\":\\\"big\\\"},\\\"priority\\\":0.0}\";\n\t\ttestImg(baseFolder().child(\"dt-helix.nhdr\"),\n\t\t\t\"7e36a3c1ba03af681db51fdb78c95e6da31b8a4b\", metaJson, new int[] { 38,\n\t\t\t\t39, 7 }, Axes.X, Axes.Y, Axes.CHANNEL);\n\t}", "@Override\r\n public void info() {\n System.out.println(\"开始介绍\");\r\n }", "void printInfo();", "public static void main(String[] args) {\n\t\t\r\n\t\tArrayList<Lines> result; \r\n\t\tArrayList<Junctions> resultJunction;\r\n\t\tboolean isDarkLine = true;\r\n\t\tboolean doCorrectPosition = false;\r\n\t\tboolean doEstimateWidth = false;\r\n\t\tboolean doExtendLine = true;\r\n\t\tdouble lowerThresh = lowerThreshDefault;\r\n\t\tdouble upperThresh = upperThreshDefault;\r\n\t\tdouble sigma = 3.39;\r\n\t\tresult = new ArrayList<Lines>();\r\n\t\tresultJunction = new ArrayList<Junctions>();\r\n\t\t\r\n\t\tOpener opener = new Opener(); \r\n\t\tString imageFilePath = \"./images/image.jpg\";\r\n\t\tImagePlus imp = opener.openImage(imageFilePath);\r\n\t\tImageProcessor ip = imp.getProcessor();\r\n\t\t\r\n\t\tLineDetector detect = new LineDetector();\r\n\t\tresult.add(detect.detectLines(ip, sigma, upperThresh, lowerThresh, isDarkLine, doCorrectPosition, doEstimateWidth, doExtendLine));\r\n\t\t//usedOptions = detect.getUsedParamters();\r\n\t\tresultJunction.add(detect.getJunctions());\r\n\t\tSystem.out.print(\"helo\");\r\n\r\n\t}", "private void displayDetailMeasurement(Measurement measurement){\n goodVibes.vibrate(60);\n\n String filepath = measurement.getFilepath();\n Bitmap bitmap = translateImgToBitmap(filepath);\n double difference_double = measurement.getDifference();\n DecimalFormat df = new DecimalFormat(\"#0.000\");\n String leftPupil = df.format(measurement.getPupilLeft()) + \"mm\";\n String rightPupil = df.format(measurement.getPupilRight()) + \"mm\";\n String difference = df.format(measurement.getDifference()) + \"mm\";\n String filename = measurement.getFilepath().substring(measurement.getFilepath().lastIndexOf(\"/\")+1);\n DateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy HH:mm\");\n Date date = new Date(measurement.getDate());\n String date_string = dateFormat.format(date).toString();\n\n textLPDetail.setText(leftPupil);\n textRPDetail.setText(rightPupil);\n textDiffDetail.setText(difference);\n textFileDetail.setText(filename);\n textDateDetail.setText(date_string);\n\n detailViewImg.setImageBitmap(bitmap);\n\n if(difference_double > 0.0f) textResult0.setText(\"L > R\");\n if(difference_double < 0.0f) textResult0.setText(\"L < R\");\n if(difference_double == 0.0f) textResult0.setText(\"L = R\");\n\n showLayout(detailViewLayout);\n }", "private void printMatch(){\n nameHomelbl.setText(match.getHomeTeam().getName());\n cittaHomelbl.setText(match.getHomeTeam().getCity());\n nameGuestlbl.setText(match.getGuestTeam().getName());\n cittaGuestlbl.setText(match.getGuestTeam().getCity());\n if(match.getPlayed()) {\n pointsHometxt.setText(String.valueOf(match.getPointsHome()));\n pointsGuesttxt.setText(String.valueOf(match.getPointsGuest()));\n } else {\n pointsHometxt.setText(\"-\");\n pointsGuesttxt.setText(\"-\");\n }\n \n try{\n logoGuestlbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getGuestTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n logoHomelbl.setIcon(new ImageIcon(ImageIO.read(new File(match.getHomeTeam().getLogo())).getScaledInstance(200, 200, Image.SCALE_SMOOTH)));\n \n } catch (IOException ex){\n System.out.println(\"immagine non esistente\");\n JOptionPane.showMessageDialog(null, \"immagine non esistente\");\n }\n }", "public static void main(String[] args){\n\tImage test = new Image(700,700);\n\t//addRectangle(test, 0, 0, 600, 600, -1, -1, -1);\n\t//test.display();\n\taddCircle(test, 300, 300, 100, 255, 255, 255);\n\taddCircle(test, 500, 300, 100, 255, 255, 255);\n\taddCircle(test, 400, 400, 150, 255, 255, 255);\n\taddCircle(test, 350, 350, 25, 0, 0, 0);\n\taddCircle(test, 450, 350, 25, 0, 0, 0);\n\taddCircle(test, 350, 350, 24, 255, 255, 255);\n\taddCircle(test, 450, 350, 24, 255, 255, 255);\n\taddCircle(test, 350, 350, 10, 0, 0, 0);\n\taddCircle(test, 450, 350, 10, 0, 0, 0);\n\taddRectangle(test, 325, 475, 150, 20, 0, 0, 0);\n\ttest.setPixel(0,0,255,255,255);\n\ttest.display();\n\tencrypt(test, \"PerfektDokumentation\");\n\ttest.display();\n\tdecrypt(test, \"PerfektDokumentation\");\n\t\n\ttest.display();\n\t}", "@Override\n public void renderNextImage() {\n }", "public void showIntensity()\r\n {\r\n\tshowIntensity(\"Intensity\");\r\n }", "public void startRetriveDataInfo() {\n\t\t\tif (isLog4jEnabled) {\n\t\t\t\n stringBuffer.append(TEXT_2);\n stringBuffer.append(label);\n stringBuffer.append(TEXT_3);\n \n\t\t\t}\n\t\t}" ]
[ "0.6523434", "0.64778304", "0.6411238", "0.6209256", "0.59990436", "0.5974169", "0.59111917", "0.5870021", "0.584783", "0.5824578", "0.57360303", "0.5668313", "0.56603205", "0.56450826", "0.5635433", "0.5629148", "0.561235", "0.55833626", "0.55532247", "0.555", "0.5548465", "0.55429375", "0.5517672", "0.5490819", "0.5490284", "0.54828656", "0.5481932", "0.5464698", "0.5453942", "0.5452826", "0.5431081", "0.54172975", "0.5416872", "0.5414838", "0.5409937", "0.5394109", "0.5387273", "0.5386257", "0.5379866", "0.53754026", "0.5369234", "0.5357775", "0.5355423", "0.5349938", "0.5344876", "0.5336957", "0.53303415", "0.5322293", "0.5299924", "0.52971834", "0.5292102", "0.5290046", "0.52883637", "0.5286972", "0.52786314", "0.52690786", "0.5266108", "0.5259542", "0.52583677", "0.5257", "0.52551305", "0.52432775", "0.5237085", "0.5234403", "0.523302", "0.52265507", "0.5225957", "0.52252537", "0.5220898", "0.5220837", "0.5216574", "0.5214942", "0.52082044", "0.5202119", "0.5196511", "0.5195903", "0.5195903", "0.5186045", "0.5173571", "0.51732224", "0.5172065", "0.51653796", "0.5155166", "0.5155166", "0.5152463", "0.514687", "0.5142551", "0.51422584", "0.5139481", "0.5126105", "0.51211154", "0.51186436", "0.51185435", "0.5117713", "0.51164776", "0.511456", "0.51120853", "0.5106969", "0.510692", "0.51051325", "0.5104709" ]
0.0
-1
/ Constructs a new empty list.
public SinglyLinkedList() { this.head = null; this.tail = null; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> List<T> createList() {\n\t\treturn Collections.emptyList();\n\t}", "public List()\n\t{\n\t\tthis(null, null);\n\t}", "public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }", "@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject = 0;\r\n \t}", "public static LinkedList createEmpty(){\n return new LinkedList();\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }", "public List()\n {\n list = new Object [10];\n }", "List() {\n final int ten = 10;\n list = new int[ten];\n size = 0;\n }", "List() {\n this.length = 0;\n }", "private Lists() { }", "public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }", "public ArrayList() { // constructs list with default capacity\n this(CAPACITY);\n }", "public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }", "public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList () {\n\t\tcapacity = 10;\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[capacity];\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[INIT_SIZE];\n\t}", "public List() {\n\t\tthis.head = null; \n\t}", "@Nonnull\n public static <T> PlayList<T> empty()\n {\n return new PlayList<>();\n }", "@SuppressWarnings(\"unchecked\" )\n public static <T> ConstList<T> make() {\n return emptylist;\n }", "public MutiList() {\n\t\tsuper();\n\t\tthis.myList = new ArrayList<>();\n\t}", "public linkedList() { // constructs an initially empty list\r\n\r\n }", "public MyArrayList() {\r\n\t\tthis.list=new Object[this.capacity];\r\n\t}", "abstract protected Object newList( int capacity );", "public ArrayList()\n {\n list = new int[SIZE];\n length = 0;\n }", "public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "public static <T>\n LazyList<T> empty() {\n return EMPTY;\n }", "public list() {\r\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 }", "private static List<Student> createEmptyList(DataStructureChoice dsChoice) {\r\n\r\n\t\tList<Student> foo = null; /** declared using an Interface declaration */\r\n\t\t\r\n\t\tswitch ( dsChoice ) {\r\n\t\tcase JAVA_ARRAY_LIST:\r\n\t\t\tfoo = new ArrayList<Student>();\r\n\t\t\tbreak;\r\n\t\tcase JAVA_LINKED_LIST:\r\n\t\t\tfoo = new LinkedList<Student>();\r\n\t\t\tbreak;\r\n\t\tcase CSC205_LINKED_LIST:\r\n\t\t\tfoo = new CSC205_Project_1_Linked_List<Student>();\r\n\r\n\t\t\tCSC205_Project_1_Linked_List<Student> fooAlias = \r\n\t\t\t\t\t(CSC205_Project_1_Linked_List<Student>) foo;\r\n\r\n\t\t\tbridges.setDataStructure( fooAlias.getDummyHeader() ); \r\n\r\n\t\t\t/** highlight the dummy header node in red */\r\n\t\t\tfooAlias.getDummyHeader().getVisualizer().setColor( \"RED\" );\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println ( \"Illegal choice of data structure\");\r\n\t\t\tSystem.exit(1); // abort the program\r\n\t\t}\r\n\t\treturn foo;\r\n\t}", "@Test\n\tpublic void createListWithInitialCapacity() {\n\t\tList<String> list1 = new ArrayList<>();\n\n\t\t// You can set capacity using constructor of ArrayList\n\t\tList<String> list2 = new ArrayList<>(20);\n\n\t\tassertTrue(list1.isEmpty());\n\t\tassertTrue(list2.isEmpty());\n\t\tassertTrue(list1.equals(list2));\n\t}", "public LinkedJList() {\n this(DEFAULT_CAPACITY);\n }", "public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList(int initialCap) {\n list = (E[])new Object[0];\n capacity = initialCap;\n size = 0;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tObject[] oList = new Object[INIT_SIZE];\n\t\tlist = (E[]) oList;\n\t\tsize = INIT_SIZE;\n\t}", "public static ImmutableIntList of() {\n return EMPTY;\n }", "public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList1() {\n\t\telements = (E[]) new Object[CAPACITY];\n\t\tsize = 0;\n\t}", "public MyArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }", "public Lista()\n {\n empty=true;\n next = null;\n }", "public ArrayList() {\n\t\tthis(10, 75);\n\t}", "public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }", "public Builder clearList() {\n list_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }", "public SLList()\n {\n head = tail = null;\n }", "public void makeEmpty() {\n for (int i = 0; i < buckets.length; i++) {\n buckets[i] = new SList();\n }\n size = 0;\n }", "public ArrayJList() {\n this(DEFAULT_CAPACITY);\n }", "public ListStack() {\n\t\tlist = new ArrayList<>();\n\t}", "public void emptyList() {\n coursesTaken = new ArrayList<CourseTaken>();\r\n }", "public ListHolder()\n {\n this.list = new TestList(15, false);\n }", "public TempList() {\n list = new ArrayList<T>();\n }", "public SmartList() {\n size = 0;\n storage = null;\n }", "public SimpleList(int capacity) {\n this.values = new Object[capacity];\n }", "public static <T> List<T> createList (T... args) {\n\tif (args == null) { return new ArrayList<T>(); };\n\treturn new ArrayList<T>(Arrays.asList(args));\n }", "public SimpleArrayList() {\n this.values = new Object[SimpleArrayList.DEFAULT_SIZE];\n }", "public ArrayList() {\n //sets an array with no length\n this.array = (E[]) new Object[0];\n }", "public TreeList()\n {\n\t this.lst = new AVLTree();\n\t this.length = 0;\n }", "public MyArrayList() {\n\t\tthis(EXTRA_SPACE);\n\t}", "public static <T> List<T> getOrEmptyList(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }", "public void makeEmpty() {\n System.out.println(\"List is now empty\");\n head = null;\n tail = null;\n\n }", "public DLList() {\r\n init();\r\n }", "ListType createListType();", "public EmptyList(int head, WeirdList tail) {\n super(head, tail);\n }", "public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }", "public NumericObjectArrayList() {\r\n list = new Copiable[10];\r\n count = 0;\r\n }", "List<Wine> emptyMethodReturnList(){\n return List.of();\n }", "public IntList() { // doesn't HAVE to be declared public, but doesn't hurt\n theList = new int[STARTING_SIZE];\n size = 0;\n }", "public VectorLinearList()\n {// use default capacity of 10\n this(10);\n }", "public DLList() {\n head = null;\n tail = null;\n }", "public StudentList() {\r\n\t\t\r\n\t\tlist = new Student[GROW_SIZE];\r\n\t}", "public MyArrayList() {\n mMyArray = new Comparable[10];\n size = 10;\n head = tail = size / 3;\n }", "public CellList() {\n head = null;\n size = 0;\n }", "public ContactList()\n {\n myList = new ArrayList<>();\n }", "public SequenceList() {\n // Only require a single constructor, which sets both object\n // references to null.\n listHead = null;\n listTail = null;\n }", "public ListADTImpl() {\r\n head = new GenericEmptyNode();\r\n }", "public MyArrayList(int capacity){\n if(capacity >= 0)\n elements = new Object[capacity];\n else\n throw new IllegalArgumentException(\"capacity: \" + capacity);\n }", "public CirArrayList() {\n // todo: default constructor\n head = tail = curSize = 0;\n data = (E[])new Object[10];\n }", "public ObjectList(final int initialCapacity) {\n super(initialCapacity);\n }", "public OccList()\n {\n int capacity = 8;\n data = new Occ[capacity];\n // initialize data with empty occ\n for (int i=0; i<capacity; i++) data[i] = new Occ(); \n }", "public List(String name)\n\t{\n\t\tthis(name, null);\n\t}", "public ListMatcher empty() {\n\n\t\tnotNull();\n\t\t\n\t\tif (target.isEmpty()) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthrow getException(\"Expected an empty list but it was %s\", target);\n\t}", "private void createLoanList() {\n\t\tArrayList<Object> loans = new ArrayList<Object>(Arrays.asList(loanArray));\n\t\tfor (int i = 0; i < loans.size(); i++)\n\t\t\tif (((Loan) loans.get(i)).getFineAmount() == 0)\n\t\t\t\tloans.remove(i);\n\t\tlist = new LoanList();\n\t\tlist.setItems(loans);\n\t\tadd(list);\n\t}", "public LinkedList() {\n\t\tthis(\"list\");\n\t}", "@Override\n public void makeEmpty() {\n this.head = null;\n this.tail = null;\n }", "public ListReferenceBased() {\r\n\t numItems = 0; // declares numItems is 0\r\n\t head = null; // declares head is null\r\n }", "@Test\r\n\tpublic void testEmptyConstructor() {\r\n\t\tDoubleList sample = new DoubleList();\r\n\t\tAssert.assertNull(sample.getFirst());\r\n\t}", "public MyList() {\n this(\"List\");\n }", "public static java.util.List singletonList(java.lang.Object arg0)\n { return null; }", "public TempList(int n) {\n list = new ArrayList<T>(n >= 0 ? n : 0);\n }", "public LinkedLists() {\n }", "public LinkedList() {\n\t\titems = lastNode = new DblListnode<E>(null);\n\t\tnumItems=0;\n\t}", "public LinkedJList(int initialCapacity) {\n if (initialCapacity > 0) {\n this.head = new Node(null, this.head, this.head);\n this.tail = this.head;\n } else {\n throw new IllegalArgumentException(\"Illegal Capacity: \" +\n initialCapacity);\n }\n }", "public MyArrayList()\n\t{\n\t\tmyArray = new Object[StartSize];\n\t}", "public TodoList() {\n todoItems = new ArrayList<TodoItem>();// declares and assigns todoItems to the todo list\n }", "private void initList() {\n\n }", "public JSmartList()\n {\n }", "ArrayListOfStrings () {\n list = new ArrayList<String>();\n }", "public List<New> list();", "public ListNode() {\n\t\tthis(0, null);\n\t}", "public MultiList(){}" ]
[ "0.7769319", "0.7502589", "0.73542976", "0.7313922", "0.7287956", "0.72284967", "0.7225825", "0.721154", "0.7208246", "0.72038084", "0.7172709", "0.7140959", "0.7133647", "0.71069217", "0.70805377", "0.7039986", "0.7038353", "0.6975802", "0.69611144", "0.6956671", "0.6948829", "0.69259083", "0.6924608", "0.6922329", "0.6918989", "0.6889881", "0.6854195", "0.6840314", "0.68063104", "0.68032676", "0.68032676", "0.6800089", "0.67644256", "0.67442167", "0.6743121", "0.67429554", "0.6720317", "0.6720069", "0.67153823", "0.6714773", "0.6713148", "0.6697855", "0.6697195", "0.6696493", "0.66685385", "0.664602", "0.66397774", "0.6634659", "0.66101223", "0.6582824", "0.65702474", "0.6558627", "0.65483046", "0.6539538", "0.6526189", "0.65237135", "0.6520701", "0.6505744", "0.65021765", "0.64923835", "0.6483406", "0.6480141", "0.6478334", "0.646795", "0.64544094", "0.6425687", "0.63979095", "0.63803065", "0.6359377", "0.63371307", "0.63306093", "0.632556", "0.6322578", "0.63184845", "0.6310038", "0.62916106", "0.6290452", "0.62818974", "0.62796885", "0.62727374", "0.62712365", "0.6269917", "0.6255206", "0.6252924", "0.62418985", "0.62413776", "0.6239524", "0.6235905", "0.62305164", "0.6220549", "0.62186646", "0.62118423", "0.6204763", "0.61878335", "0.618053", "0.61732596", "0.6171986", "0.6166631", "0.61599755", "0.6159853", "0.61581653" ]
0.0
-1
/ Returns the number of items in the list.
public int size() { return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int getCount() {\n\t\t\treturn list.size();\r\n\t\t}", "public int numItemInList() {\n return nextindex - startIndex;\n }", "public int size() {\n\t\treturn list.size();\n\t}", "public int size() {\n\t return list.size();\n }", "int getItemsCount();", "int getItemsCount();", "public int size(){\n\t\treturn list.size();\n\t}", "public int size(){\n\t\treturn list.size();\n\t}", "public int size()\n {\n return list.size();\n }", "public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size() {\n return list.size();\n }", "int getNumItems();", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "@Override\n\tpublic int size() {\n\t\t\n\t\treturn list.size();\n\t}", "int getListCount();", "public int size() {\n return list.size();\n }", "public int size() {\n return nItems;\n }", "public int size() {\n return numItems;\n }", "public int size() {\n\t\tint numElements = 0;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (list[i] != null) {\n\t\t\t\tnumElements++;\n\t\t\t}\n\t\t}\n\t\treturn numElements;\n\t}", "public int size(){\n return list.size();\n }", "public int size(){\n\n \treturn list.size();\n\n }", "public int size()\n {\n if(_list!=null)\n return _list.size();\n return 0;\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int getSize() \r\n {\r\n return list.size();\r\n }", "public int count() {\n\t\tint q = 0;\n\t\tfor(int i = 0; i < list.length; i++) if (list[i] != null) q++;\n\t\treturn q;\n\t\t\n\t}", "public int size() {\n \treturn numItems;\n }", "public int getSize() {\n return list.size();\n }", "public int size()\n\t{\n\t\treturn listSize;\n\t}", "public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }", "public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }", "public int getListCount() {\n return list_.size();\n }", "public int getSize() {\r\n return list.getItemCount();\r\n }", "@Override\n public int size() {\n return list.size();\n }", "public int size() {\n return items.size();\n }", "public int size() {\r\n return items.size();\r\n }", "public int size() {\r\n return items.size();\r\n }", "public int getCount() {\n return list.size();\n }", "public int getCount() {\n\t\t\treturn mlistData.size();\n\t\t}", "@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}", "public int getListCount() {\n return list_.size();\n }", "public synchronized int size(){\n return list.size();\n }", "public int size(){\n return numItems;\n }", "public int getCount() {\n return mList.size();\n }", "public int listSize(){\r\n return counter;\r\n }", "public int numberOfItems()\n {\n return dessertList.size();\n }", "public int getSize () {\n return this.list.size();\n }", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "@Override\n public int size() {\n\n Node nodePointer = listHead;\n int size = 0;\n while (nodePointer != null) {\n size += 1;\n nodePointer = nodePointer.next;\n }\n return size;\n }", "public int size() {\n return lists.getSize();\n }", "public int getItemsCount() {\n return items_.size();\n }", "public int getItemsCount() {\n return items_.size();\n }", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "int getListSize(int list) {\n\t\treturn m_lists.getField(list, 4);\n\t}", "@Override\n\tpublic int getSize()\n\t{\n\t\treturn list.size();\n\t}", "public int getCount() {\n return listName.length;\n }", "public int length() {\n return numberOfItems;\n }", "@Override\n\tpublic int numerOfItems() {\n\t\treturn usersDAO.numerOfItems();\n\t}", "public int getItemsCount() {\n return items_.size();\n }", "public int getSize()\n {\n return pList.size();\n }", "public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}", "@Override\r\n\t\r\n\t public int size() {\n\t\r\n\t\t return lstItems.size();\r\n\t\r\n\t }", "@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}", "public int getItemCount() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETITEMCOUNT, 0, 0);\n }", "public int len() {\n\t\tint i = 0;\n\t\tif(stringList != null) {\n\t\t\tIterator iterator = stringList.iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\titerator.next();\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn i;\n\t}", "public int getNumberOfItems() {\r\n return decorItems.size();\r\n }", "public int size() {\n\t\tint size = 0;\n\t\tfor (List<?> list : lists) size += list.size();\n\t\treturn size;\n\t}", "int getListCount() {\n\t\treturn m_lists.size();\n\t}", "public int size(){\n return items.size();\n }", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "public int getCount() {\n\t\t\treturn dataList.size();\r\n\t\t}", "public static <AnyType> int listSize(LinkedList<AnyType> theList) {\n LinkedListIterator<AnyType> itr;\n int size = 0;\n\n for (itr = theList.first(); itr.isValid(); itr.advance()) {\n size++;\n }\n\n return size;\n }", "public int size() {\r\n\t\tthis.size= 0;\r\n\t\tfor (DirectoryComponent item : DirectoryList){\r\n\t\t\tthis.size += item.size();\r\n\t\t}\r\n\t\treturn this.size;\r\n\t}", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }", "default int countItems() {\n return countItems(StandardStackFilters.ALL);\n }", "public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}", "@Override\n public int size() {\n if(isEmpty()){ //if list is empty, size is 0\n return 0;\n }\n /*int size = 1; //if list is not empty, then we have at least one element in it\n DLNode<T> current = last; //a reference, pointing to the last element\n while(current.prev != null){\n current = current.prev;\n size++;\n }*/\n \n int count = 0;\n DLNode<T> p = first;\n while (p != null){\n count++;\n p = p.next;\n }\n //return size;\n return count;\n }", "public int getSize()\n\t{\n\t\t// returns n, the number of strings in the list: O(n).\n\t\tint count = 0;\n \t\tnode p = head; \n\t\twhile (p != null)\n \t\t{\n \t\tcount ++;\n \t\tp = p.next;\n \t\t}\n \t\treturn count;\n\t}", "@Override\n public int size() {\n int totalSize = 0;\n // iterating over collectionList\n for (Collection<E> coll : collectionList)\n totalSize += coll.size();\n return totalSize;\n }", "public int size()\n { \t\n \t//initialize a counter to measure the size of the list\n int sizeVar = 0;\n //create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //update counter while there are still nodes\n while(localNode != null)\n {\n sizeVar += 1;\n localNode = localNode.getNext();\n }\n \n return sizeVar;\n }", "public int size(){ return itemCount;}", "public int getListSize() {\n return listSize;\n }", "public int size(){\n if (head == null) {\n // Empty list\n return 0;\n } else {\n return head.size();\n }\n }", "public int size()\r\n {\r\n return count;\r\n }", "public int getItemsCount() {\n if (itemsBuilder_ == null) {\n return items_.size();\n } else {\n return itemsBuilder_.getCount();\n }\n }", "public int getCount() {\n return MyArrList.size();\n }", "public int getCount() {\n\t\treturn lstPara.size();\n\t}", "public int getSize() {\n\t\t\treturn lists.size();\r\n\t\t}", "public int size()\n {\n \tDNode<E> temp=first;\n \tint count=0;\n \twhile(temp!=null)\t\t//Iterating till the end of the list\n \t{\n \t\tcount++;\n \t\ttemp=temp.next;\n \t}\n \treturn count;\n }", "@Nonnegative\n public int getSize()\n {\n return items.size();\n }", "public int getCount() \r\n\t{\r\n\t\tSystem.out.print(\"The number of book in the Array is \");\r\n\t\treturn numItems;\r\n\t\t\r\n\t}", "public int length()\n {\n if(integerList == null)\n return 0;\n else\n return integerList.length;\n }", "public int getListSize() {\n return getRootNode().getItems().size();\n }", "public int getCount() {\n\n if(data.size()<=0)\n return 1;\n return filteredList.size();\n }", "public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "Long getNumberOfElement();" ]
[ "0.81685954", "0.81685954", "0.8083857", "0.8081195", "0.80808336", "0.8075329", "0.8050615", "0.8050615", "0.804967", "0.804967", "0.8045632", "0.80449593", "0.80447745", "0.8037522", "0.7975984", "0.79725856", "0.7952293", "0.79273367", "0.7925698", "0.7914875", "0.78822744", "0.78803664", "0.7871872", "0.783467", "0.78329116", "0.7825454", "0.78219324", "0.7815266", "0.7805016", "0.77878386", "0.7778053", "0.77740705", "0.77671623", "0.77604634", "0.77345484", "0.77322036", "0.7725048", "0.7698692", "0.7698692", "0.7691621", "0.7677491", "0.7667464", "0.7665742", "0.7659321", "0.76586866", "0.764943", "0.7640444", "0.7632674", "0.76251304", "0.76167023", "0.7612541", "0.7602365", "0.75859475", "0.7582121", "0.7582121", "0.7553868", "0.75479394", "0.75472057", "0.7544655", "0.7538933", "0.7512774", "0.7508535", "0.750637", "0.7439921", "0.7434162", "0.74201244", "0.74044645", "0.7386508", "0.7382277", "0.7377799", "0.7375715", "0.73498285", "0.73488486", "0.73462075", "0.7337837", "0.73363554", "0.7334226", "0.7333191", "0.7324827", "0.7294904", "0.72932047", "0.7292387", "0.72888297", "0.7280679", "0.7275743", "0.7269308", "0.7268064", "0.72670084", "0.72646683", "0.7264653", "0.72618467", "0.7258178", "0.72463745", "0.72457004", "0.7239537", "0.7239301", "0.7238617", "0.7236672", "0.7234733", "0.72273004", "0.7208595" ]
0.0
-1
/ Returns whether the list contains an item that is equal to the specified item with respect to the equals method.
public boolean contains(E item) { if(head == null) { return false; } else { for(Node<E> cur = head; cur != null; cur = cur.next) { if(cur.item.equals(item)) { return true; } } return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean contains(Item item) {\n for (Item i : items) {\n if (i == item) return true;\n }\n return false;\n }", "public boolean contains(T item) {\n Iterator<T> iterator = this.iterator();\n while (iterator.hasNext()) {\n if (iterator.next().equals(item))\n return true;\n }\n\n return false;\n }", "public boolean contains(E item) {\n \tDblListnode<E> n = items.getNext();\n \tfor (int k = 0; k < numItems; k++) {\n n = n.getNext();\n if (n.getData() == item) {\n \treturn true;\n }\n }\n \treturn false;\n }", "public boolean member(Object item) {\n\t\tfor (Object element : list)\n\t\t\tif (element.equals(item))\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}", "public boolean has(Object item) {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining (* no earlier element is elem_equals to item *);\n while (ptr != null) {\n if (elem_equals(ptr.val, item)) {\n return true;\n }\n ptr = ptr.next;\n }\n return false;\n }", "public abstract boolean contains(Object item);", "public boolean contains(E item) {\n \t\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \t// create iterator instance to go thru set\n \tIterator<E> iterateSet = this.iterator(); \t\n \twhile(iterateSet.hasNext()) {\n \t\t// searches for a target item\n \t\tif( iterateSet.next().equals(item)) {\n \t\t\treturn true;\n \t\t}\n \t}\n \t\n \treturn false;\n }", "public boolean contains(Item item) {\n\t\tif (item == null)\n\t\t\treturn false;\n\t\tfor (Item other : this)\n\t\t\tif (other.equals(item))\n\t\t\t\treturn true;\n\t\treturn false;\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 Item item = (Item) o;\n return ID == item.ID;\n }", "public boolean contains(E item) {\n if (item == null) {\n throw new NullPointerException();\n }\n else {\n DoublyLinkedNode<E> iter = head.getNext();\n while (iter.getNext() != null) {\n if (iter.getData().equals(item)) {\n return true;\n }\n iter = iter.getNext();\n }\n return false;\n }\n }", "public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains ( Object o ){\n\n \tboolean doesContain = false;\n\n \tfor(int i = 0; i < list.size(); i++){\n\n if(list.get(i).equals(o)){\n doesContain = true;\n }\n\n }\n\n \treturn doesContain;\n\n }", "@Override\n public boolean equals(Object o)\n {\n if (this == o)\n {\n return true;\n }\n if (o == null || getClass() != o.getClass())\n {\n return false;\n }\n\n Item item = (Item) o;\n\n if (getId() != item.getId())\n {\n return false;\n }\n if (getUserId() != item.getUserId())\n {\n return false;\n }\n if (getListId() != item.getListId())\n {\n return false;\n }\n if (getPositionIndex() != item.getPositionIndex())\n {\n return false;\n }\n if (!getTitle().equals(item.getTitle()))\n {\n return false;\n }\n return getBody().equals(item.getBody());\n }", "private boolean itemListContains(Item item){\r\n\t\treturn items.containsKey(item.getItemIdentifier());\r\n\t}", "public boolean equals (Object obj) {\n\t\tif (this.size() != ((List) obj).size()) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i = 0;\n\t\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\t\tif (p.myItem != ((List) obj).get(i)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean contains(T item) {\n int listSize = numItemInList();\n if (listSize == 0) {\n return false;\n }\n\n if (item.getClass() == ShadowSquare.class) {\n ShadowSquare givenSQ = (ShadowSquare) item;\n for (int i = 0; i < listSize; i++) {\n ShadowSquare listSQ = (ShadowSquare) list[startIndex + i];\n if (listSQ.getX() == givenSQ.getX() && listSQ.getY() == givenSQ.getY()) {\n return true;\n }\n }\n }\n\n for (int i = 0; i < listSize; i++) {\n if (list[i + startIndex].equals(item)) {\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }", "public boolean contains(T elem) {\n return list.contains(elem);\n }", "public boolean contains(E item){\n\t\treturn (find(item) != null) ? true : false;\n\t}", "public boolean contains(E item) {\r\n\t\treturn (find(item) != null);\r\n\t}", "public boolean contains(Object o) {\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) return true;\n }\n return false;\n }", "public boolean contains (E item)\n {\n int index = indexOf(item);\n if (index != -1)\n return true; // item found\n else\n return false; // item not found\n }", "@Override\n public boolean contains(T item) {\n //iterate through the array and look for the item\n for(int i = 0; i < numItems; i++){\n //if it is found, return true\n if(item.equals(arr[i]))\n return true;\n }\n return false;\n }", "public boolean contains(E element) {\r\n return items.contains(element);\r\n }", "public Boolean contains(Item itemToCheck) {\n return items.contains(itemToCheck);\n }", "public boolean contains(Item item){\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perfrom contains because the DList instance is empty!\");\n for(Node temp = first.next; temp.next!=null; temp=temp.next)\n if(temp.data.equals(item)) return true;\n return false; \n }", "public boolean contains(int item) {\r\n for (int i = 0; i < NumItems; i++) {\r\n if (items[i] == item) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean contains(int item) {\n if (item == datum() ) return true; // true upon finding the item\n else if (next() == null) return false; // false if item not found until the end of list\n else return next.contains(item); \n }", "public boolean contains(Inventory toCheck) {\n requireNonNull(toCheck);\n return list.stream().anyMatch(toCheck::isSameInventory);\n }", "public boolean equals(LinkedList list){\n if (this.size() == list.size()){\n for (int i = 0; i < this.size(); i++){\n if(this.get(i) != list.get(i)){\n return false;\n }\n }\n return true;\n }else{ \n return false;\n } \n }", "@Override\r\n\tpublic boolean equals(Object ob){\n\t\tItem itemob=(Item)ob;\t//transfer object type to Item type\r\n\t\tif(this.UID==itemob.UID && this.TITLE==itemob.TITLE && this.NOOFCOPIES==itemob.NOOFCOPIES) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(final int item) {\n for (int i = 0; i < size; i++) {\n if (set[i] == item) {\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemid == null && other.itemid != null) || (this.itemid != null && !this.itemid.equals(other.itemid))) {\n return false;\n }\n return true;\n }", "public boolean contains(T item) {\n synchronized(this) {\n return _treeSet.contains(item);\n }\n }", "@Override\r\n\tpublic boolean equals(Object obj) {\r\n\t\tif (this == obj) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (obj == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!(obj instanceof ComponentListItem)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tComponentListItem other = (ComponentListItem) obj;\r\n\t\tif (myComponent == null) {\r\n\t\t\tif (other.myComponent != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else if (!myComponent.equals(other.myComponent)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\t\n\t\tif (o == this)\n\t\t\treturn true;\n\t\t\n\t\tif (o instanceof Item && \n\t\t\t\t((Item)o).getName().equals(this.getName()))\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public boolean contains(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"ArrayList cannot contain a null element.\");\n\t\t}\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(Type item);", "public boolean itemExist(Object item) {\r\n\t\tfor(int i = 0; i < getItemCount(); i++)\r\n\t\t\tif(getItem(i).equals(item))\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "@Override\r\n public boolean equals(Object obj) {\r\n if (this == obj)\r\n return true;\r\n if (obj == null)\r\n return false;\r\n if (getClass() != obj.getClass())\r\n return false;\r\n ItemImpl other = (ItemImpl) obj;\r\n if (id != other.id)\r\n return false;\r\n return true;\r\n }", "public boolean equals(DoublyLinkedList<Element> list) {\n if(super.equals(list)) return true;\n else {\n if(this.size != list.size) return false;\n else {\n Node<Element> temp = header.getNextNode();\n Node<Element> other_temp = list.header.getNextNode();\n while (temp != last() && other_temp != list.last()) {\n if(!temp.getPreNode().equals(other_temp.getPreNode())\n || !temp.getContent().equals(other_temp.getContent())\n || !temp.getNextNode().equals(other_temp.getNextNode()))\n return false;\n temp = temp.getNextNode();\n other_temp = other_temp.getNextNode();\n }\n return true;\n }\n }\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ChecklistItem)) {\n return false;\n }\n ChecklistItem other = (ChecklistItem) object;\n if ((this.idChecklistItem == null && other.idChecklistItem != null) || (this.idChecklistItem != null && !this.idChecklistItem.equals(other.idChecklistItem))) {\n return false;\n }\n return true;\n }", "public boolean contains(Visit toCheck) {\n requireNonNull(toCheck);\n return internalList.stream().anyMatch(toCheck::equals);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Picklistitem)) {\n return false;\n }\n Picklistitem other = (Picklistitem) object;\n return !((this.pickListItemID == null && other.pickListItemID != null) || (this.pickListItemID != null && !this.pickListItemID.equals(other.pickListItemID)));\n }", "@Override\n\tpublic boolean contains(T searchItem) {\n\n\t\tif (indexOf(searchItem) == -1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}", "@Override\n public boolean contains(T item) {\n return itemMap.containsKey(item);\n }", "@Override\n public boolean equals(Object obj) {\n FSItem item=(FSItem)obj;\n return this.fsItemPath.equals(item.fsItemPath);\n }", "public boolean contains(List l) {\n if (lists.contains(l.obtainTitle())) return true;\n else return false;\n }", "@Override\r\n public boolean equals(Object o)\r\n {\r\n items oo = (items)o;\r\n if(this.loc_index==oo.loc_index && this.rule_number==oo.rule_number)\r\n return true;\r\n return false;\r\n }", "boolean checkItem (List<Student> search, int item){\r\n // We use for loop to search\r\n for (int i = 0; i < search.size(); i++) {\r\n // if item exists, then we reutrn true\r\n if (item == i){\r\n return true;\r\n }\r\n }\r\n // else if it doesn't, then we return false\r\n return false;\r\n }", "private boolean in(Integer e, ArrayList<Integer> l) {\n for (int i=0; i<l.size();i++) {\n if (l.get(i) == e) {\n return true;\n }\n }\n return false;\n }", "public boolean containItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getName() == item.getName()) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean contains(T anEntry) {\n\t\tfor(int i=0; i<numberOfElements; i++) {\n\t\t\tif(list[i].equals(anEntry)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(Object elem);", "public boolean contains(Object o);", "public boolean contains(Object o);", "public boolean equals(Object o) {\n if (this == o) return true;\n if (this == null) return false;\n if (!(o instanceof Item)) return false;\n return ((Item)o).getCode().equals(this.code);\n }", "public boolean contains(final Object value) {\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}", "@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemPK == null && other.itemPK != null) || (this.itemPK != null && !this.itemPK.equals(other.itemPK))) {\n return false;\n }\n return true;\n }", "public static boolean itContains(ArrayList<Integer> list, int n) {\r\n\t\tfor (Integer broj : list) {\r\n\t\t\tif (n == broj) {\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Ako ga nema vraca se false\r\n\t\treturn false;\r\n\t}", "private boolean contains(List<PointList> list, PointList pList){\n\t\n\t\tfor (PointList p : list){\n\t\t\tif (p.equals(pList)) return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object obj){\n boolean isEqual = false;\n if (this.getClass() == obj.getClass())\n {\n ItemID itemID = (ItemID) obj;\n if (itemID.id.equals(this.id))\n isEqual = true;\n }\n \n return isEqual;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "public boolean contains(ReadOnlyItem toCheck) {\n assert toCheck != null;\n return internalList.contains(toCheck);\n }", "public boolean contains(E value);", "boolean contains(Object o);", "boolean contains(Object o);", "boolean contains(Object o);", "public abstract boolean contains(E e);", "public boolean equals(Object obj) {\r\n\t\tif (!(obj instanceof PassengerList))\r\n\t\t\treturn false;\r\n\r\n\t\tPassengerList other = (PassengerList) obj;\r\n\r\n\t\tfor (int i = 0; i < passengers.size(); i++) {\r\n\t\t\tif (!(passengers.get(i).equals(other.getPassengerByIndex(i))))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean contains();", "@Override\n public boolean isSame(Item other) {\n return this.equals(other);\n }", "@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof SubscriptionItem)) {\n return false;\n }\n SubscriptionItem other = (SubscriptionItem) object;\n if ((this.subscriptionItemId == null && other.subscriptionItemId != null) || (this.subscriptionItemId != null && !this.subscriptionItemId.equals(other.subscriptionItemId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean contains(Object item) {\n if (item == null)\n return false;\n return map.containsKey(item);\n }", "public boolean contains(E element);", "public boolean contains(E elem) {\n return indexOf(elem) != -1;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof SysItem)) {\r\n return false;\r\n }\r\n SysItem other = (SysItem) object;\r\n if ((this.itemId == null && other.itemId != null) || (this.itemId != null && !this.itemId.equals(other.itemId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean contains(E elem) {\n Iterator<E> inorder = getInorderIterator();\n\n while (inorder.hasNext()) {\n if (inorder.next().equals(elem)) {\n return true;\n }\n }\n return false;\n }", "@Override public boolean equals(Object object);", "public boolean contains(T item){\n if (head.next == tail && tail.prev == head){\n return false;\n }\n else {\n MyDoubleNode<T> counter = head.next;\n boolean shouldContinue = true;\n while (shouldContinue){\n if (counter.next != tail){\n if (counter.data.equals(item)){\n return true;\n }\n counter = counter.next;\n shouldContinue = true;\n }\n else{\n if (counter.data.equals(item)){\n return true;\n }\n shouldContinue = false;\n }\n }\n return false;\n }\n }", "@Override\n\tpublic final boolean equals(Object obj) {\n\t\tif (this == obj) {\n\t\t\treturn true;\n\t\t}\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!(obj instanceof DawsonBallotItem)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tDawsonBallotItem itemObj = (DawsonBallotItem) obj;\n\t\tif (this.choice.equalsIgnoreCase(itemObj.choice)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean contains(E obj)\n {\n Node m = head;\n while( m.getNext() != null)\n {\n m = m.getNext();\n if(m.getValue().equals(obj))\n {\n return true; \n }\n }\n return false;\n }", "public boolean equals(Object obj)\n\t{\n\t\tboolean answer = true;\n\t\t\n\t\tif(obj instanceof Playlist)\n\t\t{\n\t\t\tif(((Playlist)obj).size() == numOfSongs)\n\t\t\t{\n\t\t\t\tfor(int i = 0; i < numOfSongs; i++)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n if(!((Playlist)obj).getSong(i+1).equals(this.getSong(i+1)))\n {\n answer = false;\n break;\n }\n\t\t\t\t\t}\n\t\t\t\t\tcatch (IllegalArgumentException | EmptyPlaylistException e)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"There was a problem in the program\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn answer;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Override\n public final boolean contains(final Object o) {\n return Collections.exists(getComponents(),\n new Assertion<PriorityList<? extends _PriorityElement_>>() {\n public boolean isTrueFor(PriorityList<? extends _PriorityElement_> s) {\n return s.contains(o);\n }\n });\n }", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof EyeTrackerItem)\r\n\t\t{\r\n\t\t\tEyeTrackerItem item = (EyeTrackerItem) obj;\r\n\t\t\tif(item.getId().equalsIgnoreCase(this.getId()))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn super.equals(obj);\r\n\t}", "public final boolean equals(Object obj) {\r\n return this == obj;\r\n }", "public boolean containItem(String name) {\r\n for (Item i : inventoryItems) {\r\n if (i.getName() == name) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@Override\n boolean equals(Object obj);", "public boolean contains(Course c) {\n return courseList.contains(c); \n }", "public boolean contains(E item) {\n\n return bstContains(item, root);\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof PlayListTrack)) return false;\n\n PlayListTrack that = (PlayListTrack) o;\n\n return getTrackId() == that.getTrackId();\n\n }" ]
[ "0.747647", "0.7471992", "0.732071", "0.7270414", "0.7260453", "0.7258839", "0.722876", "0.72196174", "0.72149056", "0.7124577", "0.7122267", "0.7084823", "0.7020639", "0.7011905", "0.7009008", "0.7003234", "0.6991369", "0.6957948", "0.6949985", "0.6938228", "0.6934031", "0.6872426", "0.6834727", "0.6814745", "0.67999643", "0.6799751", "0.67730635", "0.67410064", "0.6735819", "0.6720413", "0.67183256", "0.6680232", "0.6673463", "0.6673463", "0.6673463", "0.667043", "0.6668723", "0.66637933", "0.66220903", "0.66215044", "0.66047454", "0.6597865", "0.65978444", "0.659472", "0.65862834", "0.6561614", "0.6552206", "0.6534199", "0.65138584", "0.65102285", "0.648919", "0.648619", "0.6471469", "0.647086", "0.6453869", "0.6447138", "0.6445253", "0.6443856", "0.6442453", "0.64325607", "0.64325607", "0.6426573", "0.64190596", "0.6418845", "0.64142984", "0.6399411", "0.63909036", "0.63897204", "0.637174", "0.637174", "0.63467616", "0.63461506", "0.6340875", "0.6340875", "0.6340875", "0.63191867", "0.63153833", "0.6311776", "0.63033664", "0.6293825", "0.6293531", "0.6292609", "0.62834007", "0.62804973", "0.6273844", "0.62652445", "0.6256268", "0.6254677", "0.62442476", "0.6236295", "0.6234332", "0.6231255", "0.62044936", "0.61902946", "0.6187461", "0.61837703", "0.61806977", "0.6178943", "0.61736834", "0.61679906" ]
0.6728328
29
/ Adds the specified item to the tail of the list.
public void addLast(E item) { Node<E> n = new Node<>(item); size++; if(tail == null) { // The list was empty head = tail = n; } else { tail.next = n; tail = n; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addLast(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = tail;\n node.prev = tail.prev;\n tail.prev.next = node;\n tail.prev = node;\n size++;\n }", "public void addLast(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tNode<Item> node = new Node<Item>();\n\t\tnode.item = item;\n\t\tif (tail == null) {\n\t\t\thead = node;\n\t\t} else {\n\t\t\ttail.next = node;\n\t\t\tnode.prev = tail;\n\t\t}\n\t\ttail = node;\n\t\tnode.next = null;\n\t\tN++;\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = node;\n } else {\n tail.next = node;\n node.prev = tail;\n tail = node;\n }\n size++;\n }", "public void addLast(Item item){\r\n\t\tif (item == null) throw new NullPointerException();\r\n\t\tif (n == list.length){resize(2*list.length);}\r\n\t\tif(isEmpty()){prior=list.length-1;first=0;last=0;latter=0;}\r\n\t\tlist[latter++]=item;\r\n\t\t last=latter-1;\r\n\t\t if(latter==list.length){latter=0;}\r\n\t\t n++;}", "public void addLast(T listItem) {\n add(listItem);\n }", "public void addLast(Item item) {\n this.doublyLinkedList.addLast(item);\n\n }", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> l = last;\n final Node<Item> newNode = new Node<>(l, item, null);\n last = newNode;\n if (l == null)\n first = newNode;\n else\n l.next = newNode;\n size++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.pre = last;\n if (last == null) {\n last = node;\n first = last;\n }\n else {\n last.next = node;\n last = node;\n }\n len++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldlast = last;\n last = new Node<>();\n last.item = item;\n last.previous = oldlast;\n if (oldlast == null) {\n first = last;\n } else {\n oldlast.next = last;\n }\n size++;\n assert check();\n }", "public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n\n if (this.size == 0) {\n addFirst(item);\n } else {\n this.last.next = new Node(item, null, this.last);\n this.last = this.last.next;\n this.size++;\n }\n }", "public void addLast(E item);", "public void addLast(Item x);", "public void addLast(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextLast] = item;\n nextLast = plusOne(nextLast);\n size += 1;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addLast() with a null argument\");\n }\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if (isEmpty()) {\n first = last;\n }\n else {\n oldLast.next = last;\n last.prev = oldLast;\n }\n n++;\n }", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "public void addLast(Item item) {\n Node oldLast = last;\n last = new Node(oldLast, item, null);\n if (oldLast == null)\n first = last;\n else\n oldLast.next = last;\n size++;\n }", "public void addLast(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot add null item\");\n\t\t}\n\n\t\tNode node = new Node(item);\n\t\tif (last == null) {\n\t\t\tfirst = last = node;\n\t\t} else {\n\t\t\tnode.previous = last;\n\t\t\tlast.next = node;\n\t\t\tlast = node;\n\t\t}\n\t\tsize++;\n\n\t}", "public void addLast(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (lastCursor == items.length) {\r\n resize(2 * items.length);\r\n }\r\n items[lastCursor++] = item;\r\n }", "public void addLast(Item item) {\n if (item == null) throw new IllegalArgumentException(\"argument is null\");\n if (!isEmpty()) {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = last;\n last.next = a;\n last = a;\n\n }\n else {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = null;\n first = a;\n last = a;\n }\n size++;\n\n }", "public void addLast(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addLast(Item item) {\n\t\tif (item == null) throw new NullPointerException();\n\n\t\tcount++;\n\n\t\tNode lastNode = new Node();\n\t\tlastNode.item = item;\n\t\tif (count > 1) {\n\t\t\tlastNode.previous = last;\n\t\t\tlast.next = lastNode;\n\t\t} else {\n\t\t\tfirst = lastNode;\n\t\t}\n\t\tlast = lastNode;\t\n\t}", "public void addLast(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newLast = new Node<Item>(item);\n last.next = newLast;\n newLast.prev = last;\n last = newLast;\n }\n size++;\n }", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n\n if (this.last == null) {\n this.last = new Node();\n this.last.item = item;\n this.first = this.last;\n } else {\n Node newlast = new Node();\n newlast.item = item;\n newlast.prev = this.last;\n this.last.next = newlast;\n this.last = newlast;\n }\n this.n++;\n }", "public void addLast(Object item) throws ListException {\r\n\t\tDoublyNode newNode = new DoublyNode(item);\r\n\t\t//This will add an item to the last spot in the list if the list is not empty\r\n\t\tif(!isEmpty()){\r\n\t\t\t//Set a prevNode pointer to keep track of the node before the new node\r\n\t\t\tDoublyNode prevNode;\r\n\t\t\tprevNode = head.getPrev();\r\n\r\n\t\t\thead.setPrev(newNode);//Set the heads previous pointer\r\n\t\t\tnewNode.setPrev(prevNode);//Set the new nodes previous pointer\r\n\t\t\tnewNode.setNext(head);//Set the new nodes next pointer\r\n\t\t\tprevNode.setNext(newNode);//Set the previous nodes next pointer\r\n\t\t}\r\n\t\t//This will add an item to the last spot in the list of an empty list\r\n\t\telse{\r\n\t\t\thead.setNext(newNode);//Set the head next pointer to the new node\r\n\t\t\thead.setPrev(newNode);//Set the head prev pointer to the new node\r\n\t\t\tnewNode.setNext(head);//Set the new node next pointer to the head\r\n\t\t\tnewNode.setPrev(head);//Set the new node prev pointer to the head\r\n\t\t}\r\n\t\tnumItems++;//Increment number of items\r\n\t}", "public void addLast(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//save old last node\n\t\t\tNode<Item> oldLast = last;\n\t\t\t//assign last node to a new node\n\t\t\tlast = new Node<Item>();\n\t\t\tlast.item = item;\n\t\t\tlast.next = null;\n\t\t\tlast.prev = oldLast;\n\t\t\t//if the first item to add\n\t\t\tif(oldLast == null){\n\t\t\t\tfirst = last;\n\t\t\t}else{\n\t\t\t\toldLast.next = last;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t\t\t\n\t}", "@Override\n\tpublic void insertAtLast(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tNode<T> tmpNode = this.head;\n\t\t\twhile (tmpNode.getNext() != null) {\n\t\t\t\ttmpNode = tmpNode.getNext();\n\t\t\t}\n\t\t\ttmpNode.setNext(newNode);\n\t\t}\n\t\tlistSize++;\n\t}", "public void addLast(Item item) throws NullPointerException {\n if (item == null) {\n throw new NullPointerException(\"Cannot add null item to end of deque\");\n }\n Node n = new Node(); //n = temporary Node\n n.setItem(item);\n if (isEmpty()) { //if item is added to empty deque, set n as head and tail (deque now has 1 node)\n head = n;\n tail = n;\n } else { //else item is added to non-empty deque\n tail.setNext(n);\n n.setPrev(tail);\n tail = n;\n }\n size++; //increment deque size\n }", "public void addLast(Item item) {\n if(isEmpty()) addFirst(item); // if DList is empty, call addFront(Item item)\n else {\n // create a new Node: it's next pointer points to the last sentinel node\n Node newNode = new Node();\n newNode.data = item;\n newNode.next = last;\n // copy the node that last was pointing to previously\n Node oldLast = last.prev;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n // take care of the last sentinel node (no need to take of first):\n last.prev = newNode; \t\t\t\n // update size:\n size++;\n }\n }", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "public void addLast(Item item) throws NullPointerException {\n checkItemNotNull(item);\n\n Node oldlast = last;\n last = new Node(item);\n\n if (isEmpty()) {\n first = last;\n } else {\n oldlast.next = last;\n last.prev = oldlast;\n }\n size++;\n }", "@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }", "public void addLast(E item){\r\n }", "public void addlast(Item item)\r\n {\r\n Node last = post.prev;\r\n Node x = new Node();\r\n x.item = item;\r\n x.next = post;\r\n x.prev = last;\r\n post.prev = x;\r\n last.next = x;\r\n n++;\r\n }", "public void addLast(Item item) {\n deck[bBack--] = item;\n }", "public void addLast(T item) throws Exception {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\tif (isEmpty()) {\n\n\t\t\t// your ll was already empty and now you are adding an element for the 1st time\n\t\t\t// : spcl case\n\t\t\thead = nn;\n\n\t\t} else {\n\n\t\t\t// linking\n\t\t\tNode last = getNodeAt(size() - 1);\n\t\t\tlast.next = nn;\n\n\t\t}\n\t}", "public void addAtEnd(int item) {\n\t\t// pre: a head node is created; length doesn't matter\n\t\t// post: node added in the end; length increased\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t}\n\t\tthis.length++;\n\t}", "public void addLast(Item item) { // initiation\n if (item != null) {\n if (size == 0) {\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else {\n Node oldlast = last;\n last = new Node();\n last.back = null;\n last.item = item;\n last.front = oldlast;\n oldlast.back = last;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "public void addLast(Object item){\n //Using the getNode() method to retrieve the reference and then call addAfter()\n MovieNode target = getNode(size);\t//yo retreive the last MovieNode\n addAfter(target, item);\t\t\t//call the addAfter method \n }", "public void addLast(Item item) {\n verifyItemIsNotNull(item);\n\n // If deque is not empty, then link a new node and point endOfDeque to it\n if (!isEmpty()) {\n // Create a variable that points to the end of deque.\n Node previousEndOfDeck = endOfDeque;\n\n // Point endOfDeque to a new node and set the values\n endOfDeque = new Node();\n endOfDeque.next = null;\n endOfDeque.previous = previousEndOfDeck;\n\n previousEndOfDeck.next = endOfDeque;\n }\n endOfDeque.item = item;\n dequeSize++;\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 void addItem(Object item) {\n\t\tListItem newEnd = new ListItem(item); // Create a new ListItem\n\t\tif (start == null) { // Is the list empty?\n\t\t\tstart = end = newEnd; // Yes, so new element is start and end\n\t\t\tstart.prev = start; \t\t// Prev start refers to itself\n\t\t} else { // No, so append new element\n\t\t\tend.next = newEnd; // Set next variable for old end\n\t\t\tcurrent = end;\t\t\t\t// To reference previous end object \n\n\t\t\t//Point end to the new ListItem object\n\t\t\tend = newEnd; // Store new item as end\n\t\t\tend.prev = current;\t\t// Set prev item in new end\n\t\t}\n\t}", "public void insertAfter(Object item) {\n this.next = new SListNode(item, next);\n }", "public void addLast(E e) { // adds element e to the end of the list\n // TODO\n addFirst(e);\n tail = tail.getNext();\n }", "public void addLast(T element);", "public void append(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n Node lastNode = findNode(size);\n newNode.next = head;\n lastNode.next = newNode;\n size++;\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "@Override\r\n public T add(T item) \r\n {\n Node<T> n = new Node<T>();\r\n n.setItem(item);\r\n\r\n if (head == null) { //first one\r\n head = n;\r\n tail = n;\r\n } else {\r\n tail.setNext(n); //tail's next is the new node\r\n n.setPrevious(tail); //points the new node backwards at the tail\r\n tail = n; //sets tail to the node we added\r\n }\r\n\r\n count++;\r\n\r\n return item;\r\n }", "public void addLast(String item) {\r\n\t\tNode next = header;\r\n\t\twhile (next.next != null) {\r\n\t\t\tnext = next.next;\r\n\t\t}\r\n\t\tNode n = new Node();\r\n\t\tn.value = item;\r\n\t\tnext.next = n;\r\n\t\tn.previous = next;\r\n\r\n\t}", "public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }", "public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }", "private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }", "public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\n }", "public synchronized void addLast(DoubleLinkedListNodeInt node) {\n\t\tnode.setNext(tail);\n\t\tnode.setPrev(tail.getPrev());\n\t\tnode.getPrev().setNext(node);\n\t\ttail.setPrev(node);\n\t\tnode.setOwnerList(this);\n\t\tsize++;\n\t}", "@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 Node<E> addToEnd(Node<E> node){\n Node<E> previous = tail.getPrevious();\n\n previous.setNext(node);\n node.setPrevious(previous);\n tail.setPrevious(node);\n node.setNext(tail);\n size++;\n\n return node;\n }", "@Override\n public void addLast(Item i) {\n resize();\n items[nextLast] = i;\n size += 1;\n nextLast = moveForward(nextLast, 1);\n }", "protected void addToTail(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, null, tail);\n\t\t\n\t\tif(tail != null)\n\t\t\ttail.setNext(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\thead = newElm;\n\t\t\t\n\t\ttail = newElm;\n\t}", "public void append(Object item);", "public void add(T item) \n\t//PRE: The input parameter item can be any type but must be initialized\n\t//POST: The input parameter item is added to the circular linked list\n\t{\n\t\tNode<T> n = new Node<T>(item);\t//initialize new node for list \n\t\tnewState(n);\t\t\t\t\t\n\t\tif(start == null) //if list is empty\n\t\t{ \n\t\t\tstart = n;\n\t\t\tn.next = start;\n\t\t}\n\t\telse \t\t\t//if the list is not empty\n\t\t{ // find end\n\t\t\tNode tmp = start;\n\t\t\twhile(tmp.next != start) \n\t\t\t{ // scan until loop\n\t\t\t\tnewState(tmp);\n\t\t\t\ttmp = tmp.next;\n\t\t\t}\n\t\t\t// tmp.next == start at this point\n\t\t\tn.next = start;\n\t\t\ttmp.next = n; // complete the loop\n\t\t}\n\t\tlength++;\t//increment length of list\n\t\tnewState(null);\n\t}", "@Override\n public void addTail (E el){\n if (el == null)\n return;\n\n // it the list is empty\n if (this.size <= 0){\n this.head = new Node2<E>(el);\n this.tail = this.head;\n this.size = 1;\n return;\n }\n\n Node2<E> temp = new Node2<E>(el);\n this.tail.setNext(temp);\n this.tail = temp;\n this.size++;\n }", "public void addToEnd(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n } else {\n tail.connectNext(current);\n }\n tail = current;\n count++;\n }", "public void addToTail(int i)\r\n\t{\r\n\t\tNode add = new Node(i, null);\r\n\t\t\r\n\t\t// checks if the list is empty then adds value to tail.\r\n\t\tif(start == null)\r\n\t\t{\r\n\t\t\tstart = add;\r\n\t\t}\r\n\t\t\r\n\t\t// checks if the last value is null then adds value to tail.\r\n\t\tif(end == null)\r\n\t\t{\r\n\t\t\tend = add;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// if there are more values in SLL.\r\n\t\tend.next = add;\r\n\t\tend = add;\r\n\t}", "public void addItem(Object item)\r\n {\r\n LLNode newNode;\r\n synchronized (nodeMutex)\r\n {\r\n if (nodePool.size() > 0)\r\n {\r\n newNode = (LLNode)nodePool.lastElement();\r\n newNode.key = item;\r\n newNode.next = newNode.prev = null;\r\n nodePool.removeElementAt(nodePool.size() - 1);\r\n } else\r\n {\r\n newNode = new LLNode(item);\r\n }\r\n }\r\n\r\n if (head == null)\r\n {\r\n head = tail = newNode;\r\n } else\r\n {\r\n tail.next = newNode;\r\n newNode.prev = tail;\r\n tail = newNode;\r\n }\r\n nItems++;\r\n }", "public void add(Item item) {\n Node last = post.previous;\n Node node = new Node();\n node.item = item;\n node.next = post;\n node.previous = last;\n post.previous = node;\n last.next = node;\n size++;\n }", "public /*@ non_null @*/ JMLListEqualsNode<E> append(E item) {\n // To avoid full recursion, we build the reverse of what we want in\n // revret, then reverse it. To make sure we only clone once,\n // we let reverse do the cloning\n JMLListEqualsNode<E> ptr = this;\n JMLListEqualsNode<E> revret = null;\n //@ maintaining (* reverse(revret) concatenated with ptr equals this *);\n while (ptr != null) {\n revret = new JMLListEqualsNode<E>(ptr.val, revret); // don't clone yet\n ptr = ptr.next;\n }\n return (new JMLListEqualsNode<E>(item, revret)).reverse();\n }", "public void addToTheLast(Node node) \n\t{\n\t\tif (head == null) \n\t\t{\n\t\t\thead = node;\n\t\t} else \n\t\t{\n\t\t Node temp = head;\n\t\t while (temp.next != null)\n\t\t temp = temp.next;\n\t\t temp.next = node;\n\t\t}\n }", "public void addLast(T value) {\n Node<T> node = new Node<T>(value);\n Node<T> prev = sentinel.prev;\n\n node.prev = prev;\n prev.next = node;\n sentinel.prev = node;\n node.next = sentinel;\n\n size += 1;\n }", "public void insertAtEndOfList(T item){\n //if (contains(item) == false) {\n MyDoubleNode<T> temp = new MyDoubleNode();\n MyDoubleNode<T> temp2 = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n temp.next = tail;\n tail.prev = temp;\n }\n else {\n temp.data = item;\n temp2 = tail.prev;\n temp.prev = temp2;\n temp2.next = temp;\n temp.next = tail;\n tail.prev = temp;\n\n }\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 add(Item item) {\r\n Node x = current.prev; //prev node\r\n Node y = new Node(); //new node\r\n Node z = current; //current node\r\n y.item = item;\r\n x.next = y;\r\n y.next = z;\r\n z.prev = y;\r\n y.prev = x;\r\n n++;\r\n index++;\r\n lastAccessed = null;\r\n }", "void pushBack(T value) throws ListException;", "public void addLast(TypeHere x) {\n if (size == items.length) {\n resize(size + 1);\n }\n items[size] = x;\n size += 1;\n }", "public void addLast(Item x) {\n StuffNode last = new StuffNode(x, sentinel, null);\n if (this.isEmpty()) {\n last.prev = sentinel;\n sentinel.next = last;\n } else {\n StuffNode oldlast = sentinel.prev;\n last.prev = oldlast;\n oldlast.next = last; // SO MUCH PAIN!!!\n }\n this.sentinel.prev = last;\n size += 1;\n\n }", "public static MyLinkedList addToTail(MyLinkedList list, int value) {\n\n Node toInsert = new Node(value);\n toInsert.next = null; //because it has to be the tail (last node)\n\n // If the Linked List is empty,\n // then make the new node as head\n if (list.head == null) {\n list.head = toInsert;\n } else {\n // Else traverse till the last node\n // and insert the new_node there\n Node last = list.head;\n while (last.next != null) {\n last = last.next;\n }\n // Insert the new_node at last node\n last.next = toInsert;\n }\n return list;\n }", "public void addAtTail(int val) {\n ListNode curr = new ListNode(val);\n size++;\n if (size == 0) {\n head = curr;\n tail = curr;\n }\n tail.next = curr;\n tail = curr;\n }", "public void addNode(int item) { \n //Create a new node \n Node newNode = new Node(item); \n \n //if list is empty, head and tail points to newNode \n if(head == null) { \n head = tail = newNode; \n //head's previous will be null \n head.previous = null; \n //tail's next will be null \n tail.next = null; \n } \n else { \n //add newNode to the end of list. tail->next set to newNode \n tail.next = newNode; \n //newNode->previous set to tail \n newNode.previous = tail; \n //newNode becomes new tail \n tail = newNode; \n //tail's next point to null \n tail.next = null; \n } \n }", "public void pushRight(Item item){\n Node<Item> oldLast = last;\n last = new Node<>();\n last.item = item;\n last.next = null;\n\n if (n == 0) first = last;\n else if(oldLast!=null) oldLast.next = last;\n }", "public void addLast(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n elements[size] = t; //store element at last position\n size++; // increment size\n }", "public void addAfter(MovieNode target, Object item){\n MovieNode insert = new MovieNode(item);\n insert.next = target.next;\n target.next = insert;\n size++;\n }", "public void addLast(Object data) {\n Node newNode = new Node(data);\n if(isEmpty()) {\n addFirst(data);\n } else {\n tail.next = newNode;\n tail = newNode;\n size ++;\n }\n }", "public void addAtTail(E entry) {\n\t\tLinkedNode<E> temp = new LinkedNode<E>(entry, null);\n\t\tsize++;\n\t\tif(head == null) {\n\t\t\thead = temp;\n\t\t\ttail = head;\n\t\t} else {\n\t\t\ttail.setNext(temp);\n\t\t\ttail = temp;\n\t\t}\n\t}", "public void addLast(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(tail);\n tail.getPrevious().setNext(newNode);\n newNode.setPrevious(tail.getPrevious());\n tail.setPrevious(newNode);\n size++;\n }", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "public void addLast(Object e) {\n if(head == null) {\n addFirst(e);\n return;\n }\n\n Node n = new Node(e, tail, null);\n tail.setNext(n);\n tail = n;\n }", "public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public Node<T> addAfter(Node<T> listNode, T t) \r\n {\r\n Node<T> afterNewNode = listNode.next;\r\n Node<T> newNode = new Node<T>(t, listNode, afterNewNode);\r\n listNode.next = newNode;\r\n afterNewNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void enqueue(E item) {\n addLast(item);\n }", "Position<T> addLast(T data);", "public void addAtTail(int val) {\n ListNode ptr=new ListNode(val);\n if(tail==null)\n head = ptr;\n else\n tail.next = ptr;\n tail = ptr;\n size++;\n // display();\n }", "@Override\n public void addLast(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[tail] = value;\n size++;\n return;\n }\n tail = ++tail % dequeue.length;\n dequeue[tail] = value;\n size++;\n if (size == dequeue.length) {\n widen();\n }\n }", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public void addAtTail(int val) {\n addAtIndex(size, val);\n }", "public void addAtTail(int val) {\n addAtIndex(size, val);\n }", "public void addToEnd(T obj) {\r\n \t\t// Check obj is not null\r\n \t\tif(obj == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t// Check if items is full\r\n \t\tif(numItems == items.length) {\r\n \t\t\tdoubleArrayLength();\r\n \t\t}\r\n \t\titems[numItems++] = obj;\r\n \t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(int pos, T item){\n\n\t\tif(pos > data.length){\n\t\t\tcurrentsize = currentsize*2;\n\t\t}\n\n\t\n\t\tfor(int i = currentsize; i > pos; i--){\n\t\t\tdata[i] = data[i-1];\n\t\t}\n\t\tdata[pos]= item;\n\t\tcurrentsize++;\n\t}", "public RNode insertAtBack(int item) {\n if (next == null) {\n next = new RNode(item, null);\n return this;\n } else {\n next = next.insertAtBack(item);\n return this; \n }\n }", "public void addLast(E x) {\n\t\t\n\t\tNode p = mTail;\n\t\tp.data = x;\n\n\t\tmTail = new Node(null, null);\n\n\t\tp.next = mTail;\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void insertEnd(Item item) {\n if (size == 0) insertCreator(item); // if circle is empty\n else { // if these's at least one node already\n Node temp = new Node(item, head, head.before); // creates a new node\n head.before.next = temp;\n head.before = temp;\n }\n size++;\n }", "public void addLast(E e) {\n addBetween(e, trailer.getPrev(), trailer);\n }" ]
[ "0.80121773", "0.7958013", "0.7954832", "0.79452306", "0.7935245", "0.77702713", "0.7752568", "0.77449507", "0.7707544", "0.7704053", "0.76723886", "0.76450264", "0.7610942", "0.7587622", "0.75808066", "0.75807434", "0.7563614", "0.75515133", "0.75141734", "0.751276", "0.7505714", "0.7490099", "0.7488857", "0.74601346", "0.74561524", "0.743953", "0.7425478", "0.7410645", "0.7394332", "0.73613507", "0.7360781", "0.7321253", "0.7275212", "0.72047657", "0.7165232", "0.7150671", "0.71340984", "0.7106999", "0.7097086", "0.70421", "0.68532896", "0.6832775", "0.6806545", "0.67729944", "0.6757597", "0.6734564", "0.6720289", "0.6680508", "0.6674183", "0.66674155", "0.6666986", "0.66663927", "0.6659609", "0.6606606", "0.65949696", "0.65790004", "0.65739036", "0.65554893", "0.65538913", "0.64835465", "0.64713144", "0.6450713", "0.6449626", "0.64354706", "0.6430748", "0.64206105", "0.64091176", "0.6393051", "0.63777554", "0.6372856", "0.6357406", "0.63335234", "0.63322663", "0.632746", "0.63018894", "0.6293189", "0.6291887", "0.62915313", "0.6285598", "0.6253743", "0.6245511", "0.6242757", "0.6238004", "0.6237507", "0.62237006", "0.62166274", "0.6206533", "0.6189476", "0.6182615", "0.61815447", "0.6174219", "0.61667997", "0.61437273", "0.61437273", "0.61361974", "0.6121546", "0.6093362", "0.6051939", "0.60276544", "0.60274976" ]
0.7982903
1
/ Adds the specified item to the head of the list.
public void addFirst(E item) { Node<E> n = new Node<>(item, head); size++; if(head == null) { // The list was empty head = tail = n; } else { head = n; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void insertAtFirst(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tnewNode.setNext(head);\n\t\t\tthis.head = newNode;\n\t\t}\n\t\tlistSize++;\n\t}", "public void addFirst(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tNode<Item> node = new Node<Item>();\n\t\tnode.item = item;\n\t\tif (head == null) {\n\t\t\ttail = node;\n\t\t} else {\n\t\t\thead.prev = node;\n\t\t}\n\t\tnode.next = head;\n\t\thead = node;\n\t\tN++;\n\t}", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = head;\n } else {\n head.prev = node;\n node.next = head;\n head = node;\n }\n\n size++;\n }", "public void addFirst(Item item){\r\n\t\t if (item == null) throw new NullPointerException();\r\n\t\t if (n == list.length){resize(2*list.length);}\r\n\t\t if(isEmpty()){prior=0;first=0;last=0;latter=1;}\r\n\t\t list[prior--]=item;\r\n\t\t first = prior+1;\r\n\t\t if(prior==-1){prior=list.length-1;}\r\n\t\t n++;}", "public void addFirst(Item item){\n this.doublyLinkedList.addFirst(item);\n }", "public void addFirst(T item) {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\t// linking\n\t\tnn.next = head;\n\t\thead = nn;\n\n\t}", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = head.next;\n node.prev = head;\n head.next.prev = node;\n head.next = node;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n if (oldFirst == null) {\n last = first;\n } else {\n oldFirst.previous = first;\n }\n size++;\n assert check();\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.next = first;\n if (first == null) {\n first = node;\n last = first;\n }\n else {\n first.pre = node;\n first = node;\n }\n len++;\n }", "public void addFirst(Object item) {\r\n\t\tdata.add(0, item);\r\n\t}", "public void addFirst(Item item) {\n Node oldFirst = first;\n first = new Node(null, item, oldFirst);\n if (oldFirst == null)\n last = first;\n else\n oldFirst.prev = first;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> f = first;\n final Node<Item> newNode = new Node<>(null, item, f);\n first = newNode;\n if (f == null)\n last = newNode;\n else\n f.prev = newNode;\n size++;\n }", "public void addFirst(Item item) {\n\t\tif (item == null) throw new NullPointerException();\n\t\t\n\t\tcount++;\n\t\t\n\t\tNode firstNode = new Node();\n\t\tfirstNode.item = item;\n\t\tif (count > 1) {\n\t\t\tfirstNode.next = first;\n\t\t\tfirst.previous = firstNode;\n\t\t} else {\n\t\t\tlast = firstNode;\n\t\t}\n\t\tfirst = firstNode;\n\t}", "public void addFirst(Object item) throws ListException {\r\n\r\n\t\tDoublyNode newNode = new DoublyNode(item);\r\n\t\t//This will add to the first slot if the list is not empty\r\n\t\tif(!isEmpty()){\r\n\t\t\t//Set a nextNode pointer to keep track of the node after the new node\r\n\t\t\tDoublyNode nextNode;\r\n\t\t\tnextNode = head.getNext();\r\n\r\n\t\t\tnextNode.setPrev(newNode);//Set the next nodes previous pointer\r\n\t\t\tnewNode.setNext(nextNode);//Set the new nodes next pointer\r\n\t\t\tnewNode.setPrev(head);//Set the new nodes previous pointer\r\n\t\t\thead.setNext(newNode);//Set the heads next pointer\r\n\t\t}\r\n\t\t//This will add to the first slot if the list is empty\r\n\t\telse{\r\n\t\t\thead.setNext(newNode);//Set the head next pointer to the new node\r\n\t\t\thead.setPrev(newNode);//Set the head prev pointer to the new node\r\n\t\t\tnewNode.setNext(head);//Set the new node next pointer to the head\r\n\t\t\tnewNode.setPrev(head);//Set the new node prev pointer to the head\r\n\t\t}\r\n\t\tnumItems++;//Increment number of items\r\n\t}", "public void addFirst(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot add null item\");\n\t\t}\n\n\t\tNode node = new Node(item);\n\t\tif (first == null) {\n\t\t\tfirst = last = node;\n\t\t} else {\n\t\t\tnode.next = first;\n\t\t\tfirst.previous = node;\n\t\t\tfirst = node;\n\t\t}\n\t\tsize++;\n\n\t}", "public void addFirst(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newFirst = new Node<Item>(item);\n newFirst.next = first;\n first.prev = newFirst;\n first = newFirst;\n }\n size++;\n }", "public void addFirst(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//Save old first node\n\t\t\tNode<Item> oldFirst = first;\n\t\t\t//assign first node to a new node\n\t\t\tfirst = new Node<Item>();\n\t\t\tfirst.item = item;\n\t\t\tfirst.prev = null;\n\t\t\tfirst.next = oldFirst;\n\t\t\t//link the old first to new first\n\t\t\t//if the first item to add\n\t\t\tif(oldFirst == null){\n\t\t\t\tlast = first;\n\t\t\t}else{\n\t\t\t\toldFirst.prev = first;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t}", "public void addFirst(E item){\r\n\r\n //checking the precondition\r\n\tif(item == null){\r\n\t\tthrow new IllegalArgumentException(\" item cannot equal null \");\r\n\t}\r\n\t\r\n\t//creating a new front of the list\r\n\tDoubleListNode<E> firstNode = new DoubleListNode<E>(end.getPrev(), item, null);\r\n\t\r\n\t//setting the front of the list to the head\r\n\tfirstNode.setNext(head);\r\n\t\r\n\t//setting the head to new first node\r\n\thead = firstNode;\r\n\t\r\n\t//setting the headData\r\n\theadData = head.getData();\r\n\t\r\n\r\n\r\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addFirst() with a null argument\");\n }\n Node<Item> oldFirst = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFirst;\n if (isEmpty()) {\n last = first;\n }\n else {\n // first.prev = oldFirst;\n oldFirst.prev = first;\n }\n n++;\n }", "public void addFirst(Item item) {\n if (item == null) throw new IllegalArgumentException(\"argument is null\");\n if (!isEmpty()) {\n Node a = new Node();\n a.item = item;\n a.prev = null;\n a.next = first;\n first.prev = a;\n first = a;\n }\n else {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = null;\n first = a;\n last = a;\n }\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n\n this.first = new Node(item, this.first, null);\n\n if (this.size == 0) {\n this.last = this.first;\n } else {\n this.first.next.prev = this.first;\n }\n\n this.size++;\n }", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public void addFirst(Item item) throws NullPointerException {\n checkItemNotNull(item);\n\n Node oldfirst = first;\n first = new Node(item);\n\n if (isEmpty()) {\n last = first;\n } else {\n oldfirst.prev = first;\n first.next = oldfirst;\n }\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n first = new Node<Item>();\n first.item = item;\n last = first;\n } else {\n Node<Item> oldFrist = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFrist;\n oldFrist.prev = first;\n }\n N++;\n }\n }", "public void prepend(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n newNode.next = head.next;\n head.next = newNode;\n size++;\n }", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode oldHead;\n \t\toldHead = head;\n \t\thead = new Node();\n \t\thead.item = item;\n \t\thead.next = oldHead;\n \t\ttail.next = head;\n \t}\n \tsize++;\n }", "public void addFirst(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n\n if (this.first == null) {\n this.first = new Node();\n this.first.item = item;\n this.last = this.first;\n } else {\n Node newfirst = new Node();\n newfirst.item = item;\n newfirst.next = this.first;\n this.first.prev = newfirst;\n this.first = newfirst;\n }\n this.n++;\n }", "public void addFirst(Object item){\n MovieNode first = new MovieNode(item);\t//Step 1: Create the MovieNode\n first.next = head.next;\t\t\t//Step 2: Copy the next of head to the next of MovieNode\n head.next = first;\t\t\t\t//Step 3: Update the head next value to point to the new MovieNode\n size++;\t\t\t\t\t\t\t//Step 4: Update the number of nodes in the list\n }", "public void addFirst(Item x);", "public void addFirst(Item item) {\n Node newNode = new Node();\n newNode.data = item;\n // if the DList was already empty:\n if(isEmpty()) {\n // set the next pointer of newNode to last\n newNode.next=last;\n last.prev = newNode;\n newNode.prev=first;\n first.next = newNode;\n }\n // no need to touch the last sentinel node, unless the list was already empty:\n else {\n // copy the old actual node that frist sentinel was point to\n Node oldFirst = first.next;\n first.next = newNode;\n newNode.next = oldFirst;\n newNode.prev=first;\n oldFirst.prev = newNode;\n }\n // update size\n size++;\n }", "public void addfirst(Item item)\r\n {\r\n Node first = pre.next;\r\n Node x = new Node();\r\n x.item = item;\r\n x.prev = pre;\r\n x.next = first;\r\n pre.next = x;\r\n first.prev = x;\r\n n++;\r\n }", "public void addFirst(E item);", "public void add(Item item)\n\t {\n\t Node oldfirst = first;\n\t first = new Node();\n\t first.item = item;\n\t first.next = oldfirst;\n\t N++;\n\t}", "public void addFirst(Item item){\n if (item == null)\n throw new NullPointerException();\n\n DoublyLinkedListNode<Item> node = new DoublyLinkedListNode<Item>(item);\n\n if (this.count == 0){\n this.head = this.tail = node;\n this.count++;\n return;\n }\n\n DoublyLinkedListNode tmp = head;\n head = node;\n head.next = tmp;\n tmp.previous = head;\n\n this.count++;\n }", "public void add(Item item) {\n if (item == null) throw new NullPointerException();\n Node oldFisrt = first;\n first = new Node();\n first.item = item;\n first.next = oldFisrt;\n N++;\n }", "public void addFirst(Item item) {\n if (item != null) {\n if (size == 0) { // initiation for the first adding\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else { // normal front adding\n Node oldfirst = first;\n first = new Node();\n first.front = null;\n first.item = item;\n first.back = oldfirst;\n oldfirst.front = first;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "public void addFirst(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n size += 1;\n }", "public void addAtStart(int item) {\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t\tthis.headNode = new_node;\n\t\t}\n\t\tthis.length++;\n\t}", "public void addFirst(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (firstCursor == 0) {\r\n resize(2 * items.length);\r\n }\r\n items[firstCursor--] = item;\r\n }", "public void addFirst(T item) {\n if (size == 0) {\n array[front] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n front--;\n this.updatePointer();\n array[front] = item;\n size++;\n }", "public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }", "public void add(T item) \n\t//PRE: The input parameter item can be any type but must be initialized\n\t//POST: The input parameter item is added to the circular linked list\n\t{\n\t\tNode<T> n = new Node<T>(item);\t//initialize new node for list \n\t\tnewState(n);\t\t\t\t\t\n\t\tif(start == null) //if list is empty\n\t\t{ \n\t\t\tstart = n;\n\t\t\tn.next = start;\n\t\t}\n\t\telse \t\t\t//if the list is not empty\n\t\t{ // find end\n\t\t\tNode tmp = start;\n\t\t\twhile(tmp.next != start) \n\t\t\t{ // scan until loop\n\t\t\t\tnewState(tmp);\n\t\t\t\ttmp = tmp.next;\n\t\t\t}\n\t\t\t// tmp.next == start at this point\n\t\t\tn.next = start;\n\t\t\ttmp.next = n; // complete the loop\n\t\t}\n\t\tlength++;\t//increment length of list\n\t\tnewState(null);\n\t}", "public void addFirst(T item) {\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, _front, null);\n\t _front.setNext(temp);\n\t _front = temp;\n\t}\n\t_size++;\n }", "public /*@ non_null @*/ JMLListEqualsNode<E> prepend(E item) {\n // cons() handles any necessary cloning\n return cons(item, this);\n }", "@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 addFirst(Item item) throws NullPointerException {\n if (item == null) {\n throw new NullPointerException(\"Cannot add null item to beginning of deque\");\n }\n Node n = new Node(); //n = temporary Node\n n.setItem(item);\n if (isEmpty()) { //if item is added to empty deque, set n as head and tail (deque now has 1 node)\n head = n;\n tail = n;\n } else {\n head.setPrev(n); //else, item is added to non-empty deque\n n.setNext(head);\n head = n;\n }\n size++; //increment deque size\n }", "public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\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 void addFirst(Item item) {\n verifyItemIsNotNull(item);\n\n // If deque is not empty, then link a new node and point headOfDeque to it\n if (!isEmpty()) {\n Node previousHeadOfDeck = headOfDeque;\n\n // Create a new Node and set it's values\n headOfDeque = new Node();\n headOfDeque.next = previousHeadOfDeck;\n\n // Maintain a backtrack link for removeLast\n previousHeadOfDeck.previous = headOfDeque;\n }\n // assign the value to the head node item\n headOfDeque.item = item;\n\n dequeSize++;\n }", "@Override\r\n public T add(T item) \r\n {\n Node<T> n = new Node<T>();\r\n n.setItem(item);\r\n\r\n if (head == null) { //first one\r\n head = n;\r\n tail = n;\r\n } else {\r\n tail.setNext(n); //tail's next is the new node\r\n n.setPrevious(tail); //points the new node backwards at the tail\r\n tail = n; //sets tail to the node we added\r\n }\r\n\r\n count++;\r\n\r\n return item;\r\n }", "void push(T item) {\n contents.addAtHead(item);\n }", "public void push(E item) {\n addFirst(item);\n }", "public void addFirst(Comparable o){\n\t\t head=new ListElement(o,head);\n\t }", "@Override\n public void addFirst(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n } else {\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n }\n size += 1;\n }", "public void addItem(Object item) {\n\t\tListItem newEnd = new ListItem(item); // Create a new ListItem\n\t\tif (start == null) { // Is the list empty?\n\t\t\tstart = end = newEnd; // Yes, so new element is start and end\n\t\t\tstart.prev = start; \t\t// Prev start refers to itself\n\t\t} else { // No, so append new element\n\t\t\tend.next = newEnd; // Set next variable for old end\n\t\t\tcurrent = end;\t\t\t\t// To reference previous end object \n\n\t\t\t//Point end to the new ListItem object\n\t\t\tend = newEnd; // Store new item as end\n\t\t\tend.prev = current;\t\t// Set prev item in new end\n\t\t}\n\t}", "public void enqueue(Object item) {\n\t\tListNode n = new ListNode(item);\n\t\tif(this.l.start==null){\n\t\t\tthis.l.start = n;\n\t\t}\n\t\telse{\n\t\t\tn.next= this.l.start;\n\t\t\tthis.l.start = n;\n\t\t}\n\t}", "void add(Item item);", "void addToHead(int v) {\n if (empty) {\n x = v;\n empty = false;\n }\n else {\n next = new Lista (this);\n x = v;\n }\n }", "@Override\n public void insertFirst(E e) {\n if (listHead == null) {\n listHead = new Node(e);\n listTail = listHead;\n }\n\n // In the general case, we simply add a new node at the start\n // of the list via the head pointer.\n else {\n listHead = new Node(e, listHead);\n }\n }", "public void addItem(Object item)\r\n {\r\n LLNode newNode;\r\n synchronized (nodeMutex)\r\n {\r\n if (nodePool.size() > 0)\r\n {\r\n newNode = (LLNode)nodePool.lastElement();\r\n newNode.key = item;\r\n newNode.next = newNode.prev = null;\r\n nodePool.removeElementAt(nodePool.size() - 1);\r\n } else\r\n {\r\n newNode = new LLNode(item);\r\n }\r\n }\r\n\r\n if (head == null)\r\n {\r\n head = tail = newNode;\r\n } else\r\n {\r\n tail.next = newNode;\r\n newNode.prev = tail;\r\n tail = newNode;\r\n }\r\n nItems++;\r\n }", "public void push(Item item) {\r\n Node oldfirst = first;\r\n first = new Node();\r\n first.item = item;\r\n first.next = oldfirst;\r\n N++;\r\n }", "public void push(Item item){\n\t\tNode oldfirst=first;\r\n\t\tfirst=new Node();\r\n\t\tfirst.item=item;\r\n\t\tfirst.next=oldfirst;\r\n\t\tN++;\r\n\t}", "public void insertAtFrontOfList(T item){\n //if (contains(item) == false){\n MyDoubleNode<T> temp = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n tail.prev = temp;\n temp.next = tail;\n }\n else {\n temp.data = item;\n temp.next = head.next;\n temp.prev = head;\n head.next = temp;\n }\n //}\n }", "public void push(T item){\n if (head == null) {\n head = new Node<T>(item, null);\n } else {\n Node<T> tempNode = head;\n Node<T> newHead = new Node<T>(item, tempNode);\n head = newHead;\n }\n }", "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 addFirst(T element);", "void add(T 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 if (winner(item)) {\n listItems.add(item);\n }\n }", "public void addToHead(int i)\r\n\t{\r\n\t\tNode add = new Node(i, null);\r\n\t\tsize++;\r\n\t\t\r\n\t\t// checks if the list is empty, then adds element to head/start.\r\n\t\tif(start == null)\r\n\t\t{\r\n\t\t\tstart = add;\r\n\t\t\tend = start;\r\n\t\t}\r\n\t\telse // if the list has more values inside.\r\n\t\t{\r\n\t\t\tadd.setNext(start);\r\n\t\t\tstart = add;\r\n\t\t}\r\n\t}", "public void push(Item item) {\n Node temp = first;\n first = new Node();\n first.item = item;\n first.next = temp;\n n++;\n }", "public void add(Item item) {\r\n Node x = current.prev; //prev node\r\n Node y = new Node(); //new node\r\n Node z = current; //current node\r\n y.item = item;\r\n x.next = y;\r\n y.next = z;\r\n z.prev = y;\r\n y.prev = x;\r\n n++;\r\n index++;\r\n lastAccessed = null;\r\n }", "@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}", "public void add(Item item) {\n Node last = post.previous;\n Node node = new Node();\n node.item = item;\n node.next = post;\n node.previous = last;\n post.previous = node;\n last.next = node;\n size++;\n }", "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 putItemLIFO(T item) {\n\t\tNode newItem = new Node(item);\n\t\tif (first == null) { \n\t\t\tfirst = newItem; \n\t\t} else {\n\t\t\tnewItem.next = first;\n\t\t\tfirst = newItem;\n\t\t}\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "public void addItemToList(Item item) {\n\t\tif (item != null) {\n\t\t\tif (!items.contains(item)) {\n\t\t\t\titems.add(item);\n\t\t\t}\n\t\t}\n\t}", "void pushFront(T value) throws ListException;", "public void insertFirst( T data )\n\t{\n\t\t//make a new node to insert it\n\t\tLinkedListNode<T> newNode = new LinkedListNode<T>();\n\t\t//add data to the node\n\t\tnewNode.setData(data);\n\t\t//link up the new node by\n\t\t//have the new node point to the old current node\n\t\tnewNode.setNext(head);\n\t\t//set the new node as the head\n\t\thead = newNode;\t\n\t\t//increment the size of the list\n\t\tlistSize++;\n\t}", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "protected void addToHead(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, head);\n\t\t\n\t\tif(head != null)\n\t\t\thead.setPrev(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\ttail = newElm;\n\t\t\t\n\t\thead = newElm;\n\t}", "public void pushLeft(Item item){\n if (isEmpty()){\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n last = first;\n n++;\n }else{\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n n++;\n }\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}", "public void addFront(E item) {\r\n\t\tNode<E> node = new Node<E>(item, first);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;//it would be the first node so it would be first and last\r\n\t\telse {\r\n\t\t\tfirst = node;//creates a new node and puts it in the 1st position\r\n\t\t}\r\n\t}", "@Override\n public void insert(E newItem) {\n if (list.size()==0)\n list.add(newItem);\n else\n {\n ListIterator<E> itList = list.listIterator();\n boolean isAdded=false;\n while (itList.hasNext())\n {\n int status=newItem.toString().compareTo(itList.next().toString());\n if(status==0)\n {\n itList.add(newItem);\n isAdded=true;\n }\n else if(status<0)\n {\n if (itList.hasPrevious())\n itList.previous();\n itList.add(newItem);\n isAdded=true;\n break;\n }\n }\n if (!isAdded)\n {\n list.add(newItem);\n }\n }\n\n }", "@Override\n public void add(T newItem) {\n LinkedElement<T> tmpElement = new LinkedElement<>(newItem);\n\n if (firstElement == null) {\n firstElement = tmpElement;\n size = 1;\n } else {\n LinkedElement<T> currentElement = firstElement;\n while (currentElement.next != null) {\n currentElement = currentElement.next;\n }\n // currentElement is the last element in the list, now. Meaning that currentElement.next is null.\n currentElement.next = tmpElement; // These two are pointing at each other now.\n tmpElement.prev = currentElement;\n size++;\n }\n }", "public void add(E item);", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\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}", "public void add(final int item) {\n if (!contains(item)) {\n set[size] = item;\n size += 1;\n }\n }", "public void insertStart(Item item) {\n if (size == 0) insertCreator(item); // if circle is empty\n else { // if these's at least one node already\n Node temp = head;\n head = new Node(item, temp, temp.before); // creates new node\n temp.before.next = head;\n temp.before = head;\n }\n size++;\n }", "public void addFirst(Item x) {\n StuffNode f = new StuffNode(x, null, sentinel);\n if (this.isEmpty()) {\n f.next = sentinel;\n sentinel.prev = f;\n } else {\n StuffNode oldfirst = sentinel.next;\n oldfirst.prev = f; // SO MUCH PAIN!!!\n f.next = oldfirst;\n }\n this.sentinel.next = f;\n size += 1;\n\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\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 }" ]
[ "0.78788346", "0.78242785", "0.78099936", "0.7797929", "0.7787271", "0.7773455", "0.7745563", "0.7707229", "0.76922125", "0.7662983", "0.7657838", "0.7641288", "0.7596051", "0.7575813", "0.75638574", "0.7543688", "0.7541964", "0.7515165", "0.75112844", "0.75002104", "0.74864614", "0.74517226", "0.74246585", "0.7423629", "0.74169654", "0.7401315", "0.7400996", "0.74002904", "0.73986036", "0.7357412", "0.7356844", "0.72657233", "0.7263673", "0.7252812", "0.7249309", "0.72306556", "0.7224666", "0.71880245", "0.71390903", "0.7132881", "0.71243894", "0.7065839", "0.7032156", "0.7026165", "0.6956881", "0.69399834", "0.69259757", "0.6876883", "0.68673056", "0.6866195", "0.6787826", "0.678716", "0.67871237", "0.6779578", "0.67549855", "0.6729315", "0.670117", "0.6693784", "0.66814953", "0.6675472", "0.6648301", "0.6627553", "0.65941703", "0.6563474", "0.6560364", "0.6558652", "0.6553114", "0.6550533", "0.65472496", "0.65358424", "0.65342236", "0.6532277", "0.65199685", "0.65019614", "0.64846784", "0.6470504", "0.64602846", "0.64232785", "0.6409331", "0.6409022", "0.6407304", "0.6396244", "0.6384817", "0.63684446", "0.63657945", "0.63657945", "0.63624877", "0.6361967", "0.6352059", "0.63435173", "0.633051", "0.6319616", "0.6315348", "0.630908", "0.63018817", "0.6296923", "0.6294983", "0.62866324", "0.6286073", "0.62796366" ]
0.80396676
0
/ Returns whether the list is empty.
public boolean isEmpty() { return size == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn list.isEmpty();\n\t}", "public static boolean empty() {\n\n if (list.size() != 0){\n return false;\n }\n return true;\n }", "public boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty(){\n\n \treturn list.size() == 0;\n\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty() {\n return list.isEmpty();\n }", "public synchronized boolean isEmpty () {\n return list.isEmpty();\n }", "public boolean empty() {\n if (list.size() == 0) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean isEmpty(){\n\t\tif(list.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean empty() {\n return list.isEmpty();\n }", "public synchronized boolean isEmpty(){\n return list.isEmpty();\n }", "public boolean isEmpty() {\r\n\t\treturn al.listSize == 0;\r\n\t}", "public boolean isEmpty(){\n return this.listSize == 0;\n }", "@Override\n\tpublic boolean isEmpty()\n\t{\n if (list.isEmpty())\n {\n return true;\n } \n else\n {\n return false;\n }\n\t}", "public /*@ pure @*/ boolean isEmpty() {\n return the_list == null;\n }", "public boolean isEmpty() // true if list is empty\r\n\t{\r\n\t\treturn (first == null);\r\n\t}", "public boolean empty()\n {\n boolean result = (dataList.size() == 0) ? true : false;\n return result;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn data != null && data.list != null && data.list.isEmpty();\r\n\t}", "public boolean isEmpty() {\n\t\treturn firstNode == null; // return true if List is empty\n\t}", "boolean isListRemainingEmpty();", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "@Override\n public boolean isEmpty()\n {\n return list.size()<1;\n }", "public boolean isEmpty(){\n\t\treturn firstNode == null; //return true if List is empty\n\t}", "public boolean isEmpty() {\n\t\treturn (_items.size() == 0);\n\t}", "boolean isEmpty() {\n return this.myArrayList.isEmpty();\n }", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public boolean isEmpty()\n {\n //this method is used to check length\n //replacing head == null so I don't have to maintain a head\n //also error checks for null lists\n return (entryList == null || (entryList.size() == 0));\n //just doing .size() == 0 will raise a null pointer exception on occasion\n }", "public boolean isEmpty() {\n\t\treturn allItems.size() == 0;\n\t}", "public boolean isEmpty() {\n return dataList.size() <= 0 || (dataList.size() == 1 && dataList.get(0).isEmpty());\n }", "boolean isEmpty() {\n\t\treturn m_list_nodes.size() == 0;\n\t}", "public boolean isEmpty()\r\n\t{\r\n\t\treturn numItems == 0 ;\r\n\t}", "public boolean isEmpty()\r\n {\r\n return (size() == 0);\r\n }", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean isEmpty() {\n\t\t//if head is null\n\t\tif (head == null) {\n\t\t\t//return true, no items in list\n\t\t\treturn true;\n\t\t}\n\t\t//otherwise\n\t\treturn false;\n\t}", "public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "public boolean isEmpty() {\r\n return NumItems == 0;\r\n }", "private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "boolean isEmpty(int list) {\n\t\treturn m_lists.getField(list, 0) == -1;\n\t}", "public static boolean isEmpty() \r\n\t{\r\n\t\treturn m_count == 0;\r\n }", "public boolean isEmpty() {\n\t\tif (l.getHead() == null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isEmpty(){\n for(int i = 0; i < arrayList.length; i++) {\n if (arrayList[i] != null)\n return false;\n }\n return true;\n }", "public boolean isEmpty() {\n\t\treturn(this.size == 0);\n\t}", "public boolean isEmpty() {\n return (size() == 0);\n }", "public boolean isEmpty()\n {\n return this.size == 0;\n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty()\r\n\t{\r\n\t\treturn (count == 0);\r\n\t}", "public boolean isEmpty() {\n return (this.size == 0);\n }", "public boolean isEmpty() {\n\n\t\tif (numItems == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t}", "public boolean isEmpty() {\n if (head == null && tail == null) {\n System.out.println(\"This list is empty\");\n return true;\n } else {\n return false;\n }\n }", "public boolean isEmpty() \r\n\t{\r\n\t\treturn size() == 0;\r\n\t}", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean empty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean empty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\n\t return size() == 0;\n\t }", "public boolean isEmpty() \n\t {\n\t\t return (size()==0);\n\t }", "public boolean isEmpty() {\n return size() == 0;\n }", "public static boolean isEmpty(List list){\n\n if(list == null){\n return true;\n }\n if(list.size() == 0){\n return true;\n }\n return false;\n }", "public boolean isEmpty() {\n \tif (numItems==0) {\n \t\treturn true;\n \t}\n \treturn false;\n }", "public boolean isEmpty() {\r\n return items.isEmpty();\r\n }", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "private boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public synchronized boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty(){\r\n\t\treturn size() == 0;\r\n\t}", "public boolean isEmpty() {\n return items.isEmpty();\n }", "public boolean isEmpty() {\n return items.isEmpty();\n }", "public boolean isEmpty() {\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tStudent emptyChecker;\r\n\t\tint size = sizeOfList(list);\r\n\t\twhile (i < size) {\r\n\t\t\temptyChecker = list[i];\r\n\t\t\tif (emptyChecker != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tnumStudents = 0;\r\n\t return true;\r\n\t}", "public boolean empty() {\r\n\r\n\t\tif(item_count>0)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty() {\n return size() == 0;\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn count == 0;\r\n\t}", "public boolean isEmpty() {\n return (size == 0);\n\n }", "public boolean isEmpty() {\n\t return size == 0;\n\t }", "public boolean isEmpty()\n {\n return elements.isEmpty();\n }", "public boolean isEmpty()\r\n {\r\n if (count > 0) return false;\r\n else return true;\r\n }", "public boolean isEmpty(){\n return(numItems == 0);\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty()\n {\n return ll.getSize()==0? true: false;\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty(){\n return itemCount == 0;\n }", "public boolean empty() { \t \n\t\t return size <= 0;\t \n }" ]
[ "0.90574485", "0.89534163", "0.89299667", "0.8920842", "0.88430256", "0.884125", "0.884125", "0.8830707", "0.8795463", "0.8781466", "0.8768718", "0.87571573", "0.8751224", "0.86383754", "0.8630301", "0.85316926", "0.8520188", "0.8469121", "0.8417308", "0.83924735", "0.83803904", "0.8361346", "0.83490705", "0.8320873", "0.8295024", "0.8222257", "0.8222188", "0.8203262", "0.81800884", "0.8175721", "0.81739676", "0.8167648", "0.81649953", "0.81574744", "0.81448853", "0.8127524", "0.812387", "0.8111061", "0.8107611", "0.8106985", "0.8099731", "0.80992556", "0.80989116", "0.8090337", "0.8089374", "0.8087689", "0.80869013", "0.8086892", "0.80831695", "0.80777776", "0.80758107", "0.8067391", "0.8058363", "0.80552584", "0.80509615", "0.80504495", "0.80504495", "0.8050062", "0.80457973", "0.8045307", "0.8043713", "0.8041536", "0.8041283", "0.8036207", "0.80360943", "0.8029206", "0.8028061", "0.8028061", "0.8028061", "0.8028061", "0.80269814", "0.8021118", "0.8017354", "0.8015342", "0.8013288", "0.8013288", "0.8012099", "0.80102736", "0.8009645", "0.8009645", "0.8009645", "0.8009645", "0.8009645", "0.8009645", "0.8009645", "0.8009645", "0.8009645", "0.8009645", "0.8008211", "0.8005024", "0.80033857", "0.80029166", "0.7998173", "0.79966754", "0.7994577", "0.7994577", "0.7994577", "0.7993417", "0.7983151", "0.79831", "0.79811585" ]
0.0
-1
/ Removes all of the items in the list.
public void clear() { head = tail = null; size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllItems ();", "void clear() {\n\t\tfor (int list = getFirstList(); list != -1;) {\n\t\t\tlist = deleteList(list);\n\t\t}\n\t}", "public void removeAllItems() {\n contents.clear();\n }", "public void removeAllItem() {\n orderList.clear();\n }", "public void clearItems(){\n items.clear();\n }", "public void removeAllItems()\r\n {\r\n head = tail = null;\r\n nItems = 0;\r\n }", "public void delAll(List list);", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAll();", "public void removeAllElements();", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "public void clear() {\n\t\tlists.clear();\n\t}", "public void clear() {\r\n\t\titems.clear();\r\n\t}", "public void clear(){\n this.items.clear();\n }", "public void removeAll() {\n this.arrayList = null;\n this.arrayList = new ArrayList<>();\n }", "void removeAll();", "void removeAll();", "public void clearList() {\n\t\tdeletedList.clear();\n\t}", "public void clear()\n {\n int llSize = ll.getSize();\n for(int i=0; i<llSize; i++){\n ll.remove(0);\n }\n }", "public void clearItems() {\n grabbedItems.clear();\n }", "public void clear() {\n items.clear();\n update();\n }", "@Override\n public void clear() {\n for (E e : this) {\n remove(e);\n }\n }", "public void clearList()\n {\n for (Category item : itemsList)\n {\n item.setSelected(false);\n }\n notifyDataSetChanged();\n }", "public void clearList()\n\t{\n\t\tnodeManager.clearList();\n\t}", "public void\t\tremoveAll();", "public void empty() {\n _items.clear();\n }", "void clear(int list) {\n\t\tint last = getLast(list);\n\t\twhile (last != nullNode()) {\n\t\t\tint n = last;\n\t\t\tlast = getPrev(n);\n\t\t\tfreeNode_(n);\n\t\t}\n\t\tm_lists.setField(list, 0, -1);\n\t\tm_lists.setField(list, 1, -1);\n\t\tsetListSize_(list, 0);\n\t}", "public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }", "public void removeAll() {\n\t\thead = new DoublyNode(null);\r\n\t\thead.setPrev(head);\r\n\t\thead.setNext(head);\r\n\t\tnumItems = 0;\r\n\t}", "abstract public void removeAll();", "public void clear() {\r\n items = Arrays.copyOf(new int[items.length], items.length);\r\n NumItems = 0;\r\n }", "public void reset() {\n this.list.clear();\n }", "public void clearList() {\n\t\thead = null;\n\t\tlength = 0;\n\t}", "public void clearList() {\n data.clear();\n notifyDataSetChanged();\n }", "public void clear() {\n listItems.clear();\n notifyDataSetChanged();\n }", "void clear()\n\t{\n\t\tgetItems().clear();\n\t}", "public void clear() {\n list = new Object[MIN_CAPACITY];\n n = 0;\n }", "public void clearList() {\n\t\tthis.head = null;\n\t\tthis.tail = null;\n\t\tlength = 0;\n\t}", "public void clearListNotIndex(){\n for(int z=0; z<list.length; z++){\n list [z] = 0;\n }\n }", "public void clearList() {\n ShoppingList.deleteAll(ShoppingList.class);\n ShoppingItem.deleteAll(ShoppingItem.class);\n lists.clear();\n notifyDataSetChanged();\n }", "public void clear() {\n\t\tallItems.clear();\n\t\tminimums.clear();\n\t}", "public void clear() {\n int count = mItems.size();\n mItems.clear();\n getFastAdapter().notifyAdapterItemRangeRemoved(getFastAdapter().getItemCount(getOrder()), count);\n }", "public void clear() {\n list.clear();\n notifyDataSetChanged();\n }", "public void clear() {\n\t\twordList.removeAll(wordList);\n\t\t// TODO Add your code here\n\t}", "public static void clearList(ArrayList<Student> sList){\n\t\tsList.clear();\n\t}", "public void deleteAllItineraryItems() {\n\t\tmEditor.clear();\n\t\tmEditor.commit();\n\t}", "public void clearItems(){\n\t\tinnerItemShippingStatusList.clear();\n\t}", "public void removeAll()\n {\n if (elemsListLayout != null)\n {\n elemsListLayout.clear();\n }\n }", "public void unRegAll(){\n \t\t\n \t\tfor(ShopItem shopItem : itemList){\n \t\t\t//TODO: process more then one item at the same time.\n \t\t\t/*\n \t\t\tint position = shopItem.getShopPosition().getSlot();\n \t\t\tif(processedPositions.contains(position))\n \t\t\t\tcontinue;\n \t\t\tprocessedPositions.add(position);\n \t\t\tint amount = getItemAmount(position);\n \t\t\t*/\n \t\t\tint amount = 1;\n \t\t\tgetOwner().getClient().sendPacket(Type.U_SHOP, \"unreg\", 1, shopItem.getShopPosition().getSlot(), amount);\n \t\t\t\n \t\t\t//int[] freePosition = getOwner().getInventory().getFreeSlots(shopItem.getItem(), -1);\n \t\t\t//InventoryPosition inventoryPosition = new InventoryPosition(freePosition[1],freePosition[2],freePosition[0]);\n \t\t\t//InventoryItem inventoryItem = new InventoryItem(shopItem.getItem(),\tinventoryPosition);\n \t\t\t//getOwner().getInventory().addInventoryItem(inventoryItem);\n \t\t\tInventoryItem inventoryItem = getOwner().getInventory().storeItem(shopItem.getItem(), -1);\n \t\t\tgetOwner().getClient().sendPacket(Type.INVEN, inventoryItem, getOwner().getClient().getVersion());\n \t\t}\n \t\titemList.clear();\n \t}", "public void removeAll(Object element);", "public void eliminarTodosLosElementos(){\n\t\tlistModel.removeAllElements();\n\t}", "public void clear() {\n size = 0;\n Arrays.fill(items, null);\n }", "protected void clear() {\n\n\t\tthis.myRRList.clear();\n\t}", "public void deleteList() {\n this.head = deleteListWrap(this.head);\n }", "public void clearRandomItems();", "public void removeAllItems() {\n mPapers.clear();\n notifyDataSetChanged();\n }", "public void removeAll() \r\n\t{\t\r\n\t\tbookArray = new String[MAXSIZE];\r\n\t\tnumItems = 0;\r\n\t}", "private void clearLists() {\n\t\tobjects = new ArrayList<Entity>();\n\t\tenemies.clear();\n\t\titemList.clear();\n\t}", "public Builder clearList() {\n list_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }", "public void Reset()\n {\n this.list1.clear();\n }", "public Builder clearItems() {\n items_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }", "public void clear()\n {\n dessertList.clear();\n }", "public void clear() {\n \tIterator<E> iterateSet = this.iterator();\n \t\n \twhile(iterateSet.hasNext()) {\n \t\t// iterate through and remove all elements\n \t\titerateSet.next();\n \t\titerateSet.remove();\n \t}\n }", "public void removeAll()\n {\n this.front = null;\n this.rear = null;\n }", "public void clearAll();", "public void clearAll();", "void removeAll() throws ModelRuntimeException;", "public void clearList(View view) {\n list.clear();\n adapter.notifyDataSetChanged();\n progressBar.setProgress(0);\n\n Toast toast = Toast.makeText(getApplicationContext(), \"List cleared\", Toast.LENGTH_SHORT);\n toast.show();\n }", "public void clearPurchaseList()\r\n\t{\r\n\t\tm_purechaseList.clear();\r\n\t}", "public void deleteWholeList()\n {\n head = null;\n }", "public void clear() {\n for (int i = 0; i < size; i++) genericArrayList[i] = null;\n size = 0;\n }", "public void clear() {\r\n items.clear();\r\n keys.clear();\r\n }", "public void removeItemListerners() {\r\n\t\titemListeners.clear();\r\n\t}", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "public void clear() {\n mItems.clear();\n notifyDataSetChanged();\n }", "public void clear() {\n mItems.clear();\n notifyDataSetChanged();\n }", "public void removeAll() {\n if(checkouts == null) return;\n this.checkouts.clear();\n notifyDataSetChanged();\n }", "public void clear() {\n\t\tIterator<E> iterator = this.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\titerator.next();\n\t\t\titerator.remove();\n\t\t}\n\t}", "void unsetListOfServiceElements();", "public void clearLists() {\r\n\t\ttweets.clear();\r\n\t}", "public void clear(){\r\n BarsList.clear();\r\n }", "public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }", "public void clearItems(){\n conversationsList.clear();\n notifyDataSetChanged();\n }", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "public void clear() {\n while(taskList.size > 0)\n taskList.pop().removeSafely();\n }", "public void clear() {\n\n mItems.clear();\n notifyDataSetChanged();\n\n }", "@Override\r\n\tpublic void remove(List<GroupMember> list) {\n\t\tfor(int i = 0;i<list.size();i++)\r\n\t\t\tremove(list.get(i));\r\n\t}", "public void supprimerCollection(){\r\n collection.clear();\r\n }", "public void removeEmptyItems(){\n\t\tfor(int i=0; i<currentOrder.getItems().size();i++){\n\t\t\tif(currentOrder.getItems().get(i).getQuantity()<=0){\n\t\t\t\tcurrentOrder.getItems().remove(i);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() {\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\t// Remove until the frontier is empty\n\t\twhile(!isEmpty())\n\t\t\tfrontier.removeFirst();\n\t}", "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }" ]
[ "0.8288212", "0.7772763", "0.7629308", "0.7606614", "0.75890696", "0.75115055", "0.7373162", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7352019", "0.7338136", "0.7333543", "0.72799796", "0.7269301", "0.72577", "0.72317433", "0.7178886", "0.7178886", "0.71786326", "0.7145263", "0.7100525", "0.7078587", "0.7023131", "0.6979707", "0.6970739", "0.6961113", "0.6959093", "0.6958058", "0.69341654", "0.692804", "0.6927743", "0.6924507", "0.69133645", "0.6882169", "0.68820506", "0.6822945", "0.68152475", "0.6812873", "0.68012005", "0.6797745", "0.6760176", "0.675505", "0.67496705", "0.6747649", "0.67441064", "0.6730191", "0.6727814", "0.67246354", "0.6720815", "0.67162395", "0.6692547", "0.6675622", "0.6663525", "0.6642815", "0.66406256", "0.66153485", "0.6608413", "0.66035295", "0.65968454", "0.65858275", "0.657686", "0.65677696", "0.65660435", "0.6565675", "0.6563369", "0.6552558", "0.6552558", "0.65495306", "0.6548283", "0.654719", "0.6539407", "0.653215", "0.6531528", "0.6530812", "0.6514661", "0.6510155", "0.6510155", "0.650839", "0.650765", "0.6499388", "0.6494485", "0.6490981", "0.64897877", "0.6488526", "0.64744496", "0.64720696", "0.64697313", "0.64669496", "0.6465849", "0.6458206", "0.6447114", "0.6434965" ]
0.0
-1
/ Removes and returns the first item in the list. Throws a NoSuchElementException if the list is empty.
public E pop() { if(head == null) { // The list is empty throw new NoSuchElementException(); } else if(head == tail) { // The list was of size one E item = head.item; head = tail = null; size = 0; return item; } else { E item = head.item; head = head.next; size--; return item; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public Item removeFirst() {\n if (!isEmpty()) {\n Item item = first.item;\n first = first.back;\n size--;\n if (size != 0)\n first.front = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n }", "public Item removeFirst() {\n if (this.isEmpty())\n throw new java.util.NoSuchElementException();\n\n Item ret = this.first.item;\n\n this.first = this.first.next;\n if (this.first != null)\n this.first.prev = null;\n else\n this.last = null;\n --this.n;\n\n return ret;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "public Item removeFirst() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = first.item;\n\t\tNode nextNode = first.next;\n\t\tfirst = null;\n\t\tif (count > 0) {\n\t\t\tfirst = nextNode;\n\t\t} \n\t\treturn target;\n\t}", "public Item removeFirst() {\n\t\tif (first == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = first.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tfirst = first.next;\n\t\t\tfirst.previous = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public Item removeFirst() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = first.item;\n first = first.next;\n if (first != null)\n first.prev = null;\n else\n last = first;\n size--;\n return item;\n }", "public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldFirst = this.first;\n this.first = oldFirst.next;\n this.size--;\n\n if (this.size != 0) {\n this.first.prev = null;\n } else {\n this.last = null;\n }\n\n return oldFirst.item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }", "public E removeFirst() {\n\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public Item removeFirst() {\n if (first == null)\n throw new NoSuchElementException();\n \n final Item element = first.item;\n final Node<Item> next = first.next;\n first.item = null;\n first.next = null; // help GC\n first = next;\n if (next == null)\n last = null;\n else\n next.prev = null;\n size--;\n \n return element;\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public Item removeFirst() {\n //check if the DList is empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeFirst() bacause the DList instance is empty!\");\n Node oldFirst = first.next;\n Item item = oldFirst.data; \n\n // pointer re-wiring:\n Node newFirst = oldFirst.next; \n first.next = newFirst;\n newFirst.prev = first;\n oldFirst.next = null;\n oldFirst.prev = null;\n\n // check if last pointer has to be updated or not (paying the peiper):\n if(isEmpty()) {\n last.prev = first; // update the last sentinel node to point to the first sentinel node\n }\n\n // update the size: \n size--;\n\n return item;\n }", "public T removeFirst()\r\n {\r\n T removedData; // holds data from removed node\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = front.data;\r\n front = front.next;\r\n if (numElements == 1)\r\n rear = null;\r\n \r\n numElements--;\r\n return removedData;\r\n }", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException();\n\n // Set the item to be returned to the item field of the first node\n Item item = headOfDeque.item;\n\n // If this is the last node - reset deque.\n if (lastNode()) {\n resetDeque();\n }\n else { // reassign head\n headOfDeque = headOfDeque.next;\n headOfDeque.previous = null;\n }\n\n dequeSize--;\n\n return item;\n }", "public Object removeFirst(){\n if (first == null)\n throw new NoSuchElementException();\n Object element = first.data;\n first = first.next;\n return element ;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Trying to remove an item from an empty deque.\");\n }\n\n Item item = first.item; // save item to return\n first = first.next; // delete first node\n if (first == null) {\n last = null;\n } else {\n first.previous = null;\n }\n size--;\n if (isEmpty()) {\n last = null;\n }\n assert check();\n return item; // return the saved item\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "public T pop() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.remove(0);\n\t}", "public E removeFirst() throws NoSuchElementException{\n if(size == 0)\n throw new NoSuchElementException();\n else{\n E removedElement = head.getNext().getElement();\n head.setNext(head.getNext().getNext());\n head.getNext().setPrevious(head);\n size--;\n return removedElement;\n }\n }", "public Item removeFirst() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove first item from empty deque\");\n }\n if (size == 1) { //remove last item in deque of size 1\n Item item = head.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = head; //n = temporary Node\n head = head.getNext(); //assign 2nd node as new head, \"removing\" previous head from deque\n size--;\n return n.getItem();\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Can not call removeFirst() on an empty deque\");\n }\n\n Item item = first.item;\n first = first.next;\n n--;\n if (isEmpty()) {\n last = null;\n }\n else {\n first.prev = null;\n }\n return item;\n\n }", "public T removeFirst() throws EmptyCollectionException\n //PRE: list is not empty\n //POS: first node is removed / list has one less node\n //TAS: remove first element and return it\n \n //if (count == 1)\n //{\n // T result = head.getElement();\n // head = null;\n // tail = null;\n // return result;\n //}\n //else {\n // T result = head.getElement();\n // head = head.getNext();\n // count--;\n // return result;\n // }\n \n }\n {\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n result = front.getElement();\n front = front.getNext();\n count--;\n\n if(isEmpty()){\n // reset rear after removing the last node\n rear = null;\n }\n\n return result;\n }", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpFirst = first;\n Item firstItem = tmpFirst.item;\n first = tmpFirst.next;\n size--;\n if (isEmpty()) last = null;\n else first.prev = null;\n return firstItem;\n }", "public Item removeFirst() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.next;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.next;\n sentinel.next = i.next;\n i.next.prev = sentinel;\n size -= 1;\n return i.item;\n }\n }", "public T removeFirst() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currFirst = sentinel.next;\r\n Node<T> toBeFirst = currFirst.next;\r\n T currFirstVal = currFirst.getValue();\r\n toBeFirst.prev = sentinel;\r\n sentinel.next = toBeFirst;\r\n currFirst = null;\r\n size--;\r\n return currFirstVal;\r\n }", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public void removeFirst() throws ListException {\r\n\t\t//This will check if the user is trying to remove from an empty list\r\n\t\tif(isEmpty()){\r\n\t\t\tthrow new ListException(\"Remove from empty list exception\");\r\n\t\t}\r\n\t\t//Set the nextNode pointer past the first element in the list\r\n\t\tDoublyNode nextNode;\r\n\t\tnextNode = head.getNext().getNext();\r\n\r\n\t\tnextNode.setPrev(head);//Set the next nodes previous pointer\r\n\t\thead.setNext(nextNode);//Set the heads next pointer\r\n\t\tnumItems--;//Decrement number of items\r\n\t}", "public E remove() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public E remove () throws NoSuchElementException;", "public T removeFirst() throws EmptyCollectionException;", "T removeFromHead() {\n if (this.size() == 0) {\n throw new RuntimeException(\"Cannot remove from an empty list\");\n }\n return header.removeFromHead();\n }", "public E removeFront() throws NoSuchElementException {\r\n\t\tif(isEmpty())\r\n\t\t\tthrow new NoSuchElementException(name + \" is Empty.\");\r\n\t\t\r\n\t\tE removedItem = first.data;//var to hold the first node's data\r\n\t\tif(first == last)\r\n\t\t\tfirst = last = null;//set to null if first and last are the same - one item in list\r\n\t\telse {\r\n\t\t\tfirst = first.next;//the new first node will be the old first's next node\r\n\t\t}\r\n\t\treturn removedItem;//return the data that was removed\r\n\t}", "public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}", "public E removeFirst() {\n if(isEmpty()){\n return null;\n }else{\n return remove(header.getNext());\n }\n }", "@Override\n public E deleteMin()\n {\n return list.removeFirst();\n }", "public E removeFirst();", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public Item removeFirst() {\n Item val = deck[fFront];\n deck[fFront++] = null;\n return val;\n }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public Item removeFirst(){\n return this.doublyLinkedList.removeFirst();\n }", "public E removeCurrent()\n {\n if (size == 0)\n {\n throw new NoSuchElementException(\n \"The list is empty, there is nothing to remove.\");\n }\n\n Node<E> previous = current.previous();\n Node<E> next = current.next();\n Node<E> oldCurrent = current;\n current.split();\n previous.split();\n previous.join(next);\n current = next;\n\n size--;\n return oldCurrent.data();\n }", "public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }", "public T removeFirst();", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public T removeFirst() {\n return remove(sentinel.next);\n }", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }", "public T removeFromFront() throws EmptyListException \n\t{\n\t\tif (isEmpty()) // throw exception if List is empty\n\t\t\tthrow new EmptyListException(name);\n\n\t\tT removedItem = firstNode.data; // retrieve data being removed\n\n\t\t// update references firstNode and lastNode\n\t\tif (firstNode == lastNode)\n\t\t\tfirstNode = lastNode = null;\n\t\telse\n\t\t\tfirstNode = firstNode.nextNode;\n\t\tsize--;\n\t\treturn removedItem; // return removed node data\n\t}", "Object removeFirst();", "public E poll() {\n E item;\n try {\n item = remove();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public L removeFromFront(){\n\t\tif(isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty\");\n\n\t\tL removedItem = (L) firstNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif(firstNode == lastNode)\n\t\tfirstNode = lastNode = null;\n\t\telse\n\t\tfirstNode = firstNode.getNext();\n\n\t\treturn removedItem; //return removed node data\n\t}", "public E remove(int index)\r\n {\r\n checkValidIndex(index);\r\n ListIterator<E> itr = listIterator(index);\r\n E result = itr.next();\r\n itr.remove();\r\n return result;\r\n }", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }", "public E removeFirst() {\n return pop();\n }", "public void removeElement() throws IndexOutOfBoundsException, UnsupportedOperationException {\n\t\tlist.remove(0);\n\t}", "public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "public E removeFront() {\r\n if (elem[front] == null) {\r\n throw new NoSuchElementException();\r\n } else {\r\n E temp = elem[front];\r\n elem[front] = null;\r\n front++;\r\n return temp;\r\n }\r\n }", "public E pop() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public PersistentLinkedList<T> removeFirst() {\n return remove(0);\n }", "public E remove() {\r\n\t\tif (head == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\tNode<E> temp = head;\r\n\t\t\tif (head == tail) {\r\n\t\t\t\thead = null;\r\n\t\t\t\ttail = null;\r\n\t\t\t} else {\r\n\t\t\t\thead = head.next;\r\n\t\t\t\thead.prev = null;\r\n\t\t\t}\r\n\t\t\tindices.remove(0);\r\n\t\t\tsize--;\r\n\t\t\treturn temp.data;\r\n\t\t}\r\n\t}", "public T removeFromFront() throws EmptyListException {\n if(isEmpty())\n throw new EmptyListException(name);\n\n // retrieve data being removed\n T removedItem = firstNode.data;\n\n // update references to firstNode and lastNode\n if(firstNode == lastNode)\n firstNode = lastNode = null;\n else\n firstNode = firstNode.nextNode;\n\n return removedItem;\n }", "public T removeFromFront() throws EmptyListException {\n if (isEmpty()) {\n throw new EmptyListException(nameList);\n }\n\n //get a generic data from first node\n T removedItem = firstNode.getData();\n \n //if first and last nodes are one node we make them null beacuse the last node of list is deleted\n if (firstNode == lastNode) {\n firstNode = lastNode = null; \n } \n \n //if not empty end not last, get the next node and assign it to first\n else {\n firstNode = firstNode.getNext();\n }\n \n //give generic data back\n return removedItem;\n }", "public Item removeLast() {\n if (!isEmpty()) {\n Item item = last.item;\n last = last.front;\n size--;\n if (size != 0)\n last.back = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n\n }", "public Item removeStart() {\n if (size == 0) throw new NoSuchElementException(); // if there's no elements in circle\n else if (size == 1) return removeBreaker(); // if it's the last element\n else { // if there are two or more nodes in the circle\n Node temp = head; // saves the current head\n head = temp.next; // moves head marker\n temp.before.next = head;\n head.before = temp.before; // updates referances\n size--;\n return temp.item;\n }\n }", "public Double remove() throws NoSuchElementException {\n\t\tif (arr.length > 0) {\n\t\t\tDouble temp = arr[0];\n\t\t\tarr = Arrays.copyOfRange(arr, 1, arr.length);\n\t\t\treturn temp;\n\t\t}\n\t\tthrow new NoSuchElementException();\n\t}", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public Object pop(){\n if(first == null){\n throw new NoSuchElementException();\n }\n else\n {\n Object element = first.data;\n first = first.next;\n return element;\n }\n }", "public T remove() throws NoSuchElementException {\n\tT result = poll();\n\tif(result == null) {\n\t throw new NoSuchElementException(\"Priority queue is empty\");\n\t} else {\n\t return result;\n\t}\n }", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = last.item;\n last = last.pre;\n if (last == null) {\n first = null;\n }\n else {\n last.next = null;\n }\n len--;\n return item;\n }", "public synchronized DoubleLinkedListNodeInt removeFirst() {\n\t\tDoubleLinkedListNodeInt node = getFirst();\n\t\tif(node != null){\n\t\t\tnode.remove();\n\t\t}\n\t\treturn node;\n\t}", "public T remove() throws NoSuchElementException {\n T result = poll();\n if (result == null) {\n throw new NoSuchElementException(\"Priority queue is empty\");\n } else {\n return result;\n }\n }", "public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }", "Node removeFirst() {\n\t\tNode tmp = head;\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "public T removeHead()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\tSystem.out.println(\"list is empty\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//advance head reference\n\t\tT value = head.value;\n\t\thead = head.next;\n\t\t\n\t\tsize--;\n\t\treturn value;\n\t\t\n\t}", "public E remove(int index) {\n\t\t// Code from Project 3\n\t\tE removed;\n\t\tif (index < 0 || index >= size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\t// Last element of list or list contain only 1 element\n\t\tif (index == size - 1) {\n\t\t\tremoved = elements[size - 1];\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t} else {\n\t\t\t// remove mid or first element\n\t\t\tremoved = elements[index];\n\t\t\tfor (int i = index; i < size; i++) {\n\t\t\t\telements[i] = elements[i + 1];\n\t\t\t}\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t}\n\t}", "public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }", "T pop(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.remove(0);\n\treturn answer;\n }", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public E remove(int index)\n {\n if (index >= 0 && index < size) {\n E temp = data[index]; // element to return\n\n // shift all elements to the right down by 1 index\n for (int i = index; i < size - 1; i++)\n data[i] = data[i+1];\n \n size--;\n return temp;\n } else\n throw new NoSuchElementException();\n }", "public Item removeLast() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = last.item;\n\t\tNode previousNode = last.previous;\n\t\tlast = null;\n\t\tif (count > 0) {\n\t\t\tlast = previousNode;\n\t\t}\n\t\t\n\t\treturn target;\n\t}", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public Item removeLast() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = last.item;\n last = last.prev;\n if (last != null)\n last.next = null;\n else\n first = last;\n size--;\n return item;\n }", "public E removeFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public int removeFirstNode() {\n\t\tint tmp = getFirstElement();\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "public T deleteFirst() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[0]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[0]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1\n newElements[i] = elements[i + 1]; // copy elements in temporary array\n }\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return value of element that will be deleted\n }", "@Override\n public E remove() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n size--;\n array[0] = swap(array[size], array[size] = array[0]);\n siftDown(0);\n return (E) array[size];\n }", "public Item removeLast() {\n\t\tif (last == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = last.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tlast = last.previous;\n\t\t\tlast.next = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public E remove(int index) {\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\tE removed = get(index);\n\t\t// Loop to shift elements left\n\t\tfor (int i = index; i < size(); i++) {\n\t\t\tlist[i] = list[i + 1];\n\t\t}\n\t\treturn removed;\n\t}", "public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}" ]
[ "0.8194618", "0.7922623", "0.7905669", "0.78197694", "0.7813562", "0.77728987", "0.7767191", "0.7756306", "0.77202934", "0.77094877", "0.7698591", "0.7676536", "0.7670237", "0.7662319", "0.75577", "0.75522214", "0.75432557", "0.7498326", "0.748459", "0.74672556", "0.74447566", "0.74235475", "0.7358932", "0.72965807", "0.72889936", "0.7254809", "0.7254508", "0.7221548", "0.7068807", "0.703884", "0.7036793", "0.703209", "0.70264024", "0.70182407", "0.6990531", "0.69728357", "0.6947221", "0.6918117", "0.6891112", "0.6829332", "0.682839", "0.682187", "0.6817875", "0.67869645", "0.678653", "0.67810345", "0.6770477", "0.676607", "0.6765463", "0.67622185", "0.67453647", "0.67372084", "0.6718626", "0.6682508", "0.66516095", "0.66491026", "0.6614744", "0.66108584", "0.66062754", "0.6600841", "0.6593209", "0.658514", "0.6581881", "0.65707165", "0.6560916", "0.6559641", "0.655316", "0.6547787", "0.65465456", "0.652712", "0.651788", "0.65175414", "0.64921004", "0.64796466", "0.6479066", "0.6475233", "0.64750165", "0.6469069", "0.6458042", "0.645335", "0.64469904", "0.64418215", "0.64330125", "0.6427165", "0.6424003", "0.6422208", "0.64217407", "0.6417412", "0.64131194", "0.6405198", "0.6397041", "0.6393748", "0.6388876", "0.6375363", "0.6372675", "0.6367398", "0.6360598", "0.63579273", "0.6357456", "0.63501817" ]
0.6649773
55
/ Returns the first item in the list. Throws a NoSuchElementException if the list is empty.
public E peek() { if(head == null) { // The list is empty throw new NoSuchElementException(); } else { return head.item; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "public static <T> T getFirst(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.list.getFirst();\n }", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public int getFirstElement() {\n\t\tif( head == null) {\n\t\t\tSystem.out.println(\"List is empty\");\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\treturn head.data;\n\t\t}\n\t}", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public E next() throws NoSuchElementException\n {\n E retElement = null;\n if(hasNext() == true)\n {\n retElement = arrayList.get(index);\n index++;\n }\n else\n { throw new NoSuchElementException(); }\n return retElement;\n }", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "public Item getFirst();", "public Object firstElement();", "protected T getFirstValue(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public static <T> T first(\r\n\t\t\t@Nonnull final Observable<? extends T> source) {\r\n\t\tCloseableIterator<T> it = toIterable(source).iterator();\r\n\t\ttry {\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\treturn it.next();\r\n\t\t\t}\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t}", "public static <T> T getFirstElement(final Iterable<T> elements) {\n\t\treturn elements.iterator().next();\n\t}", "int getFirst(int list) {\n\t\treturn m_lists.getField(list, 0);\n\t}", "public T next() {\r\n if\t(!hasNext()) {\r\n throw new NoSuchElementException();\r\n }\r\n return items[now++];\r\n }", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public Item next()\n\t\t {\n\t\t\t if (!hasNext()) throw new NoSuchElementException();\n\t\t\t return items[indexs[i++]];\n\t\t }", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "@Test\r\n\tvoid testFirst() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.first();\r\n\t\tassertEquals(10, output);\r\n\t}", "public E next() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 &&\n position > 0 &&\n position < size) {\n E element = entries[position];\n position++;\n return element;\n } else {\n throw new NoSuchElementException(); \n } \n \n }", "@Override\n public E element() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return (E) array[0];\n }", "public T next() {\n\t\t\tif (hasNext()) {\n\t\t\t\tT nextItem = elements[index];\n\t\t\t\tindex++;\n\t\t\t\t\n\t\t\t\treturn nextItem;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new java.util.NoSuchElementException(\"No items remaining in the iteration.\");\n\t\t\t\n\t\t}", "public Item peek() throws NoSuchElementException\r\n {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n return heap[1]; // root siempre esta en la posicion 1\r\n }", "public E getCurrent()\n {\n if (size != 0)\n {\n return current.data();\n }\n else\n {\n throw new NoSuchElementException(\"The list is empty\");\n }\n }", "public T getFirst() {\n\t\t//if the head is not empty\n\t\tif (head!= null) {\n\t\t\t//return the data in the head node of the list\n\t\t\treturn head.getData();\n\t\t}\n\t\t//otherwise return null\n\t\telse { return null; }\n\t}", "public Item removeFirst() {\n if (!isEmpty()) {\n Item item = first.item;\n first = first.back;\n size--;\n if (size != 0)\n first.front = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n }", "@Override\n public E next() {\n this.modificationCheck();\n E result;\n if (this.position != SimpleArrayList.this.index) {\n result = (E) values[position++];\n } else {\n throw new NoSuchElementException(\"No more suitable elements!\");\n }\n return result;\n }", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\tif (!hasNext()) {\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn queue[index[i++]];\r\n\t\t\t}\r\n\t\t}", "public Integer peek() {\n\t\tif (list == null || list.size() == 0) { return -1; }\n\t\treturn list.peek();\n\t}", "public Item removeFirst() {\n if (this.isEmpty())\n throw new java.util.NoSuchElementException();\n\n Item ret = this.first.item;\n\n this.first = this.first.next;\n if (this.first != null)\n this.first.prev = null;\n else\n this.last = null;\n --this.n;\n\n return ret;\n }", "public T item() throws IOException, NoSuchElementException;", "public E getFirst(){\n return head.getNext().getElement();\n }", "E head() throws NoSuchElementException;", "T peek(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.get(0);\n\treturn answer;\n }", "T getElementFromIndex(int index) throws ListException;", "public E element () throws NoSuchElementException;", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "public T pop() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.remove(0);\n\t}", "public Item peek(){\n\t\tif(isEmpty()){\r\n\t\t\tthrow new NoSuchElementException(\"Stack Underflow\"); // if stack is empty , ,t throws an exception\r\n\t\t}\r\n\t\treturn first.item;\r\n\t}", "public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}", "public VectorItem<O> firstVectorItem()\r\n {\r\n if (isEmpty()) return null; \r\n return first;\r\n }", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException();\n return items[index()];\n }", "public Item next(){\n if(current==null) {\n throw new NoSuchElementException();\n }\n\n Item item = (Item) current.item;\n current=current.next;\n return item;\n }", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static <T> T getSingleElement(Collection<T> collection) {\n\t\tif (collection.size() != 1)\n\t\t\tthrow new IndexOutOfBoundsException(String.format(\n\t\t\t\t\t\"Expected collection to contain a single element, but observed %d elements: %s\", collection.size(),\n\t\t\t\t\tcollection.toString()));\n\t\treturn collection.iterator().next();\n\t}", "public E choose() throws JMLNoSuchElementException {\n if (the_list != null) {\n E entry = the_list.val;\n if (entry == null) {\n //@ assume containsNull;\n return null;\n } else {\n E o = entry ;\n //@ assume o instanceof Object;\n //@ assume \\typeof(o) <: elementType;\n return o;\n }\n } else {\n throw new JMLNoSuchElementException(\"Tried to .choose() \"\n + \"with JMLObjectSet empty\");\n }\n }", "public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}", "public E element() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t}\r\n\t\treturn (E) data.get(0);\r\n\t}", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "public E getElement(E data) throws NoSuchElementException {\n if (isEmpty()) return null;\n Node<E> current = head;\n while (true) {\n if (current.getData().equals(data)) return current.getData();\n if (current.getNext() != null) current = current.getNext();\n else throw new NoSuchElementException(data + \" not found in list.\");\n }\n\n }", "public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "public T removeFirst() throws EmptyCollectionException\n //PRE: list is not empty\n //POS: first node is removed / list has one less node\n //TAS: remove first element and return it\n \n //if (count == 1)\n //{\n // T result = head.getElement();\n // head = null;\n // tail = null;\n // return result;\n //}\n //else {\n // T result = head.getElement();\n // head = head.getNext();\n // count--;\n // return result;\n // }\n \n }\n {\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n result = front.getElement();\n front = front.getNext();\n count--;\n\n if(isEmpty()){\n // reset rear after removing the last node\n rear = null;\n }\n\n return result;\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public Object removeFirst(){\n if (first == null)\n throw new NoSuchElementException();\n Object element = first.data;\n first = first.next;\n return element ;\n }", "public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public E peek() {\n E item;\n try {\n item = element();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException();\n\n // Set the item to be returned to the item field of the first node\n Item item = headOfDeque.item;\n\n // If this is the last node - reset deque.\n if (lastNode()) {\n resetDeque();\n }\n else { // reassign head\n headOfDeque = headOfDeque.next;\n headOfDeque.previous = null;\n }\n\n dequeSize--;\n\n return item;\n }", "public E get(int i) {\n\t\tif (size == 0) {\n\t\t\tthrow new IllegalArgumentException(\"List is empty, cannot retrieve item.\");\n\t\t}\n\n\t\tif (i < 0 || i >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Requested index is out of bounds.\");\n\t\t}\n\n\t\treturn list[i];\n\n\t}", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "public E getFirst();", "public static <T> T getFirstOrNull(final Collection<T> collection) {\n\n if (isEmpty(collection)) {\n return null;\n }\n if (collection instanceof List) {\n return ((List<T>) collection).get(0);\n } else {\n return collection.iterator().next();\n }\n }", "public Item removeFirst() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = first.item;\n\t\tNode nextNode = first.next;\n\t\tfirst = null;\n\t\tif (count > 0) {\n\t\t\tfirst = nextNode;\n\t\t} \n\t\treturn target;\n\t}", "@Test\n public void getByIndex(){\n List <String> list = new ArrayList<>();\n list.add(\"hola\");\n list.add(\"tdd\");\n list.add(\"test\");\n\n assertEquals(\"tdd\",list.get(1));\n }", "public Item removeFirst() {\n\t\tif (first == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = first.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tfirst = first.next;\n\t\t\tfirst.previous = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}", "public E next() {\n int index = 0;\n\n // iterating over collections\n for (Collection<E> coll : collectionList) {\n // checking if current collection contains the desired element (i.e. itrCounter falls in coll)\n if (coll.size() <= itrCounter - index)\n // desired index doesn't lie in current collection -> skipping all elements\n index += coll.size();\n // current collection contains desired element\n else {\n // finding desired element; iterating over coll\n for (E element : coll){\n // desired index found -> increment itrCounter and return element\n if (index == itrCounter) {\n itrCounter++;\n return element;\n }\n // desired index not reached yet -> increment index\n else index++;\n }\n }\n }\n // could not find next element\n throw new NoSuchElementException();\n }", "private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }", "public Item removeFirst() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = first.item;\n first = first.next;\n if (first != null)\n first.prev = null;\n else\n last = first;\n size--;\n return item;\n }", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "StackType getFirstItem();", "public E getFirst() {\n return peek();\n }", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public E get(int index)\r\n {\r\n checkValidIndex(index);\r\n return listIterator(index).next();\r\n }", "public E peek()\n {\n return arrayList.get(0);\n }", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}" ]
[ "0.77470523", "0.7581328", "0.744772", "0.71620333", "0.7159136", "0.71359783", "0.7114234", "0.71075565", "0.69711155", "0.69505244", "0.6938411", "0.68601865", "0.68350506", "0.6827642", "0.6812127", "0.680336", "0.67756915", "0.67555577", "0.67320895", "0.67320895", "0.66629606", "0.6637324", "0.66235137", "0.66125923", "0.6566591", "0.6550635", "0.65146554", "0.64914584", "0.6484002", "0.64776915", "0.6467022", "0.6463243", "0.64400864", "0.64354306", "0.6417058", "0.6391304", "0.638605", "0.6379904", "0.6352079", "0.63501537", "0.6331394", "0.63099", "0.6293659", "0.62747806", "0.62682295", "0.6262015", "0.623826", "0.6205544", "0.61991435", "0.6184528", "0.6183584", "0.6178114", "0.61760163", "0.6174733", "0.6173588", "0.61679286", "0.615968", "0.6156368", "0.6155169", "0.6149906", "0.61479986", "0.61332196", "0.6131134", "0.6126927", "0.6117443", "0.61165774", "0.61064464", "0.61023843", "0.61014736", "0.60957336", "0.609567", "0.6083197", "0.6073952", "0.6067717", "0.60607713", "0.60503775", "0.6046122", "0.6035961", "0.60317135", "0.6021509", "0.6021466", "0.6014856", "0.6011301", "0.60055494", "0.6002269", "0.59945416", "0.59937006", "0.5987525", "0.5985952", "0.59810114", "0.5977525", "0.5969707", "0.59690917", "0.5965843", "0.596524", "0.5948743", "0.59361005", "0.5935499", "0.593463", "0.59251386" ]
0.7407349
3
/ Adds the specified item to the head of the list.
public void push(E item) { addFirst(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFirst(E item) {\n Node<E> n = new Node<>(item, head);\n size++;\n if(head == null) {\n // The list was empty\n head = tail = n;\n } else {\n head = n;\n }\n }", "@Override\n\tpublic void insertAtFirst(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tnewNode.setNext(head);\n\t\t\tthis.head = newNode;\n\t\t}\n\t\tlistSize++;\n\t}", "public void addFirst(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tNode<Item> node = new Node<Item>();\n\t\tnode.item = item;\n\t\tif (head == null) {\n\t\t\ttail = node;\n\t\t} else {\n\t\t\thead.prev = node;\n\t\t}\n\t\tnode.next = head;\n\t\thead = node;\n\t\tN++;\n\t}", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = head;\n } else {\n head.prev = node;\n node.next = head;\n head = node;\n }\n\n size++;\n }", "public void addFirst(Item item){\r\n\t\t if (item == null) throw new NullPointerException();\r\n\t\t if (n == list.length){resize(2*list.length);}\r\n\t\t if(isEmpty()){prior=0;first=0;last=0;latter=1;}\r\n\t\t list[prior--]=item;\r\n\t\t first = prior+1;\r\n\t\t if(prior==-1){prior=list.length-1;}\r\n\t\t n++;}", "public void addFirst(Item item){\n this.doublyLinkedList.addFirst(item);\n }", "public void addFirst(T item) {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\t// linking\n\t\tnn.next = head;\n\t\thead = nn;\n\n\t}", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = head.next;\n node.prev = head;\n head.next.prev = node;\n head.next = node;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n if (oldFirst == null) {\n last = first;\n } else {\n oldFirst.previous = first;\n }\n size++;\n assert check();\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.next = first;\n if (first == null) {\n first = node;\n last = first;\n }\n else {\n first.pre = node;\n first = node;\n }\n len++;\n }", "public void addFirst(Object item) {\r\n\t\tdata.add(0, item);\r\n\t}", "public void addFirst(Item item) {\n Node oldFirst = first;\n first = new Node(null, item, oldFirst);\n if (oldFirst == null)\n last = first;\n else\n oldFirst.prev = first;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> f = first;\n final Node<Item> newNode = new Node<>(null, item, f);\n first = newNode;\n if (f == null)\n last = newNode;\n else\n f.prev = newNode;\n size++;\n }", "public void addFirst(Item item) {\n\t\tif (item == null) throw new NullPointerException();\n\t\t\n\t\tcount++;\n\t\t\n\t\tNode firstNode = new Node();\n\t\tfirstNode.item = item;\n\t\tif (count > 1) {\n\t\t\tfirstNode.next = first;\n\t\t\tfirst.previous = firstNode;\n\t\t} else {\n\t\t\tlast = firstNode;\n\t\t}\n\t\tfirst = firstNode;\n\t}", "public void addFirst(Object item) throws ListException {\r\n\r\n\t\tDoublyNode newNode = new DoublyNode(item);\r\n\t\t//This will add to the first slot if the list is not empty\r\n\t\tif(!isEmpty()){\r\n\t\t\t//Set a nextNode pointer to keep track of the node after the new node\r\n\t\t\tDoublyNode nextNode;\r\n\t\t\tnextNode = head.getNext();\r\n\r\n\t\t\tnextNode.setPrev(newNode);//Set the next nodes previous pointer\r\n\t\t\tnewNode.setNext(nextNode);//Set the new nodes next pointer\r\n\t\t\tnewNode.setPrev(head);//Set the new nodes previous pointer\r\n\t\t\thead.setNext(newNode);//Set the heads next pointer\r\n\t\t}\r\n\t\t//This will add to the first slot if the list is empty\r\n\t\telse{\r\n\t\t\thead.setNext(newNode);//Set the head next pointer to the new node\r\n\t\t\thead.setPrev(newNode);//Set the head prev pointer to the new node\r\n\t\t\tnewNode.setNext(head);//Set the new node next pointer to the head\r\n\t\t\tnewNode.setPrev(head);//Set the new node prev pointer to the head\r\n\t\t}\r\n\t\tnumItems++;//Increment number of items\r\n\t}", "public void addFirst(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot add null item\");\n\t\t}\n\n\t\tNode node = new Node(item);\n\t\tif (first == null) {\n\t\t\tfirst = last = node;\n\t\t} else {\n\t\t\tnode.next = first;\n\t\t\tfirst.previous = node;\n\t\t\tfirst = node;\n\t\t}\n\t\tsize++;\n\n\t}", "public void addFirst(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newFirst = new Node<Item>(item);\n newFirst.next = first;\n first.prev = newFirst;\n first = newFirst;\n }\n size++;\n }", "public void addFirst(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//Save old first node\n\t\t\tNode<Item> oldFirst = first;\n\t\t\t//assign first node to a new node\n\t\t\tfirst = new Node<Item>();\n\t\t\tfirst.item = item;\n\t\t\tfirst.prev = null;\n\t\t\tfirst.next = oldFirst;\n\t\t\t//link the old first to new first\n\t\t\t//if the first item to add\n\t\t\tif(oldFirst == null){\n\t\t\t\tlast = first;\n\t\t\t}else{\n\t\t\t\toldFirst.prev = first;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t}", "public void addFirst(E item){\r\n\r\n //checking the precondition\r\n\tif(item == null){\r\n\t\tthrow new IllegalArgumentException(\" item cannot equal null \");\r\n\t}\r\n\t\r\n\t//creating a new front of the list\r\n\tDoubleListNode<E> firstNode = new DoubleListNode<E>(end.getPrev(), item, null);\r\n\t\r\n\t//setting the front of the list to the head\r\n\tfirstNode.setNext(head);\r\n\t\r\n\t//setting the head to new first node\r\n\thead = firstNode;\r\n\t\r\n\t//setting the headData\r\n\theadData = head.getData();\r\n\t\r\n\r\n\r\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addFirst() with a null argument\");\n }\n Node<Item> oldFirst = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFirst;\n if (isEmpty()) {\n last = first;\n }\n else {\n // first.prev = oldFirst;\n oldFirst.prev = first;\n }\n n++;\n }", "public void addFirst(Item item) {\n if (item == null) throw new IllegalArgumentException(\"argument is null\");\n if (!isEmpty()) {\n Node a = new Node();\n a.item = item;\n a.prev = null;\n a.next = first;\n first.prev = a;\n first = a;\n }\n else {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = null;\n first = a;\n last = a;\n }\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n\n this.first = new Node(item, this.first, null);\n\n if (this.size == 0) {\n this.last = this.first;\n } else {\n this.first.next.prev = this.first;\n }\n\n this.size++;\n }", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public void addFirst(Item item) throws NullPointerException {\n checkItemNotNull(item);\n\n Node oldfirst = first;\n first = new Node(item);\n\n if (isEmpty()) {\n last = first;\n } else {\n oldfirst.prev = first;\n first.next = oldfirst;\n }\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n first = new Node<Item>();\n first.item = item;\n last = first;\n } else {\n Node<Item> oldFrist = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFrist;\n oldFrist.prev = first;\n }\n N++;\n }\n }", "public void prepend(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n newNode.next = head.next;\n head.next = newNode;\n size++;\n }", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode oldHead;\n \t\toldHead = head;\n \t\thead = new Node();\n \t\thead.item = item;\n \t\thead.next = oldHead;\n \t\ttail.next = head;\n \t}\n \tsize++;\n }", "public void addFirst(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n\n if (this.first == null) {\n this.first = new Node();\n this.first.item = item;\n this.last = this.first;\n } else {\n Node newfirst = new Node();\n newfirst.item = item;\n newfirst.next = this.first;\n this.first.prev = newfirst;\n this.first = newfirst;\n }\n this.n++;\n }", "public void addFirst(Object item){\n MovieNode first = new MovieNode(item);\t//Step 1: Create the MovieNode\n first.next = head.next;\t\t\t//Step 2: Copy the next of head to the next of MovieNode\n head.next = first;\t\t\t\t//Step 3: Update the head next value to point to the new MovieNode\n size++;\t\t\t\t\t\t\t//Step 4: Update the number of nodes in the list\n }", "public void addFirst(Item x);", "public void addfirst(Item item)\r\n {\r\n Node first = pre.next;\r\n Node x = new Node();\r\n x.item = item;\r\n x.prev = pre;\r\n x.next = first;\r\n pre.next = x;\r\n first.prev = x;\r\n n++;\r\n }", "public void addFirst(Item item) {\n Node newNode = new Node();\n newNode.data = item;\n // if the DList was already empty:\n if(isEmpty()) {\n // set the next pointer of newNode to last\n newNode.next=last;\n last.prev = newNode;\n newNode.prev=first;\n first.next = newNode;\n }\n // no need to touch the last sentinel node, unless the list was already empty:\n else {\n // copy the old actual node that frist sentinel was point to\n Node oldFirst = first.next;\n first.next = newNode;\n newNode.next = oldFirst;\n newNode.prev=first;\n oldFirst.prev = newNode;\n }\n // update size\n size++;\n }", "public void addFirst(E item);", "public void add(Item item)\n\t {\n\t Node oldfirst = first;\n\t first = new Node();\n\t first.item = item;\n\t first.next = oldfirst;\n\t N++;\n\t}", "public void addFirst(Item item){\n if (item == null)\n throw new NullPointerException();\n\n DoublyLinkedListNode<Item> node = new DoublyLinkedListNode<Item>(item);\n\n if (this.count == 0){\n this.head = this.tail = node;\n this.count++;\n return;\n }\n\n DoublyLinkedListNode tmp = head;\n head = node;\n head.next = tmp;\n tmp.previous = head;\n\n this.count++;\n }", "public void add(Item item) {\n if (item == null) throw new NullPointerException();\n Node oldFisrt = first;\n first = new Node();\n first.item = item;\n first.next = oldFisrt;\n N++;\n }", "public void addFirst(Item item) {\n if (item != null) {\n if (size == 0) { // initiation for the first adding\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else { // normal front adding\n Node oldfirst = first;\n first = new Node();\n first.front = null;\n first.item = item;\n first.back = oldfirst;\n oldfirst.front = first;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "public void addFirst(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n size += 1;\n }", "public void addAtStart(int item) {\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t\tthis.headNode = new_node;\n\t\t}\n\t\tthis.length++;\n\t}", "public void addFirst(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (firstCursor == 0) {\r\n resize(2 * items.length);\r\n }\r\n items[firstCursor--] = item;\r\n }", "public void addFirst(T item) {\n if (size == 0) {\n array[front] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n front--;\n this.updatePointer();\n array[front] = item;\n size++;\n }", "public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }", "public void add(T item) \n\t//PRE: The input parameter item can be any type but must be initialized\n\t//POST: The input parameter item is added to the circular linked list\n\t{\n\t\tNode<T> n = new Node<T>(item);\t//initialize new node for list \n\t\tnewState(n);\t\t\t\t\t\n\t\tif(start == null) //if list is empty\n\t\t{ \n\t\t\tstart = n;\n\t\t\tn.next = start;\n\t\t}\n\t\telse \t\t\t//if the list is not empty\n\t\t{ // find end\n\t\t\tNode tmp = start;\n\t\t\twhile(tmp.next != start) \n\t\t\t{ // scan until loop\n\t\t\t\tnewState(tmp);\n\t\t\t\ttmp = tmp.next;\n\t\t\t}\n\t\t\t// tmp.next == start at this point\n\t\t\tn.next = start;\n\t\t\ttmp.next = n; // complete the loop\n\t\t}\n\t\tlength++;\t//increment length of list\n\t\tnewState(null);\n\t}", "public void addFirst(T item) {\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, _front, null);\n\t _front.setNext(temp);\n\t _front = temp;\n\t}\n\t_size++;\n }", "public /*@ non_null @*/ JMLListEqualsNode<E> prepend(E item) {\n // cons() handles any necessary cloning\n return cons(item, this);\n }", "@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 addFirst(Item item) throws NullPointerException {\n if (item == null) {\n throw new NullPointerException(\"Cannot add null item to beginning of deque\");\n }\n Node n = new Node(); //n = temporary Node\n n.setItem(item);\n if (isEmpty()) { //if item is added to empty deque, set n as head and tail (deque now has 1 node)\n head = n;\n tail = n;\n } else {\n head.setPrev(n); //else, item is added to non-empty deque\n n.setNext(head);\n head = n;\n }\n size++; //increment deque size\n }", "public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\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 void addFirst(Item item) {\n verifyItemIsNotNull(item);\n\n // If deque is not empty, then link a new node and point headOfDeque to it\n if (!isEmpty()) {\n Node previousHeadOfDeck = headOfDeque;\n\n // Create a new Node and set it's values\n headOfDeque = new Node();\n headOfDeque.next = previousHeadOfDeck;\n\n // Maintain a backtrack link for removeLast\n previousHeadOfDeck.previous = headOfDeque;\n }\n // assign the value to the head node item\n headOfDeque.item = item;\n\n dequeSize++;\n }", "@Override\r\n public T add(T item) \r\n {\n Node<T> n = new Node<T>();\r\n n.setItem(item);\r\n\r\n if (head == null) { //first one\r\n head = n;\r\n tail = n;\r\n } else {\r\n tail.setNext(n); //tail's next is the new node\r\n n.setPrevious(tail); //points the new node backwards at the tail\r\n tail = n; //sets tail to the node we added\r\n }\r\n\r\n count++;\r\n\r\n return item;\r\n }", "public void addFirst(Comparable o){\n\t\t head=new ListElement(o,head);\n\t }", "void push(T item) {\n contents.addAtHead(item);\n }", "@Override\n public void addFirst(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n } else {\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n }\n size += 1;\n }", "public void addItem(Object item) {\n\t\tListItem newEnd = new ListItem(item); // Create a new ListItem\n\t\tif (start == null) { // Is the list empty?\n\t\t\tstart = end = newEnd; // Yes, so new element is start and end\n\t\t\tstart.prev = start; \t\t// Prev start refers to itself\n\t\t} else { // No, so append new element\n\t\t\tend.next = newEnd; // Set next variable for old end\n\t\t\tcurrent = end;\t\t\t\t// To reference previous end object \n\n\t\t\t//Point end to the new ListItem object\n\t\t\tend = newEnd; // Store new item as end\n\t\t\tend.prev = current;\t\t// Set prev item in new end\n\t\t}\n\t}", "public void enqueue(Object item) {\n\t\tListNode n = new ListNode(item);\n\t\tif(this.l.start==null){\n\t\t\tthis.l.start = n;\n\t\t}\n\t\telse{\n\t\t\tn.next= this.l.start;\n\t\t\tthis.l.start = n;\n\t\t}\n\t}", "void add(Item item);", "void addToHead(int v) {\n if (empty) {\n x = v;\n empty = false;\n }\n else {\n next = new Lista (this);\n x = v;\n }\n }", "@Override\n public void insertFirst(E e) {\n if (listHead == null) {\n listHead = new Node(e);\n listTail = listHead;\n }\n\n // In the general case, we simply add a new node at the start\n // of the list via the head pointer.\n else {\n listHead = new Node(e, listHead);\n }\n }", "public void addItem(Object item)\r\n {\r\n LLNode newNode;\r\n synchronized (nodeMutex)\r\n {\r\n if (nodePool.size() > 0)\r\n {\r\n newNode = (LLNode)nodePool.lastElement();\r\n newNode.key = item;\r\n newNode.next = newNode.prev = null;\r\n nodePool.removeElementAt(nodePool.size() - 1);\r\n } else\r\n {\r\n newNode = new LLNode(item);\r\n }\r\n }\r\n\r\n if (head == null)\r\n {\r\n head = tail = newNode;\r\n } else\r\n {\r\n tail.next = newNode;\r\n newNode.prev = tail;\r\n tail = newNode;\r\n }\r\n nItems++;\r\n }", "public void push(Item item) {\r\n Node oldfirst = first;\r\n first = new Node();\r\n first.item = item;\r\n first.next = oldfirst;\r\n N++;\r\n }", "public void push(Item item){\n\t\tNode oldfirst=first;\r\n\t\tfirst=new Node();\r\n\t\tfirst.item=item;\r\n\t\tfirst.next=oldfirst;\r\n\t\tN++;\r\n\t}", "public void insertAtFrontOfList(T item){\n //if (contains(item) == false){\n MyDoubleNode<T> temp = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n tail.prev = temp;\n temp.next = tail;\n }\n else {\n temp.data = item;\n temp.next = head.next;\n temp.prev = head;\n head.next = temp;\n }\n //}\n }", "public void push(T item){\n if (head == null) {\n head = new Node<T>(item, null);\n } else {\n Node<T> tempNode = head;\n Node<T> newHead = new Node<T>(item, tempNode);\n head = newHead;\n }\n }", "public void addFirst(T element);", "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 }", "void add(T 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 if (winner(item)) {\n listItems.add(item);\n }\n }", "public void addToHead(int i)\r\n\t{\r\n\t\tNode add = new Node(i, null);\r\n\t\tsize++;\r\n\t\t\r\n\t\t// checks if the list is empty, then adds element to head/start.\r\n\t\tif(start == null)\r\n\t\t{\r\n\t\t\tstart = add;\r\n\t\t\tend = start;\r\n\t\t}\r\n\t\telse // if the list has more values inside.\r\n\t\t{\r\n\t\t\tadd.setNext(start);\r\n\t\t\tstart = add;\r\n\t\t}\r\n\t}", "public void push(Item item) {\n Node temp = first;\n first = new Node();\n first.item = item;\n first.next = temp;\n n++;\n }", "public void add(Item item) {\r\n Node x = current.prev; //prev node\r\n Node y = new Node(); //new node\r\n Node z = current; //current node\r\n y.item = item;\r\n x.next = y;\r\n y.next = z;\r\n z.prev = y;\r\n y.prev = x;\r\n n++;\r\n index++;\r\n lastAccessed = null;\r\n }", "@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}", "public void add(Item item) {\n Node last = post.previous;\n Node node = new Node();\n node.item = item;\n node.next = post;\n node.previous = last;\n post.previous = node;\n last.next = node;\n size++;\n }", "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 putItemLIFO(T item) {\n\t\tNode newItem = new Node(item);\n\t\tif (first == null) { \n\t\t\tfirst = newItem; \n\t\t} else {\n\t\t\tnewItem.next = first;\n\t\t\tfirst = newItem;\n\t\t}\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "void pushFront(T value) throws ListException;", "public void insertFirst( T data )\n\t{\n\t\t//make a new node to insert it\n\t\tLinkedListNode<T> newNode = new LinkedListNode<T>();\n\t\t//add data to the node\n\t\tnewNode.setData(data);\n\t\t//link up the new node by\n\t\t//have the new node point to the old current node\n\t\tnewNode.setNext(head);\n\t\t//set the new node as the head\n\t\thead = newNode;\t\n\t\t//increment the size of the list\n\t\tlistSize++;\n\t}", "public void addItemToList(Item item) {\n\t\tif (item != null) {\n\t\t\tif (!items.contains(item)) {\n\t\t\t\titems.add(item);\n\t\t\t}\n\t\t}\n\t}", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "protected void addToHead(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, head);\n\t\t\n\t\tif(head != null)\n\t\t\thead.setPrev(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\ttail = newElm;\n\t\t\t\n\t\thead = newElm;\n\t}", "public void pushLeft(Item item){\n if (isEmpty()){\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n last = first;\n n++;\n }else{\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n n++;\n }\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}", "public void addFront(E item) {\r\n\t\tNode<E> node = new Node<E>(item, first);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;//it would be the first node so it would be first and last\r\n\t\telse {\r\n\t\t\tfirst = node;//creates a new node and puts it in the 1st position\r\n\t\t}\r\n\t}", "@Override\n public void insert(E newItem) {\n if (list.size()==0)\n list.add(newItem);\n else\n {\n ListIterator<E> itList = list.listIterator();\n boolean isAdded=false;\n while (itList.hasNext())\n {\n int status=newItem.toString().compareTo(itList.next().toString());\n if(status==0)\n {\n itList.add(newItem);\n isAdded=true;\n }\n else if(status<0)\n {\n if (itList.hasPrevious())\n itList.previous();\n itList.add(newItem);\n isAdded=true;\n break;\n }\n }\n if (!isAdded)\n {\n list.add(newItem);\n }\n }\n\n }", "@Override\n public void add(T newItem) {\n LinkedElement<T> tmpElement = new LinkedElement<>(newItem);\n\n if (firstElement == null) {\n firstElement = tmpElement;\n size = 1;\n } else {\n LinkedElement<T> currentElement = firstElement;\n while (currentElement.next != null) {\n currentElement = currentElement.next;\n }\n // currentElement is the last element in the list, now. Meaning that currentElement.next is null.\n currentElement.next = tmpElement; // These two are pointing at each other now.\n tmpElement.prev = currentElement;\n size++;\n }\n }", "public void add(E item);", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\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}", "public void insertStart(Item item) {\n if (size == 0) insertCreator(item); // if circle is empty\n else { // if these's at least one node already\n Node temp = head;\n head = new Node(item, temp, temp.before); // creates new node\n temp.before.next = head;\n temp.before = head;\n }\n size++;\n }", "public void add(final int item) {\n if (!contains(item)) {\n set[size] = item;\n size += 1;\n }\n }", "public void addFirst(Item x) {\n StuffNode f = new StuffNode(x, null, sentinel);\n if (this.isEmpty()) {\n f.next = sentinel;\n sentinel.prev = f;\n } else {\n StuffNode oldfirst = sentinel.next;\n oldfirst.prev = f; // SO MUCH PAIN!!!\n f.next = oldfirst;\n }\n this.sentinel.next = f;\n size += 1;\n\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\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 }" ]
[ "0.80409074", "0.78801984", "0.7825652", "0.78113526", "0.7799134", "0.7788086", "0.77753794", "0.7747353", "0.77083975", "0.7693593", "0.76636654", "0.7659545", "0.76422906", "0.75980586", "0.7576339", "0.756538", "0.7545307", "0.7543188", "0.7516997", "0.75125307", "0.7502026", "0.74883634", "0.74530303", "0.7426753", "0.7425198", "0.74183613", "0.7403138", "0.74027354", "0.74016434", "0.7397495", "0.7359065", "0.73589456", "0.72654253", "0.72622925", "0.7254224", "0.7247979", "0.72323346", "0.7225261", "0.71901375", "0.7139717", "0.71336716", "0.7122071", "0.70639545", "0.7033956", "0.70274425", "0.69537467", "0.6941924", "0.69238746", "0.6874833", "0.68691343", "0.68647903", "0.67879415", "0.6785695", "0.6779846", "0.6753339", "0.6729957", "0.66970533", "0.6694456", "0.6684094", "0.66738", "0.6647217", "0.66263324", "0.65958834", "0.6563099", "0.6559183", "0.6557576", "0.6549485", "0.6548924", "0.65442526", "0.65358186", "0.6533156", "0.65304935", "0.6521175", "0.6500345", "0.6481717", "0.64705414", "0.64573705", "0.6420614", "0.6409593", "0.64090157", "0.6407386", "0.6393657", "0.6385221", "0.63687384", "0.6362558", "0.6362558", "0.6359113", "0.63589716", "0.635415", "0.6341854", "0.63295203", "0.6315503", "0.63123846", "0.6306581", "0.6298726", "0.62967914", "0.62947226", "0.6287448", "0.6283038", "0.62780845" ]
0.678539
53
/ Removes and returns the first item in the list or null if the list is empty.
public E dequeue() { return pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }", "public synchronized T get(){\n if (list.isEmpty()) return null;\n return list.remove(0);\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}", "public Item removeFirst() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.next;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.next;\n sentinel.next = i.next;\n i.next.prev = sentinel;\n size -= 1;\n return i.item;\n }\n }", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public Item removeFirst() {\n //check if the DList is empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeFirst() bacause the DList instance is empty!\");\n Node oldFirst = first.next;\n Item item = oldFirst.data; \n\n // pointer re-wiring:\n Node newFirst = oldFirst.next; \n first.next = newFirst;\n newFirst.prev = first;\n oldFirst.next = null;\n oldFirst.prev = null;\n\n // check if last pointer has to be updated or not (paying the peiper):\n if(isEmpty()) {\n last.prev = first; // update the last sentinel node to point to the first sentinel node\n }\n\n // update the size: \n size--;\n\n return item;\n }", "public Item removeFirst() {\n if (!isEmpty()) {\n Item item = first.item;\n first = first.back;\n size--;\n if (size != 0)\n first.front = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public T removeFirst()\r\n {\r\n T removedData; // holds data from removed node\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = front.data;\r\n front = front.next;\r\n if (numElements == 1)\r\n rear = null;\r\n \r\n numElements--;\r\n return removedData;\r\n }", "public Item removeFirst() {\n\t\tif (first == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = first.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tfirst = first.next;\n\t\t\tfirst.previous = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}", "public T removeFirst() throws EmptyCollectionException\n //PRE: list is not empty\n //POS: first node is removed / list has one less node\n //TAS: remove first element and return it\n \n //if (count == 1)\n //{\n // T result = head.getElement();\n // head = null;\n // tail = null;\n // return result;\n //}\n //else {\n // T result = head.getElement();\n // head = head.getNext();\n // count--;\n // return result;\n // }\n \n }\n {\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n result = front.getElement();\n front = front.getNext();\n count--;\n\n if(isEmpty()){\n // reset rear after removing the last node\n rear = null;\n }\n\n return result;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldFirst = this.first;\n this.first = oldFirst.next;\n this.size--;\n\n if (this.size != 0) {\n this.first.prev = null;\n } else {\n this.last = null;\n }\n\n return oldFirst.item;\n }", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public E removeFirst() {\n if(isEmpty()){\n return null;\n }else{\n return remove(header.getNext());\n }\n }", "public Item removeFirst() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = first.item;\n first = first.next;\n if (first != null)\n first.prev = null;\n else\n last = first;\n size--;\n return item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }", "public Item removeFirst() {\n Item val = deck[fFront];\n deck[fFront++] = null;\n return val;\n }", "public Item removeFirst() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = first.item;\n\t\tNode nextNode = first.next;\n\t\tfirst = null;\n\t\tif (count > 0) {\n\t\t\tfirst = nextNode;\n\t\t} \n\t\treturn target;\n\t}", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException();\n\n // Set the item to be returned to the item field of the first node\n Item item = headOfDeque.item;\n\n // If this is the last node - reset deque.\n if (lastNode()) {\n resetDeque();\n }\n else { // reassign head\n headOfDeque = headOfDeque.next;\n headOfDeque.previous = null;\n }\n\n dequeSize--;\n\n return item;\n }", "public T removeFirst();", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Trying to remove an item from an empty deque.\");\n }\n\n Item item = first.item; // save item to return\n first = first.next; // delete first node\n if (first == null) {\n last = null;\n } else {\n first.previous = null;\n }\n size--;\n if (isEmpty()) {\n last = null;\n }\n assert check();\n return item; // return the saved item\n }", "public Item removeFirst() {\n if (first == null)\n throw new NoSuchElementException();\n \n final Item element = first.item;\n final Node<Item> next = first.next;\n first.item = null;\n first.next = null; // help GC\n first = next;\n if (next == null)\n last = null;\n else\n next.prev = null;\n size--;\n \n return element;\n }", "public Item removeFirst() {\n if (this.isEmpty())\n throw new java.util.NoSuchElementException();\n\n Item ret = this.first.item;\n\n this.first = this.first.next;\n if (this.first != null)\n this.first.prev = null;\n else\n this.last = null;\n --this.n;\n\n return ret;\n }", "@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpFirst = first;\n Item firstItem = tmpFirst.item;\n first = tmpFirst.next;\n size--;\n if (isEmpty()) last = null;\n else first.prev = null;\n return firstItem;\n }", "public Object removeFirst(){\n //Check if there is data to be removed, if not return null\n if(size == 0){\t//size 0 indicates no data in the linkedlist\n return null;\n }\n MovieNode removed = head.next;\n head.next = head.next.next;\n size--;\n return removed.data;\n }", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public T removeHead()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\tSystem.out.println(\"list is empty\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//advance head reference\n\t\tT value = head.value;\n\t\thead = head.next;\n\t\t\n\t\tsize--;\n\t\treturn value;\n\t\t\n\t}", "public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Can not call removeFirst() on an empty deque\");\n }\n\n Item item = first.item;\n first = first.next;\n n--;\n if (isEmpty()) {\n last = null;\n }\n else {\n first.prev = null;\n }\n return item;\n\n }", "public E removeFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public PersistentLinkedList<T> removeFirst() {\n return remove(0);\n }", "public L removeFromFront(){\n\t\tif(isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty\");\n\n\t\tL removedItem = (L) firstNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif(firstNode == lastNode)\n\t\tfirstNode = lastNode = null;\n\t\telse\n\t\tfirstNode = firstNode.getNext();\n\n\t\treturn removedItem; //return removed node data\n\t}", "Object removeFirst();", "public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}", "public Item removeFirst() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove first item from empty deque\");\n }\n if (size == 1) { //remove last item in deque of size 1\n Item item = head.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = head; //n = temporary Node\n head = head.getNext(); //assign 2nd node as new head, \"removing\" previous head from deque\n size--;\n return n.getItem();\n }", "public Item removeFirst(){\n return this.doublyLinkedList.removeFirst();\n }", "public E removeFirst(){\r\n return null;\r\n }", "public E removeFirst();", "public T removeFirst() throws EmptyCollectionException;", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public Object removeFirst(){\n if (first == null)\n throw new NoSuchElementException();\n Object element = first.data;\n first = first.next;\n return element ;\n }", "public T removeFirst() {\n return remove(sentinel.next);\n }", "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "@Override\n public E deleteMin()\n {\n return list.removeFirst();\n }", "public T pop() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.remove(0);\n\t}", "public E removeFirst() {\n return pop();\n }", "T removeFromHead() {\n if (this.size() == 0) {\n throw new RuntimeException(\"Cannot remove from an empty list\");\n }\n return header.removeFromHead();\n }", "public static <T> T getFirst(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "public E removeFirst() {\n\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public T removeFromFront() throws EmptyListException \n\t{\n\t\tif (isEmpty()) // throw exception if List is empty\n\t\t\tthrow new EmptyListException(name);\n\n\t\tT removedItem = firstNode.data; // retrieve data being removed\n\n\t\t// update references firstNode and lastNode\n\t\tif (firstNode == lastNode)\n\t\t\tfirstNode = lastNode = null;\n\t\telse\n\t\t\tfirstNode = firstNode.nextNode;\n\t\tsize--;\n\t\treturn removedItem; // return removed node data\n\t}", "public T removeFirst() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currFirst = sentinel.next;\r\n Node<T> toBeFirst = currFirst.next;\r\n T currFirstVal = currFirst.getValue();\r\n toBeFirst.prev = sentinel;\r\n sentinel.next = toBeFirst;\r\n currFirst = null;\r\n size--;\r\n return currFirstVal;\r\n }", "public E removeFront() {\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tE temp = head.value;\n\t\t\thead = head.next;\n\t\t\tcount--;\n\t\t\treturn temp;\n\t\t}\n\t}", "public E poll() {\n E item;\n try {\n item = remove();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public T removeFromFront() throws EmptyListException {\n if (isEmpty()) {\n throw new EmptyListException(nameList);\n }\n\n //get a generic data from first node\n T removedItem = firstNode.getData();\n \n //if first and last nodes are one node we make them null beacuse the last node of list is deleted\n if (firstNode == lastNode) {\n firstNode = lastNode = null; \n } \n \n //if not empty end not last, get the next node and assign it to first\n else {\n firstNode = firstNode.getNext();\n }\n \n //give generic data back\n return removedItem;\n }", "public synchronized DoubleLinkedListNodeInt removeFirst() {\n\t\tDoubleLinkedListNodeInt node = getFirst();\n\t\tif(node != null){\n\t\t\tnode.remove();\n\t\t}\n\t\treturn node;\n\t}", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "Node removeFirst() {\n\t\tNode tmp = head;\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "synchronized public V removeOne() {\n int i = 0;\n for (; i < keys.length; i++) {\n if (keys[i] == null || keys[i] == skip) {\n continue;\n }\n break;\n }\n if (i == keys.length) {\n return null;\n }\n return (V) remove(keys[i]);\n }", "@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}", "public T removeLast() {\n if (size() == 0) {\n return null;\n }\n nextLast = minusOne(nextLast);\n size -= 1;\n T toRemove = items[nextLast];\n items[nextLast] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public T removeFromFront() throws EmptyListException {\n if(isEmpty())\n throw new EmptyListException(name);\n\n // retrieve data being removed\n T removedItem = firstNode.data;\n\n // update references to firstNode and lastNode\n if(firstNode == lastNode)\n firstNode = lastNode = null;\n else\n firstNode = firstNode.nextNode;\n\n return removedItem;\n }", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "public E dequeue() {\n\t\treturn list.removeFirst();\n\t}", "public E remove() {\r\n\t\tif (curr.next() == null)\r\n\t\t\treturn null; // Nothing to remove\r\n\t\tE it = curr.next().element(); // Remember value\r\n\t\tif (tail == curr.next())\r\n\t\t\ttail = curr; // Removed last\r\n\t\tcurr.setNext(curr.next().next()); // Remove from list\r\n\t\tcnt--; // Decrement count\r\n\t\treturn it; // Return value\r\n\t}", "public E pop() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else if(head == tail) {\n // The list was of size one\n E item = head.item;\n head = tail = null;\n size = 0;\n return item;\n } else {\n E item = head.item;\n head = head.next;\n size--;\n return item;\n }\n }", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "public E remove(int index) {\n if(index > size) return null;\n E element = null;\n for(int i = index+1; i < size; i++) {\n list[i-1] = list[i];\n }\n list[size-1] = null;\n size--;\n return element;\n }", "public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }", "public E removeFirst() throws NoSuchElementException{\n if(size == 0)\n throw new NoSuchElementException();\n else{\n E removedElement = head.getNext().getElement();\n head.setNext(head.getNext().getNext());\n head.getNext().setPrevious(head);\n size--;\n return removedElement;\n }\n }", "public U removeFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on first\r\n\t \treturn remove(0);\r\n\t }", "public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }", "protected T removeBeginning() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> startNode = this.getHead().getPrev();\r\n\t\t\tthis.getHead().setPrev(startNode.getPrev());\r\n\t\t\tsize--;\r\n\t\t\treturn startNode.getValue();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}", "public void removeFirst() throws ListException {\r\n\t\t//This will check if the user is trying to remove from an empty list\r\n\t\tif(isEmpty()){\r\n\t\t\tthrow new ListException(\"Remove from empty list exception\");\r\n\t\t}\r\n\t\t//Set the nextNode pointer past the first element in the list\r\n\t\tDoublyNode nextNode;\r\n\t\tnextNode = head.getNext().getNext();\r\n\r\n\t\tnextNode.setPrev(head);//Set the next nodes previous pointer\r\n\t\thead.setNext(nextNode);//Set the heads next pointer\r\n\t\tnumItems--;//Decrement number of items\r\n\t}", "public T pop() \n\t//POST: First element of list removed and FCTVAL == first element in list\n\t{\n\t\tT tmp = start.value;\n\t\tremove(start.value);\n\t\treturn tmp;\n\t}", "public Item removeLast() {\n Item last = items[size];\n items[size] = null;\n size -= 1;\n return last;\n }", "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.list.getFirst();\n }", "@Override\n public T remove() {\n //make sure there is something in the set\n if (first == null)\n return null;\n //make a reference to the data in the first node, then\n //update the reference to the second node\n T val = first.value;\n first = first.next;\n //return the data\n numItems--;\n return val;\n }", "public T removeFromBack() {\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, \"\n + \"so there is nothing to get.\");\n }\n if (head == tail) {\n head.setNext(null);\n head.setPrevious(null);\n tail.setNext(null);\n tail.setPrevious(null);\n size -= 1;\n return tail.getData();\n } else {\n T temp = tail.getData();\n tail = tail.getPrevious();\n tail.setNext(null);\n size -= 1;\n return temp;\n\n }\n }", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "protected T removeFromHead()\n\t{\n\t\tif(head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.getVal();\n\t\thead = head.getNext();\n\t\t\n\t\tif(head == null)\n\t\t\ttail = head;\n\t\telse\n\t\t\thead.setPrev(null);\n\t\t\n\t\treturn ret;\n\t}", "public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }", "public Object removeFirst()\n {\n return ((Node)nodes.remove(0)).data;\n }", "public Item removeLast() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.prev;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.prev;\n i.prev.next = sentinel;\n sentinel.prev = i.prev;\n size -= 1;\n return i.item;\n }\n }" ]
[ "0.76730144", "0.76259583", "0.7593116", "0.7586853", "0.7581867", "0.75729007", "0.7526663", "0.7509958", "0.74902177", "0.7489152", "0.7482862", "0.7466405", "0.7442596", "0.74200225", "0.7395288", "0.7386879", "0.73737085", "0.7366707", "0.73638433", "0.735944", "0.73406136", "0.7312775", "0.7311007", "0.73057526", "0.7297486", "0.7289094", "0.72859824", "0.7283527", "0.7281282", "0.7280842", "0.7259127", "0.72449803", "0.7244429", "0.724413", "0.72422945", "0.72232103", "0.71929556", "0.71608704", "0.71583587", "0.7156609", "0.7144909", "0.71373093", "0.7129544", "0.71280664", "0.7126128", "0.7120809", "0.71179", "0.71092576", "0.7104078", "0.70696187", "0.7069101", "0.7064693", "0.704912", "0.70298207", "0.70202434", "0.7016215", "0.7003573", "0.69996417", "0.6990068", "0.6970222", "0.6966097", "0.6957374", "0.69455755", "0.68892103", "0.68411535", "0.6835722", "0.6799166", "0.6798033", "0.67672426", "0.67654264", "0.67618686", "0.6760952", "0.67562926", "0.67486", "0.67397964", "0.6709924", "0.6662803", "0.6654358", "0.66529197", "0.6648512", "0.6636519", "0.66228473", "0.66125154", "0.6601952", "0.6584635", "0.65793085", "0.6578319", "0.6577702", "0.65755445", "0.65663034", "0.6561211", "0.6531254", "0.6519927", "0.6507326", "0.6506346", "0.65056384", "0.6496507", "0.6494758", "0.64910245", "0.6490653", "0.6473731" ]
0.0
-1
/ Returns the first item in the list or null if the list is empty.
public E getFirst() { return peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T getFirst(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "protected T getFirstValue(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(0) : null;\n\t}", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.list.getFirst();\n }", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public T getFirst() {\n\t\t//if the head is not empty\n\t\tif (head!= null) {\n\t\t\t//return the data in the head node of the list\n\t\t\treturn head.getData();\n\t\t}\n\t\t//otherwise return null\n\t\telse { return null; }\n\t}", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public synchronized T get(){\n if (list.isEmpty()) return null;\n return list.remove(0);\n }", "public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public int getFirstElement() {\n\t\tif( head == null) {\n\t\t\tSystem.out.println(\"List is empty\");\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\treturn head.data;\n\t\t}\n\t}", "public Item getFirst();", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "public VectorItem<O> firstVectorItem()\r\n {\r\n if (isEmpty()) return null; \r\n return first;\r\n }", "public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }", "int getFirst(int list) {\n\t\treturn m_lists.getField(list, 0);\n\t}", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "@Nullable\n public T firstOrNull() {\n return Query.firstOrNull(iterable);\n }", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public Object firstElement();", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "public static <T> T getFirstOrNull(final Collection<T> collection) {\n\n if (isEmpty(collection)) {\n return null;\n }\n if (collection instanceof List) {\n return ((List<T>) collection).get(0);\n } else {\n return collection.iterator().next();\n }\n }", "public synchronized DoubleLinkedListNodeInt getFirst() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn head.getNext();\n\t}", "protected Optional<T> getFirstValueOptional(List<T> list) {\n\t\treturn Optional.ofNullable(getFirstValue(list));\n\t}", "public Integer peek() {\n\t\tif (list == null || list.size() == 0) { return -1; }\n\t\treturn list.peek();\n\t}", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }", "public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}", "public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }", "public T get(int index) {\n return (index >= 0 && index < this.list.size()) ? this.list.get(index) : null;\n }", "public Object firstElement() {\n return _queue.firstElement();\n }", "public static <T> T getFirstNotNullValue(final Collection<T> collection) {\n\n if (isNotEmpty(collection)) {\n for (T element : collection) {\n if (element != null) {\n return element;\n }\n }\n }\n return null;\n }", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "public T getMin() {\n\t\tif (heapSize > 0) {\n\t\t\treturn lstEle.get(0);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public T getFirst();", "public T getFirst();", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "public E getFirst(){\n return head.getNext().getElement();\n }", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public E peek()\n {\n return arrayList.get(0);\n }", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "public Object getFirst() {\n if (first == null)\n return null;\n return first.getInfo();\n }", "public T getFirst() {\n return this.getHelper(this.indexCorrespondingToTheFirstElement).data;\n }", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "public T get(int index) {\n if (index < length()) {\n return (T) list[startIndex + index];\n }\n return null;\n }", "public Node<E> getFirst(){\n Node<E> toReturn = head.getNext();\n return toReturn == tail ? null: toReturn;\n }", "Object front()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call front() on empty List\");\n\t\t}\n\t\treturn front.data;\n\t}", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}", "public T getFirst()\n\t{\n\t\treturn head.getData();\n\t}", "private static <T> T lastItemOfList(List<T> list) {\n if (list == null || list.size() == 0) {\n return null;\n }\n return list.get(list.size() - 1);\n }", "@Nonnull\n public Optional<ENTITY> peekNext()\n {\n return hasNext() ? Optional.of(items.get(index + 1)) : Optional.empty();\n }", "public E peek() {\n E item;\n try {\n item = element();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "public static Monkey getFirstMonkey(List<Monkey> ml) {\n int listSize = ml.size();\n for (int i = 0; i < listSize; i++) {\n if (ml.get(i).getMonkeyNum() == 1) {\n return ml.get(i);\n }\n }\n return null;\n }", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "public E getFirst();", "public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}", "public T getMin()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn array[0];\n\t}", "public Integer peek() {\n if (hasNext()){\n if (list.isEmpty()){\n Integer next = iterator.next();\n list.add(next);\n return next;\n }else {\n return list.get(list.size()-1);\n }\n }else {\n return null;\n }\n }", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "public T removeFirst() throws EmptyCollectionException\n //PRE: list is not empty\n //POS: first node is removed / list has one less node\n //TAS: remove first element and return it\n \n //if (count == 1)\n //{\n // T result = head.getElement();\n // head = null;\n // tail = null;\n // return result;\n //}\n //else {\n // T result = head.getElement();\n // head = head.getNext();\n // count--;\n // return result;\n // }\n \n }\n {\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n result = front.getElement();\n front = front.getNext();\n count--;\n\n if(isEmpty()){\n // reset rear after removing the last node\n rear = null;\n }\n\n return result;\n }", "StackType getFirstItem();", "public Object front() {\n ListNode p = this.l.start;\n while(p.next!=null)\n {\n p = p.next;\n }\n\t\treturn (Object) p.item;\n\t}", "public static String peek(){\n String take = list.get((list.size())-1);\n return take;\n }", "public static <T> T getFirstElement(final Iterable<T> elements) {\n\t\treturn elements.iterator().next();\n\t}", "@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }", "public Item peek() {\r\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\r\n return first.item;\r\n }", "public process get_first() {\n\t\treturn queue.getFirst();\n\t}", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.getFirst();\r\n\t\t\t}\r\n\t\t}", "public E getFirst()// you finish (part of HW#4)\n\t{\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasLeftChild())\n\t\t\titeratorNode = iteratorNode.getLeftChild();\n\t\treturn iteratorNode.getData();\n\t}", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn null;\r\n\t}", "public T peek()\n {\n\n if (ll.getSize()==0){\n return null;\n }else\n return ll.getData(ll.getSize()-1);\n }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "String getFirstElementOfArrayList( ArrayList arrayList ) {\n\n \tString firstElement = new String(\"\");\n \tfor ( Object e : arrayList ) {\n \t\tfirstElement = (String) e;\n \t\tbreak;\n \t}\n \treturn firstElement;\n }", "public synchronized Object peek()\n throws EmptyStackException\n {\n if (empty())\n {\n throw new EmptyStackException();\n }\n\n return dataList.get(0);\n }", "public E choose() throws JMLNoSuchElementException {\n if (the_list != null) {\n E entry = the_list.val;\n if (entry == null) {\n //@ assume containsNull;\n return null;\n } else {\n E o = entry ;\n //@ assume o instanceof Object;\n //@ assume \\typeof(o) <: elementType;\n return o;\n }\n } else {\n throw new JMLNoSuchElementException(\"Tried to .choose() \"\n + \"with JMLObjectSet empty\");\n }\n }", "public static Object first(Object o) {\n log.finer(\"getting first of list expression: \" + o);\n validateType(o, SPair.class);\n return ((SPair)o).getCar();\n }", "public Element first() {\n if(isEmpty()) return null;\n else return header.getNextNode().getContent();\n }" ]
[ "0.83996534", "0.79333705", "0.7855963", "0.78336155", "0.7602744", "0.758237", "0.75416785", "0.7459284", "0.7432324", "0.74290967", "0.7322628", "0.7250595", "0.7249648", "0.7217", "0.7163808", "0.71487", "0.7096322", "0.7026413", "0.69554055", "0.6952369", "0.693267", "0.6923953", "0.68768454", "0.6840525", "0.68228155", "0.68199015", "0.6813726", "0.6813726", "0.68111956", "0.676666", "0.6749708", "0.6721868", "0.6715177", "0.6714849", "0.6696096", "0.6675444", "0.66694045", "0.6658041", "0.6650971", "0.66398996", "0.6632479", "0.662383", "0.6617774", "0.6601534", "0.6558756", "0.65322006", "0.652748", "0.65144163", "0.64913046", "0.64913046", "0.6477134", "0.6473345", "0.6471817", "0.64702624", "0.64678764", "0.6461657", "0.6447284", "0.64353836", "0.64323306", "0.64295757", "0.6417734", "0.6414337", "0.6413743", "0.6403089", "0.6397936", "0.6384436", "0.63760364", "0.63656354", "0.6336265", "0.6328019", "0.63249284", "0.6271306", "0.6262317", "0.6249089", "0.6242519", "0.6239807", "0.62188154", "0.6215782", "0.6215288", "0.6211472", "0.62038803", "0.6202263", "0.61941963", "0.6191756", "0.6191066", "0.6174871", "0.6167322", "0.6141779", "0.6140391", "0.6139461", "0.6138074", "0.6136543", "0.61334795", "0.61282825", "0.6116604", "0.6105176", "0.6094518", "0.6089196", "0.60613877", "0.6059563" ]
0.6326382
70
/ Removes and returns the first item in the list. Throws a NoSuchElementException if the list is empty.
public E removeFirst() { return pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public Item removeFirst() {\n if (!isEmpty()) {\n Item item = first.item;\n first = first.back;\n size--;\n if (size != 0)\n first.front = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n }", "public Item removeFirst() {\n if (this.isEmpty())\n throw new java.util.NoSuchElementException();\n\n Item ret = this.first.item;\n\n this.first = this.first.next;\n if (this.first != null)\n this.first.prev = null;\n else\n this.last = null;\n --this.n;\n\n return ret;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "public Item removeFirst() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = first.item;\n\t\tNode nextNode = first.next;\n\t\tfirst = null;\n\t\tif (count > 0) {\n\t\t\tfirst = nextNode;\n\t\t} \n\t\treturn target;\n\t}", "public Item removeFirst() {\n\t\tif (first == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = first.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tfirst = first.next;\n\t\t\tfirst.previous = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public Item removeFirst() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = first.item;\n first = first.next;\n if (first != null)\n first.prev = null;\n else\n last = first;\n size--;\n return item;\n }", "public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldFirst = this.first;\n this.first = oldFirst.next;\n this.size--;\n\n if (this.size != 0) {\n this.first.prev = null;\n } else {\n this.last = null;\n }\n\n return oldFirst.item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }", "public E removeFirst() {\n\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public Item removeFirst() {\n if (first == null)\n throw new NoSuchElementException();\n \n final Item element = first.item;\n final Node<Item> next = first.next;\n first.item = null;\n first.next = null; // help GC\n first = next;\n if (next == null)\n last = null;\n else\n next.prev = null;\n size--;\n \n return element;\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public Item removeFirst() {\n //check if the DList is empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeFirst() bacause the DList instance is empty!\");\n Node oldFirst = first.next;\n Item item = oldFirst.data; \n\n // pointer re-wiring:\n Node newFirst = oldFirst.next; \n first.next = newFirst;\n newFirst.prev = first;\n oldFirst.next = null;\n oldFirst.prev = null;\n\n // check if last pointer has to be updated or not (paying the peiper):\n if(isEmpty()) {\n last.prev = first; // update the last sentinel node to point to the first sentinel node\n }\n\n // update the size: \n size--;\n\n return item;\n }", "public T removeFirst()\r\n {\r\n T removedData; // holds data from removed node\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = front.data;\r\n front = front.next;\r\n if (numElements == 1)\r\n rear = null;\r\n \r\n numElements--;\r\n return removedData;\r\n }", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException();\n\n // Set the item to be returned to the item field of the first node\n Item item = headOfDeque.item;\n\n // If this is the last node - reset deque.\n if (lastNode()) {\n resetDeque();\n }\n else { // reassign head\n headOfDeque = headOfDeque.next;\n headOfDeque.previous = null;\n }\n\n dequeSize--;\n\n return item;\n }", "public Object removeFirst(){\n if (first == null)\n throw new NoSuchElementException();\n Object element = first.data;\n first = first.next;\n return element ;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Trying to remove an item from an empty deque.\");\n }\n\n Item item = first.item; // save item to return\n first = first.next; // delete first node\n if (first == null) {\n last = null;\n } else {\n first.previous = null;\n }\n size--;\n if (isEmpty()) {\n last = null;\n }\n assert check();\n return item; // return the saved item\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "public T pop() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.remove(0);\n\t}", "public E removeFirst() throws NoSuchElementException{\n if(size == 0)\n throw new NoSuchElementException();\n else{\n E removedElement = head.getNext().getElement();\n head.setNext(head.getNext().getNext());\n head.getNext().setPrevious(head);\n size--;\n return removedElement;\n }\n }", "public Item removeFirst() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove first item from empty deque\");\n }\n if (size == 1) { //remove last item in deque of size 1\n Item item = head.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = head; //n = temporary Node\n head = head.getNext(); //assign 2nd node as new head, \"removing\" previous head from deque\n size--;\n return n.getItem();\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Can not call removeFirst() on an empty deque\");\n }\n\n Item item = first.item;\n first = first.next;\n n--;\n if (isEmpty()) {\n last = null;\n }\n else {\n first.prev = null;\n }\n return item;\n\n }", "public T removeFirst() throws EmptyCollectionException\n //PRE: list is not empty\n //POS: first node is removed / list has one less node\n //TAS: remove first element and return it\n \n //if (count == 1)\n //{\n // T result = head.getElement();\n // head = null;\n // tail = null;\n // return result;\n //}\n //else {\n // T result = head.getElement();\n // head = head.getNext();\n // count--;\n // return result;\n // }\n \n }\n {\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n result = front.getElement();\n front = front.getNext();\n count--;\n\n if(isEmpty()){\n // reset rear after removing the last node\n rear = null;\n }\n\n return result;\n }", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpFirst = first;\n Item firstItem = tmpFirst.item;\n first = tmpFirst.next;\n size--;\n if (isEmpty()) last = null;\n else first.prev = null;\n return firstItem;\n }", "public Item removeFirst() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.next;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.next;\n sentinel.next = i.next;\n i.next.prev = sentinel;\n size -= 1;\n return i.item;\n }\n }", "public T removeFirst() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currFirst = sentinel.next;\r\n Node<T> toBeFirst = currFirst.next;\r\n T currFirstVal = currFirst.getValue();\r\n toBeFirst.prev = sentinel;\r\n sentinel.next = toBeFirst;\r\n currFirst = null;\r\n size--;\r\n return currFirstVal;\r\n }", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public void removeFirst() throws ListException {\r\n\t\t//This will check if the user is trying to remove from an empty list\r\n\t\tif(isEmpty()){\r\n\t\t\tthrow new ListException(\"Remove from empty list exception\");\r\n\t\t}\r\n\t\t//Set the nextNode pointer past the first element in the list\r\n\t\tDoublyNode nextNode;\r\n\t\tnextNode = head.getNext().getNext();\r\n\r\n\t\tnextNode.setPrev(head);//Set the next nodes previous pointer\r\n\t\thead.setNext(nextNode);//Set the heads next pointer\r\n\t\tnumItems--;//Decrement number of items\r\n\t}", "public E remove() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public E remove () throws NoSuchElementException;", "public T removeFirst() throws EmptyCollectionException;", "T removeFromHead() {\n if (this.size() == 0) {\n throw new RuntimeException(\"Cannot remove from an empty list\");\n }\n return header.removeFromHead();\n }", "public E removeFront() throws NoSuchElementException {\r\n\t\tif(isEmpty())\r\n\t\t\tthrow new NoSuchElementException(name + \" is Empty.\");\r\n\t\t\r\n\t\tE removedItem = first.data;//var to hold the first node's data\r\n\t\tif(first == last)\r\n\t\t\tfirst = last = null;//set to null if first and last are the same - one item in list\r\n\t\telse {\r\n\t\t\tfirst = first.next;//the new first node will be the old first's next node\r\n\t\t}\r\n\t\treturn removedItem;//return the data that was removed\r\n\t}", "public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}", "public E removeFirst() {\n if(isEmpty()){\n return null;\n }else{\n return remove(header.getNext());\n }\n }", "@Override\n public E deleteMin()\n {\n return list.removeFirst();\n }", "public E removeFirst();", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public Item removeFirst() {\n Item val = deck[fFront];\n deck[fFront++] = null;\n return val;\n }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public Item removeFirst(){\n return this.doublyLinkedList.removeFirst();\n }", "public E removeCurrent()\n {\n if (size == 0)\n {\n throw new NoSuchElementException(\n \"The list is empty, there is nothing to remove.\");\n }\n\n Node<E> previous = current.previous();\n Node<E> next = current.next();\n Node<E> oldCurrent = current;\n current.split();\n previous.split();\n previous.join(next);\n current = next;\n\n size--;\n return oldCurrent.data();\n }", "public T removeFirst();", "public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public T removeFirst() {\n return remove(sentinel.next);\n }", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }", "public T removeFromFront() throws EmptyListException \n\t{\n\t\tif (isEmpty()) // throw exception if List is empty\n\t\t\tthrow new EmptyListException(name);\n\n\t\tT removedItem = firstNode.data; // retrieve data being removed\n\n\t\t// update references firstNode and lastNode\n\t\tif (firstNode == lastNode)\n\t\t\tfirstNode = lastNode = null;\n\t\telse\n\t\t\tfirstNode = firstNode.nextNode;\n\t\tsize--;\n\t\treturn removedItem; // return removed node data\n\t}", "Object removeFirst();", "public E pop() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else if(head == tail) {\n // The list was of size one\n E item = head.item;\n head = tail = null;\n size = 0;\n return item;\n } else {\n E item = head.item;\n head = head.next;\n size--;\n return item;\n }\n }", "public E poll() {\n E item;\n try {\n item = remove();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public L removeFromFront(){\n\t\tif(isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty\");\n\n\t\tL removedItem = (L) firstNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif(firstNode == lastNode)\n\t\tfirstNode = lastNode = null;\n\t\telse\n\t\tfirstNode = firstNode.getNext();\n\n\t\treturn removedItem; //return removed node data\n\t}", "public E remove(int index)\r\n {\r\n checkValidIndex(index);\r\n ListIterator<E> itr = listIterator(index);\r\n E result = itr.next();\r\n itr.remove();\r\n return result;\r\n }", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }", "public void removeElement() throws IndexOutOfBoundsException, UnsupportedOperationException {\n\t\tlist.remove(0);\n\t}", "public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "public E removeFront() {\r\n if (elem[front] == null) {\r\n throw new NoSuchElementException();\r\n } else {\r\n E temp = elem[front];\r\n elem[front] = null;\r\n front++;\r\n return temp;\r\n }\r\n }", "public E pop() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public PersistentLinkedList<T> removeFirst() {\n return remove(0);\n }", "public E remove() {\r\n\t\tif (head == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\tNode<E> temp = head;\r\n\t\t\tif (head == tail) {\r\n\t\t\t\thead = null;\r\n\t\t\t\ttail = null;\r\n\t\t\t} else {\r\n\t\t\t\thead = head.next;\r\n\t\t\t\thead.prev = null;\r\n\t\t\t}\r\n\t\t\tindices.remove(0);\r\n\t\t\tsize--;\r\n\t\t\treturn temp.data;\r\n\t\t}\r\n\t}", "public T removeFromFront() throws EmptyListException {\n if(isEmpty())\n throw new EmptyListException(name);\n\n // retrieve data being removed\n T removedItem = firstNode.data;\n\n // update references to firstNode and lastNode\n if(firstNode == lastNode)\n firstNode = lastNode = null;\n else\n firstNode = firstNode.nextNode;\n\n return removedItem;\n }", "public T removeFromFront() throws EmptyListException {\n if (isEmpty()) {\n throw new EmptyListException(nameList);\n }\n\n //get a generic data from first node\n T removedItem = firstNode.getData();\n \n //if first and last nodes are one node we make them null beacuse the last node of list is deleted\n if (firstNode == lastNode) {\n firstNode = lastNode = null; \n } \n \n //if not empty end not last, get the next node and assign it to first\n else {\n firstNode = firstNode.getNext();\n }\n \n //give generic data back\n return removedItem;\n }", "public Item removeLast() {\n if (!isEmpty()) {\n Item item = last.item;\n last = last.front;\n size--;\n if (size != 0)\n last.back = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n\n }", "public Item removeStart() {\n if (size == 0) throw new NoSuchElementException(); // if there's no elements in circle\n else if (size == 1) return removeBreaker(); // if it's the last element\n else { // if there are two or more nodes in the circle\n Node temp = head; // saves the current head\n head = temp.next; // moves head marker\n temp.before.next = head;\n head.before = temp.before; // updates referances\n size--;\n return temp.item;\n }\n }", "public Double remove() throws NoSuchElementException {\n\t\tif (arr.length > 0) {\n\t\t\tDouble temp = arr[0];\n\t\t\tarr = Arrays.copyOfRange(arr, 1, arr.length);\n\t\t\treturn temp;\n\t\t}\n\t\tthrow new NoSuchElementException();\n\t}", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public Object pop(){\n if(first == null){\n throw new NoSuchElementException();\n }\n else\n {\n Object element = first.data;\n first = first.next;\n return element;\n }\n }", "public T remove() throws NoSuchElementException {\n\tT result = poll();\n\tif(result == null) {\n\t throw new NoSuchElementException(\"Priority queue is empty\");\n\t} else {\n\t return result;\n\t}\n }", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = last.item;\n last = last.pre;\n if (last == null) {\n first = null;\n }\n else {\n last.next = null;\n }\n len--;\n return item;\n }", "public synchronized DoubleLinkedListNodeInt removeFirst() {\n\t\tDoubleLinkedListNodeInt node = getFirst();\n\t\tif(node != null){\n\t\t\tnode.remove();\n\t\t}\n\t\treturn node;\n\t}", "public T remove() throws NoSuchElementException {\n T result = poll();\n if (result == null) {\n throw new NoSuchElementException(\"Priority queue is empty\");\n } else {\n return result;\n }\n }", "public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }", "Node removeFirst() {\n\t\tNode tmp = head;\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "public T removeHead()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\tSystem.out.println(\"list is empty\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//advance head reference\n\t\tT value = head.value;\n\t\thead = head.next;\n\t\t\n\t\tsize--;\n\t\treturn value;\n\t\t\n\t}", "public E remove(int index) {\n\t\t// Code from Project 3\n\t\tE removed;\n\t\tif (index < 0 || index >= size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\t// Last element of list or list contain only 1 element\n\t\tif (index == size - 1) {\n\t\t\tremoved = elements[size - 1];\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t} else {\n\t\t\t// remove mid or first element\n\t\t\tremoved = elements[index];\n\t\t\tfor (int i = index; i < size; i++) {\n\t\t\t\telements[i] = elements[i + 1];\n\t\t\t}\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t}\n\t}", "public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }", "T pop(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.remove(0);\n\treturn answer;\n }", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public E remove(int index)\n {\n if (index >= 0 && index < size) {\n E temp = data[index]; // element to return\n\n // shift all elements to the right down by 1 index\n for (int i = index; i < size - 1; i++)\n data[i] = data[i+1];\n \n size--;\n return temp;\n } else\n throw new NoSuchElementException();\n }", "public Item removeLast() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = last.item;\n\t\tNode previousNode = last.previous;\n\t\tlast = null;\n\t\tif (count > 0) {\n\t\t\tlast = previousNode;\n\t\t}\n\t\t\n\t\treturn target;\n\t}", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public Item removeLast() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = last.item;\n last = last.prev;\n if (last != null)\n last.next = null;\n else\n first = last;\n size--;\n return item;\n }", "public E removeFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public int removeFirstNode() {\n\t\tint tmp = getFirstElement();\n\t\thead = head.next;\n\t\treturn tmp;\n\t}", "public T deleteFirst() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[0]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[0]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1\n newElements[i] = elements[i + 1]; // copy elements in temporary array\n }\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return value of element that will be deleted\n }", "@Override\n public E remove() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n size--;\n array[0] = swap(array[size], array[size] = array[0]);\n siftDown(0);\n return (E) array[size];\n }", "public Item removeLast() {\n\t\tif (last == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = last.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tlast = last.previous;\n\t\t\tlast.next = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public E remove(int index) {\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\tE removed = get(index);\n\t\t// Loop to shift elements left\n\t\tfor (int i = index; i < size(); i++) {\n\t\t\tlist[i] = list[i + 1];\n\t\t}\n\t\treturn removed;\n\t}", "public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}" ]
[ "0.8195808", "0.79242504", "0.79073715", "0.7821566", "0.7815732", "0.7774919", "0.77690905", "0.77582186", "0.7722092", "0.77112997", "0.7700011", "0.76784754", "0.76714665", "0.76640016", "0.75593996", "0.75536543", "0.75445575", "0.75000495", "0.74860126", "0.746841", "0.74466234", "0.7425154", "0.7359498", "0.72978884", "0.72900385", "0.72565854", "0.7255665", "0.7223133", "0.70704234", "0.704045", "0.7037586", "0.703327", "0.702827", "0.70200366", "0.6991359", "0.6973743", "0.6948357", "0.69191873", "0.6892895", "0.683133", "0.6829706", "0.68230593", "0.68195164", "0.67887664", "0.67878395", "0.67824924", "0.67724454", "0.6766753", "0.67663914", "0.6760537", "0.6747085", "0.67390895", "0.6719992", "0.66835374", "0.6653137", "0.6650801", "0.6650381", "0.66161025", "0.6612124", "0.66081995", "0.65997356", "0.65863866", "0.658416", "0.6569276", "0.65619963", "0.6561696", "0.6554085", "0.6549074", "0.65479857", "0.6528779", "0.6519761", "0.65183306", "0.6492878", "0.6482017", "0.6480934", "0.64766896", "0.6473821", "0.64697564", "0.64588886", "0.6455829", "0.6449034", "0.64426297", "0.6434829", "0.6428539", "0.6425792", "0.64237744", "0.6423767", "0.6418255", "0.6412823", "0.6405961", "0.63999474", "0.6392617", "0.63914657", "0.6377225", "0.6373921", "0.63686395", "0.63622314", "0.63605875", "0.6359029", "0.6351796" ]
0.65950924
61
/ Adds the specified item to the tail of the list.
public void enqueue(E item) { addLast(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addLast(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Element cannot be null.\");\n }\n Node node = new Node(item);\n node.next = tail;\n node.prev = tail.prev;\n tail.prev.next = node;\n tail.prev = node;\n size++;\n }", "public void addLast(E item) {\n Node<E> n = new Node<>(item);\n size++;\n if(tail == null) {\n // The list was empty\n head = tail = n;\n } else {\n tail.next = n;\n tail = n;\n }\n }", "public void addLast(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tNode<Item> node = new Node<Item>();\n\t\tnode.item = item;\n\t\tif (tail == null) {\n\t\t\thead = node;\n\t\t} else {\n\t\t\ttail.next = node;\n\t\t\tnode.prev = tail;\n\t\t}\n\t\ttail = node;\n\t\tnode.next = null;\n\t\tN++;\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = node;\n } else {\n tail.next = node;\n node.prev = tail;\n tail = node;\n }\n size++;\n }", "public void addLast(Item item){\r\n\t\tif (item == null) throw new NullPointerException();\r\n\t\tif (n == list.length){resize(2*list.length);}\r\n\t\tif(isEmpty()){prior=list.length-1;first=0;last=0;latter=0;}\r\n\t\tlist[latter++]=item;\r\n\t\t last=latter-1;\r\n\t\t if(latter==list.length){latter=0;}\r\n\t\t n++;}", "public void addLast(T listItem) {\n add(listItem);\n }", "public void addLast(Item item) {\n this.doublyLinkedList.addLast(item);\n\n }", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> l = last;\n final Node<Item> newNode = new Node<>(l, item, null);\n last = newNode;\n if (l == null)\n first = newNode;\n else\n l.next = newNode;\n size++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.pre = last;\n if (last == null) {\n last = node;\n first = last;\n }\n else {\n last.next = node;\n last = node;\n }\n len++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldlast = last;\n last = new Node<>();\n last.item = item;\n last.previous = oldlast;\n if (oldlast == null) {\n first = last;\n } else {\n oldlast.next = last;\n }\n size++;\n assert check();\n }", "public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n\n if (this.size == 0) {\n addFirst(item);\n } else {\n this.last.next = new Node(item, null, this.last);\n this.last = this.last.next;\n this.size++;\n }\n }", "public void addLast(E item);", "public void addLast(Item x);", "public void addLast(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextLast] = item;\n nextLast = plusOne(nextLast);\n size += 1;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addLast() with a null argument\");\n }\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if (isEmpty()) {\n first = last;\n }\n else {\n oldLast.next = last;\n last.prev = oldLast;\n }\n n++;\n }", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "public void addLast(Item item) {\n Node oldLast = last;\n last = new Node(oldLast, item, null);\n if (oldLast == null)\n first = last;\n else\n oldLast.next = last;\n size++;\n }", "public void addLast(Item item) {\n\t\tif (item == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot add null item\");\n\t\t}\n\n\t\tNode node = new Node(item);\n\t\tif (last == null) {\n\t\t\tfirst = last = node;\n\t\t} else {\n\t\t\tnode.previous = last;\n\t\t\tlast.next = node;\n\t\t\tlast = node;\n\t\t}\n\t\tsize++;\n\n\t}", "public void addLast(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (lastCursor == items.length) {\r\n resize(2 * items.length);\r\n }\r\n items[lastCursor++] = item;\r\n }", "public void addLast(Item item) {\n if (item == null) throw new IllegalArgumentException(\"argument is null\");\n if (!isEmpty()) {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = last;\n last.next = a;\n last = a;\n\n }\n else {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = null;\n first = a;\n last = a;\n }\n size++;\n\n }", "public void addLast(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addLast(Item item) {\n\t\tif (item == null) throw new NullPointerException();\n\n\t\tcount++;\n\n\t\tNode lastNode = new Node();\n\t\tlastNode.item = item;\n\t\tif (count > 1) {\n\t\t\tlastNode.previous = last;\n\t\t\tlast.next = lastNode;\n\t\t} else {\n\t\t\tfirst = lastNode;\n\t\t}\n\t\tlast = lastNode;\t\n\t}", "public void addLast(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newLast = new Node<Item>(item);\n last.next = newLast;\n newLast.prev = last;\n last = newLast;\n }\n size++;\n }", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n\n if (this.last == null) {\n this.last = new Node();\n this.last.item = item;\n this.first = this.last;\n } else {\n Node newlast = new Node();\n newlast.item = item;\n newlast.prev = this.last;\n this.last.next = newlast;\n this.last = newlast;\n }\n this.n++;\n }", "public void addLast(Object item) throws ListException {\r\n\t\tDoublyNode newNode = new DoublyNode(item);\r\n\t\t//This will add an item to the last spot in the list if the list is not empty\r\n\t\tif(!isEmpty()){\r\n\t\t\t//Set a prevNode pointer to keep track of the node before the new node\r\n\t\t\tDoublyNode prevNode;\r\n\t\t\tprevNode = head.getPrev();\r\n\r\n\t\t\thead.setPrev(newNode);//Set the heads previous pointer\r\n\t\t\tnewNode.setPrev(prevNode);//Set the new nodes previous pointer\r\n\t\t\tnewNode.setNext(head);//Set the new nodes next pointer\r\n\t\t\tprevNode.setNext(newNode);//Set the previous nodes next pointer\r\n\t\t}\r\n\t\t//This will add an item to the last spot in the list of an empty list\r\n\t\telse{\r\n\t\t\thead.setNext(newNode);//Set the head next pointer to the new node\r\n\t\t\thead.setPrev(newNode);//Set the head prev pointer to the new node\r\n\t\t\tnewNode.setNext(head);//Set the new node next pointer to the head\r\n\t\t\tnewNode.setPrev(head);//Set the new node prev pointer to the head\r\n\t\t}\r\n\t\tnumItems++;//Increment number of items\r\n\t}", "public void addLast(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//save old last node\n\t\t\tNode<Item> oldLast = last;\n\t\t\t//assign last node to a new node\n\t\t\tlast = new Node<Item>();\n\t\t\tlast.item = item;\n\t\t\tlast.next = null;\n\t\t\tlast.prev = oldLast;\n\t\t\t//if the first item to add\n\t\t\tif(oldLast == null){\n\t\t\t\tfirst = last;\n\t\t\t}else{\n\t\t\t\toldLast.next = last;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t\t\t\n\t}", "@Override\n\tpublic void insertAtLast(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tNode<T> tmpNode = this.head;\n\t\t\twhile (tmpNode.getNext() != null) {\n\t\t\t\ttmpNode = tmpNode.getNext();\n\t\t\t}\n\t\t\ttmpNode.setNext(newNode);\n\t\t}\n\t\tlistSize++;\n\t}", "public void addLast(Item item) throws NullPointerException {\n if (item == null) {\n throw new NullPointerException(\"Cannot add null item to end of deque\");\n }\n Node n = new Node(); //n = temporary Node\n n.setItem(item);\n if (isEmpty()) { //if item is added to empty deque, set n as head and tail (deque now has 1 node)\n head = n;\n tail = n;\n } else { //else item is added to non-empty deque\n tail.setNext(n);\n n.setPrev(tail);\n tail = n;\n }\n size++; //increment deque size\n }", "public void addLast(Item item) {\n if(isEmpty()) addFirst(item); // if DList is empty, call addFront(Item item)\n else {\n // create a new Node: it's next pointer points to the last sentinel node\n Node newNode = new Node();\n newNode.data = item;\n newNode.next = last;\n // copy the node that last was pointing to previously\n Node oldLast = last.prev;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n // take care of the last sentinel node (no need to take of first):\n last.prev = newNode; \t\t\t\n // update size:\n size++;\n }\n }", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "public void addLast(Item item) throws NullPointerException {\n checkItemNotNull(item);\n\n Node oldlast = last;\n last = new Node(item);\n\n if (isEmpty()) {\n first = last;\n } else {\n oldlast.next = last;\n last.prev = oldlast;\n }\n size++;\n }", "@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }", "public void addLast(E item){\r\n }", "public void addlast(Item item)\r\n {\r\n Node last = post.prev;\r\n Node x = new Node();\r\n x.item = item;\r\n x.next = post;\r\n x.prev = last;\r\n post.prev = x;\r\n last.next = x;\r\n n++;\r\n }", "public void addLast(Item item) {\n deck[bBack--] = item;\n }", "public void addLast(T item) throws Exception {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\tif (isEmpty()) {\n\n\t\t\t// your ll was already empty and now you are adding an element for the 1st time\n\t\t\t// : spcl case\n\t\t\thead = nn;\n\n\t\t} else {\n\n\t\t\t// linking\n\t\t\tNode last = getNodeAt(size() - 1);\n\t\t\tlast.next = nn;\n\n\t\t}\n\t}", "public void addAtEnd(int item) {\n\t\t// pre: a head node is created; length doesn't matter\n\t\t// post: node added in the end; length increased\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t}\n\t\tthis.length++;\n\t}", "public void addLast(Item item) { // initiation\n if (item != null) {\n if (size == 0) {\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else {\n Node oldlast = last;\n last = new Node();\n last.back = null;\n last.item = item;\n last.front = oldlast;\n oldlast.back = last;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "public void addLast(Object item){\n //Using the getNode() method to retrieve the reference and then call addAfter()\n MovieNode target = getNode(size);\t//yo retreive the last MovieNode\n addAfter(target, item);\t\t\t//call the addAfter method \n }", "public void addLast(Item item) {\n verifyItemIsNotNull(item);\n\n // If deque is not empty, then link a new node and point endOfDeque to it\n if (!isEmpty()) {\n // Create a variable that points to the end of deque.\n Node previousEndOfDeck = endOfDeque;\n\n // Point endOfDeque to a new node and set the values\n endOfDeque = new Node();\n endOfDeque.next = null;\n endOfDeque.previous = previousEndOfDeck;\n\n previousEndOfDeck.next = endOfDeque;\n }\n endOfDeque.item = item;\n dequeSize++;\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 void addItem(Object item) {\n\t\tListItem newEnd = new ListItem(item); // Create a new ListItem\n\t\tif (start == null) { // Is the list empty?\n\t\t\tstart = end = newEnd; // Yes, so new element is start and end\n\t\t\tstart.prev = start; \t\t// Prev start refers to itself\n\t\t} else { // No, so append new element\n\t\t\tend.next = newEnd; // Set next variable for old end\n\t\t\tcurrent = end;\t\t\t\t// To reference previous end object \n\n\t\t\t//Point end to the new ListItem object\n\t\t\tend = newEnd; // Store new item as end\n\t\t\tend.prev = current;\t\t// Set prev item in new end\n\t\t}\n\t}", "public void insertAfter(Object item) {\n this.next = new SListNode(item, next);\n }", "public void addLast(E e) { // adds element e to the end of the list\n // TODO\n addFirst(e);\n tail = tail.getNext();\n }", "public void addLast(T element);", "public void append(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n Node lastNode = findNode(size);\n newNode.next = head;\n lastNode.next = newNode;\n size++;\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "@Override\r\n public T add(T item) \r\n {\n Node<T> n = new Node<T>();\r\n n.setItem(item);\r\n\r\n if (head == null) { //first one\r\n head = n;\r\n tail = n;\r\n } else {\r\n tail.setNext(n); //tail's next is the new node\r\n n.setPrevious(tail); //points the new node backwards at the tail\r\n tail = n; //sets tail to the node we added\r\n }\r\n\r\n count++;\r\n\r\n return item;\r\n }", "public void addLast(String item) {\r\n\t\tNode next = header;\r\n\t\twhile (next.next != null) {\r\n\t\t\tnext = next.next;\r\n\t\t}\r\n\t\tNode n = new Node();\r\n\t\tn.value = item;\r\n\t\tnext.next = n;\r\n\t\tn.previous = next;\r\n\r\n\t}", "public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }", "public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }", "private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }", "public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\n }", "public synchronized void addLast(DoubleLinkedListNodeInt node) {\n\t\tnode.setNext(tail);\n\t\tnode.setPrev(tail.getPrev());\n\t\tnode.getPrev().setNext(node);\n\t\ttail.setPrev(node);\n\t\tnode.setOwnerList(this);\n\t\tsize++;\n\t}", "@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 Node<E> addToEnd(Node<E> node){\n Node<E> previous = tail.getPrevious();\n\n previous.setNext(node);\n node.setPrevious(previous);\n tail.setPrevious(node);\n node.setNext(tail);\n size++;\n\n return node;\n }", "@Override\n public void addLast(Item i) {\n resize();\n items[nextLast] = i;\n size += 1;\n nextLast = moveForward(nextLast, 1);\n }", "protected void addToTail(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, null, tail);\n\t\t\n\t\tif(tail != null)\n\t\t\ttail.setNext(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\thead = newElm;\n\t\t\t\n\t\ttail = newElm;\n\t}", "public void append(Object item);", "public void add(T item) \n\t//PRE: The input parameter item can be any type but must be initialized\n\t//POST: The input parameter item is added to the circular linked list\n\t{\n\t\tNode<T> n = new Node<T>(item);\t//initialize new node for list \n\t\tnewState(n);\t\t\t\t\t\n\t\tif(start == null) //if list is empty\n\t\t{ \n\t\t\tstart = n;\n\t\t\tn.next = start;\n\t\t}\n\t\telse \t\t\t//if the list is not empty\n\t\t{ // find end\n\t\t\tNode tmp = start;\n\t\t\twhile(tmp.next != start) \n\t\t\t{ // scan until loop\n\t\t\t\tnewState(tmp);\n\t\t\t\ttmp = tmp.next;\n\t\t\t}\n\t\t\t// tmp.next == start at this point\n\t\t\tn.next = start;\n\t\t\ttmp.next = n; // complete the loop\n\t\t}\n\t\tlength++;\t//increment length of list\n\t\tnewState(null);\n\t}", "@Override\n public void addTail (E el){\n if (el == null)\n return;\n\n // it the list is empty\n if (this.size <= 0){\n this.head = new Node2<E>(el);\n this.tail = this.head;\n this.size = 1;\n return;\n }\n\n Node2<E> temp = new Node2<E>(el);\n this.tail.setNext(temp);\n this.tail = temp;\n this.size++;\n }", "public void addToEnd(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n } else {\n tail.connectNext(current);\n }\n tail = current;\n count++;\n }", "public void addToTail(int i)\r\n\t{\r\n\t\tNode add = new Node(i, null);\r\n\t\t\r\n\t\t// checks if the list is empty then adds value to tail.\r\n\t\tif(start == null)\r\n\t\t{\r\n\t\t\tstart = add;\r\n\t\t}\r\n\t\t\r\n\t\t// checks if the last value is null then adds value to tail.\r\n\t\tif(end == null)\r\n\t\t{\r\n\t\t\tend = add;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// if there are more values in SLL.\r\n\t\tend.next = add;\r\n\t\tend = add;\r\n\t}", "public void addItem(Object item)\r\n {\r\n LLNode newNode;\r\n synchronized (nodeMutex)\r\n {\r\n if (nodePool.size() > 0)\r\n {\r\n newNode = (LLNode)nodePool.lastElement();\r\n newNode.key = item;\r\n newNode.next = newNode.prev = null;\r\n nodePool.removeElementAt(nodePool.size() - 1);\r\n } else\r\n {\r\n newNode = new LLNode(item);\r\n }\r\n }\r\n\r\n if (head == null)\r\n {\r\n head = tail = newNode;\r\n } else\r\n {\r\n tail.next = newNode;\r\n newNode.prev = tail;\r\n tail = newNode;\r\n }\r\n nItems++;\r\n }", "public void add(Item item) {\n Node last = post.previous;\n Node node = new Node();\n node.item = item;\n node.next = post;\n node.previous = last;\n post.previous = node;\n last.next = node;\n size++;\n }", "public /*@ non_null @*/ JMLListEqualsNode<E> append(E item) {\n // To avoid full recursion, we build the reverse of what we want in\n // revret, then reverse it. To make sure we only clone once,\n // we let reverse do the cloning\n JMLListEqualsNode<E> ptr = this;\n JMLListEqualsNode<E> revret = null;\n //@ maintaining (* reverse(revret) concatenated with ptr equals this *);\n while (ptr != null) {\n revret = new JMLListEqualsNode<E>(ptr.val, revret); // don't clone yet\n ptr = ptr.next;\n }\n return (new JMLListEqualsNode<E>(item, revret)).reverse();\n }", "public void addToTheLast(Node node) \n\t{\n\t\tif (head == null) \n\t\t{\n\t\t\thead = node;\n\t\t} else \n\t\t{\n\t\t Node temp = head;\n\t\t while (temp.next != null)\n\t\t temp = temp.next;\n\t\t temp.next = node;\n\t\t}\n }", "public void addLast(T value) {\n Node<T> node = new Node<T>(value);\n Node<T> prev = sentinel.prev;\n\n node.prev = prev;\n prev.next = node;\n sentinel.prev = node;\n node.next = sentinel;\n\n size += 1;\n }", "public void insertAtEndOfList(T item){\n //if (contains(item) == false) {\n MyDoubleNode<T> temp = new MyDoubleNode();\n MyDoubleNode<T> temp2 = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n temp.next = tail;\n tail.prev = temp;\n }\n else {\n temp.data = item;\n temp2 = tail.prev;\n temp.prev = temp2;\n temp2.next = temp;\n temp.next = tail;\n tail.prev = temp;\n\n }\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 add(Item item) {\r\n Node x = current.prev; //prev node\r\n Node y = new Node(); //new node\r\n Node z = current; //current node\r\n y.item = item;\r\n x.next = y;\r\n y.next = z;\r\n z.prev = y;\r\n y.prev = x;\r\n n++;\r\n index++;\r\n lastAccessed = null;\r\n }", "void pushBack(T value) throws ListException;", "public void addLast(TypeHere x) {\n if (size == items.length) {\n resize(size + 1);\n }\n items[size] = x;\n size += 1;\n }", "public void addLast(Item x) {\n StuffNode last = new StuffNode(x, sentinel, null);\n if (this.isEmpty()) {\n last.prev = sentinel;\n sentinel.next = last;\n } else {\n StuffNode oldlast = sentinel.prev;\n last.prev = oldlast;\n oldlast.next = last; // SO MUCH PAIN!!!\n }\n this.sentinel.prev = last;\n size += 1;\n\n }", "public static MyLinkedList addToTail(MyLinkedList list, int value) {\n\n Node toInsert = new Node(value);\n toInsert.next = null; //because it has to be the tail (last node)\n\n // If the Linked List is empty,\n // then make the new node as head\n if (list.head == null) {\n list.head = toInsert;\n } else {\n // Else traverse till the last node\n // and insert the new_node there\n Node last = list.head;\n while (last.next != null) {\n last = last.next;\n }\n // Insert the new_node at last node\n last.next = toInsert;\n }\n return list;\n }", "public void addAtTail(int val) {\n ListNode curr = new ListNode(val);\n size++;\n if (size == 0) {\n head = curr;\n tail = curr;\n }\n tail.next = curr;\n tail = curr;\n }", "public void addNode(int item) { \n //Create a new node \n Node newNode = new Node(item); \n \n //if list is empty, head and tail points to newNode \n if(head == null) { \n head = tail = newNode; \n //head's previous will be null \n head.previous = null; \n //tail's next will be null \n tail.next = null; \n } \n else { \n //add newNode to the end of list. tail->next set to newNode \n tail.next = newNode; \n //newNode->previous set to tail \n newNode.previous = tail; \n //newNode becomes new tail \n tail = newNode; \n //tail's next point to null \n tail.next = null; \n } \n }", "public void pushRight(Item item){\n Node<Item> oldLast = last;\n last = new Node<>();\n last.item = item;\n last.next = null;\n\n if (n == 0) first = last;\n else if(oldLast!=null) oldLast.next = last;\n }", "public void addLast(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n elements[size] = t; //store element at last position\n size++; // increment size\n }", "public void addAfter(MovieNode target, Object item){\n MovieNode insert = new MovieNode(item);\n insert.next = target.next;\n target.next = insert;\n size++;\n }", "public void addLast(Object data) {\n Node newNode = new Node(data);\n if(isEmpty()) {\n addFirst(data);\n } else {\n tail.next = newNode;\n tail = newNode;\n size ++;\n }\n }", "public void addAtTail(E entry) {\n\t\tLinkedNode<E> temp = new LinkedNode<E>(entry, null);\n\t\tsize++;\n\t\tif(head == null) {\n\t\t\thead = temp;\n\t\t\ttail = head;\n\t\t} else {\n\t\t\ttail.setNext(temp);\n\t\t\ttail = temp;\n\t\t}\n\t}", "public void addLast(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(tail);\n tail.getPrevious().setNext(newNode);\n newNode.setPrevious(tail.getPrevious());\n tail.setPrevious(newNode);\n size++;\n }", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "public void addLast(Object e) {\n if(head == null) {\n addFirst(e);\n return;\n }\n\n Node n = new Node(e, tail, null);\n tail.setNext(n);\n tail = n;\n }", "public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public Node<T> addAfter(Node<T> listNode, T t) \r\n {\r\n Node<T> afterNewNode = listNode.next;\r\n Node<T> newNode = new Node<T>(t, listNode, afterNewNode);\r\n listNode.next = newNode;\r\n afterNewNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "Position<T> addLast(T data);", "public void addAtTail(int val) {\n ListNode ptr=new ListNode(val);\n if(tail==null)\n head = ptr;\n else\n tail.next = ptr;\n tail = ptr;\n size++;\n // display();\n }", "@Override\n public void addLast(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[tail] = value;\n size++;\n return;\n }\n tail = ++tail % dequeue.length;\n dequeue[tail] = value;\n size++;\n if (size == dequeue.length) {\n widen();\n }\n }", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public void addAtTail(int val) {\n addAtIndex(size, val);\n }", "public void addAtTail(int val) {\n addAtIndex(size, val);\n }", "public void addToEnd(T obj) {\r\n \t\t// Check obj is not null\r\n \t\tif(obj == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t// Check if items is full\r\n \t\tif(numItems == items.length) {\r\n \t\t\tdoubleArrayLength();\r\n \t\t}\r\n \t\titems[numItems++] = obj;\r\n \t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(int pos, T item){\n\n\t\tif(pos > data.length){\n\t\t\tcurrentsize = currentsize*2;\n\t\t}\n\n\t\n\t\tfor(int i = currentsize; i > pos; i--){\n\t\t\tdata[i] = data[i-1];\n\t\t}\n\t\tdata[pos]= item;\n\t\tcurrentsize++;\n\t}", "public RNode insertAtBack(int item) {\n if (next == null) {\n next = new RNode(item, null);\n return this;\n } else {\n next = next.insertAtBack(item);\n return this; \n }\n }", "public void addLast(E x) {\n\t\t\n\t\tNode p = mTail;\n\t\tp.data = x;\n\n\t\tmTail = new Node(null, null);\n\n\t\tp.next = mTail;\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void insertEnd(Item item) {\n if (size == 0) insertCreator(item); // if circle is empty\n else { // if these's at least one node already\n Node temp = new Node(item, head, head.before); // creates a new node\n head.before.next = temp;\n head.before = temp;\n }\n size++;\n }", "public void addLast(E e) {\n addBetween(e, trailer.getPrev(), trailer);\n }" ]
[ "0.80121773", "0.7982903", "0.7958013", "0.7954832", "0.79452306", "0.7935245", "0.77702713", "0.7752568", "0.77449507", "0.7707544", "0.7704053", "0.76723886", "0.76450264", "0.7610942", "0.7587622", "0.75808066", "0.75807434", "0.7563614", "0.75515133", "0.75141734", "0.751276", "0.7505714", "0.7490099", "0.7488857", "0.74601346", "0.74561524", "0.743953", "0.7425478", "0.7410645", "0.7394332", "0.73613507", "0.7360781", "0.7321253", "0.7275212", "0.72047657", "0.7165232", "0.7150671", "0.71340984", "0.7106999", "0.7097086", "0.70421", "0.68532896", "0.6832775", "0.6806545", "0.67729944", "0.6757597", "0.6734564", "0.6720289", "0.6680508", "0.6674183", "0.66674155", "0.6666986", "0.66663927", "0.6659609", "0.6606606", "0.65949696", "0.65790004", "0.65739036", "0.65554893", "0.65538913", "0.64835465", "0.64713144", "0.6450713", "0.6449626", "0.64354706", "0.6430748", "0.64206105", "0.64091176", "0.6393051", "0.63777554", "0.6372856", "0.6357406", "0.63335234", "0.63322663", "0.632746", "0.63018894", "0.6293189", "0.6291887", "0.62915313", "0.6285598", "0.6253743", "0.6245511", "0.6242757", "0.6238004", "0.6237507", "0.62237006", "0.62166274", "0.6206533", "0.6182615", "0.61815447", "0.6174219", "0.61667997", "0.61437273", "0.61437273", "0.61361974", "0.6121546", "0.6093362", "0.6051939", "0.60276544", "0.60274976" ]
0.6189476
88
/ Returns an array containing the elements of this list.
public Object[] toArray() { Object[] arr = new Object[size]; Node<E> cur = head; for(int i = 0; i < size; i++) { arr[i] = cur.item; cur = cur.next; } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object[] elements() {\n return elements.toArray();\n }", "public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }", "public Object[] getElements() {\r\n\t\treturn data.toArray();\r\n\t}", "@Override\n public Object[] toArray() {\n Object[] result = new Object[size];\n int i = 0;\n for (E e : this) {\n result[i++] = e;\n }\n return result;\n }", "public Object[] toArray()\n\t{\n\t\treturn list.toArray();\n\t}", "public Object[] getElements() {\r\n\t\treturn elements.clone();\r\n\t}", "public Object[] toArray(){\n\n \tObject[] o = new Object[list.size()];\n\n o = list.toArray();\n\n \treturn o;\n\n }", "public Object[] toArray() {\n Object[] arr = new Object[size];\n for(int i = 0; i < this.size; i++) {\n arr[i] = this.get(i);\n }\n return arr;\n }", "@Override\n\tpublic Object[] toArray() {\n\t\tObject[] result = copyArray(elements, size);\n\n\t\treturn result;\n\t}", "@Override\n public T[] toArray() {\n //create the return array\n T[] result = (T[])new Object[this.getSize()];\n //make a count variable to move through the array and a reference\n //to the first node\n int index = 0;\n Node n = first;\n //copy the node data to the array\n while(n != null){\n result[index++] = n.value;\n n = n.next;\n }\n return result;\n }", "public Object[] toArray() {\n\t\tint k;\n\t\tNode p;\n\n\t\tObject[] retArray = new Object[mSize];\n\t\tfor (k = 0, p = mHead.next; k < mSize; k++, p = p.next)\n\t\t\tretArray[k] = p.data;\n\t\treturn retArray;\n\t}", "public Object[] toArray() {\r\n Object[] arr = new Object[size];\r\n Node<T> current = head.next();\r\n for (int i = 0; i < size; i++) {\r\n arr[i] = current.getData();\r\n current = current.next();\r\n }\r\n return arr;\r\n }", "public WebElement[] toArray() {\n\t\treturn ToArrayFunction.toArray(this, elements);\n\t}", "@Override\n public int[] toArray() {\n int[] result = new int[size];\n Entry tmp = first;\n for (int i = 0; i < size; i++) {\n result[i] = tmp.value;\n tmp = tmp.next;\n }\n return result;\n }", "public COSArray toList() \n {\n return array;\n }", "public Polynomial[] getAsArray() {\n Polynomial[] list = new Polynomial[collection.size()];\n\n for (int i = 0; i < collection.size(); i++) {\n list[i] = collection.get(i);\n }\n return list;\n }", "public E[] values(){\n\t\tE[] output = (E[]) new Object[howMany];\n\t\tint j = 0;\n\t\tfor (int i = 0; i < elem.length; i++)\n\t\t\tif (elem[i] != null){\n\t\t\t\toutput[j] = elem[i];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\treturn output;\n\t}", "public Object[] toArray() {\n\t\tObject[] arg = new Object[size];\r\n\t\t\r\n\t\tNode<E> current = head;\r\n\t\tint i = 0;\r\n\t\twhile(current != null) {\r\n\t\t\targ[i] = current.getData();\r\n\t\t\ti++;\r\n\t\t\tcurrent = current.getNext();;\r\n\t\t}\r\n\t\treturn arg;\r\n\t}", "private TaskListItem[] getListArray() {\n return allLists.toArray(new TaskListItem[allLists.size()]);\n }", "@Override\n public Object[] toArray() {\n Object[] tempArray = new Object[size];\n Node n = this.head;\n int i = 0;\n while (i<size) {\n tempArray[i] = n.getData();\n i++;\n n = n.next;\n }\n return tempArray;\n }", "@Override\n\tpublic Object[] toArray() {\n\t\tif (isEmpty()) {\n\t return null;\n\t }\n\n\t\tObject[] data = new Object[size()];\n\n\t ListNode tmp = head;\n\t for (int i = 0; i < size(); i++) {\n\t data[i] = tmp.datum;\n\t tmp = tmp.next;\n\t }\n\n\t return data;\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic T[] asArray() {\n\t\t// have to use explicit cast because we cannot use the alternative signature of toArray(T[]), as you cannot instantiate an array of a\n\t\t// type parameter (not even an empty array)\n\t\treturn (T[]) this.itemList.toArray();\n\t}", "public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "public default T[] toArray() {\n Object[] array = new Object[size()];\n int i = 0;\n for (T t : this) {\n array[i++] = t;\n }\n return (T[]) array;\n }", "public java.util.List[] getPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(POINT$0, targetList);\n java.util.List[] result = new java.util.List[targetList.size()];\n for (int i = 0, len = targetList.size() ; i < len ; i++)\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getListValue();\n return result;\n }\n }", "@Override\n\tpublic Object[] toArray() {\n\t\tListNode<L> newHead=first;\n\t\tObject[] array=new Object[size];\n\t\tfor(int i =0;i<size;i++) {\n\t\t\tarray[i]=newHead.storage;\n\t\t\tnewHead=newHead.next;\n\t\t}\n\t\treturn array;\n\t}", "public Object[] toArray() {\n Object[] tmp = new Object[this.container.length];\n System.arraycopy(this.container, 0, tmp, 0, tmp.length);\n return tmp;\n }", "public Object[] toArray() {\n Object[] myarray = new Object[size];\n DoublyLinkedListNode<T> pointer = head;\n for (int i = 0; i < size; i++) {\n myarray[i] = pointer.getData();\n pointer = pointer.getNext();\n }\n return myarray;\n\n\n }", "@Override\n public Object[] toArray() {\n Object[] result = new Object[currentSize];\n System.arraycopy(container, 0, result, 0, currentSize);\n return result;\n }", "public ArrayList<Integer> getElements()\n {\n return this.elements;\n }", "public Object[] getArray() {\n compress();\n return O;\n }", "protected Object[] getList() {\n return list;\n }", "@Override\r\n\tpublic Object[] getElements(Object inputElement) {\n\t\treturn ((List) inputElement).toArray();\r\n\t}", "public int[] toArray() {\n return Arrays.copyOf(buffer, elementsCount);\n }", "@Override\n public T[] toArray() {\n T[] result = (T[])new Object[numItems];\n for(int i = 0; i < numItems; i++)\n result[i] = arr[i];\n return result;\n }", "public float[] toArray() {\r\n float[] result = new float[size];\r\n System.arraycopy(elementData, 0, result, 0, size);\r\n return result;\r\n }", "public int[] getInnerArray() {\n\t\treturn data;\n\t}", "protected Object[] getArray(){\r\n\t \treturn array;\r\n\t }", "public List<Pair<Integer, Integer>> getArray(){\n return qtadePorNum;\n }", "public abstract ArrayList<Cell> getSelfArray();", "public Object[] toArray() {\n return Arrays.copyOf(this.values, this.index);\n }", "public E[] toArray() {\n return (E[]) Arrays.copyOfRange(queue, startPos, queue.length);\n }", "public double[] toArray() {\n\t\treturn acc.toArray();\n\t}", "@Override\n public T[] toArray() {\n return this.copyArray(this.data, this.size);\n }", "public Object getArray() {\n\t\treturn array;\n\t}", "public Object[] getElements(Object element) {\n\t\t\treturn ((ArrayList) element).toArray();\r\n\t\t}", "public Object[] toArray() {\n\n return toArray(new Object[size()]);\n }", "public float[] array() {\r\n\t\treturn new float[] { x, y, z };\r\n\t}", "public Object[] toArray() {\n\t\treturn null;\n\t}", "@Override\r\n\t\tpublic Object[] getElements(Object inputElement) {\n\t\t\ttry{\r\n\t\t\t\treturn ((List)inputElement).toArray();\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}", "public Expression getArray()\n {\n return getExpression();\n }", "public ArrayList<String[]> getArr() {\r\n\t\treturn arr;\r\n\t}", "E[] toArray();", "public Item[] getList() {\n\t\treturn list;\n\t}", "public Object[] getItems()\n {\n return items.toArray();\n }", "public double[] element() {\n\t\treturn _coordinates;\n\t}", "public List allElements() {\r\n\t\tArrayList elems = new ArrayList();\r\n\t\tfor (int i = 0; i < elements.size(); ++i) {\r\n\t\t\tObject ob = elements.get(i);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t} else if (ob instanceof FunctionDef) {\r\n\t\t\t\tExpression[] params = ((FunctionDef) ob).getParameters();\r\n\t\t\t\tfor (int n = 0; n < params.length; ++n) {\r\n\t\t\t\t\telems.addAll(params[n].allElements());\r\n\t\t\t\t}\r\n\t\t\t} else if (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TArrayType) {\r\n\t\t\t\t\tExpression[] exp_list = (Expression[]) tob.getObject();\r\n\t\t\t\t\tfor (int n = 0; n < exp_list.length; ++n) {\r\n\t\t\t\t\t\telems.addAll(exp_list[n].allElements());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\telems.add(ob);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\telems.add(ob);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn elems;\r\n\t}", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "public double[] toArray() {\n\t\treturn new double[] {x, y, z};\n\t}", "public double[] getAsArray() {\n return position.getAsArray();\n }", "public String[] getArray(){\n return (String[])this.items.toArray();\n }", "public List getList() {\n return Arrays.asList(toJavaArray()); \n }", "public E[] getArray() {\n return this.array;\n }", "public Object[] toArray() {\n\t\tObject[] ret = new Object[currentSize];\n\t\tfor (int i = 0; i < currentSize; i++)\n\t\t\tret[i] = array[i];\n\t\treturn ret;\n\t}", "public double[][] getCompleteElements() {\n double[][] values = new double[getRowDimension()][getColumnDimension()];\n for (int rowIndex = 0; rowIndex < getRowDimension(); rowIndex++) {\n for (int columnIndex = 0; columnIndex < getColumnDimension(); columnIndex++) {\n values[rowIndex][columnIndex] = getElement(rowIndex, columnIndex);\n }\n }\n return values;\n }", "public Object[] list() {\r\n ArrayList<Object> obj = new ArrayList<>();\r\n obj.add(row);\r\n obj.add(table);\r\n obj.add(variable);\r\n obj.add(name);\r\n obj.add(equEquipement);\r\n obj.add(equDesignation);\r\n obj.add(orgOrgane);\r\n obj.add(orgDesignation);\r\n obj.add(unite);\r\n obj.add(comment);\r\n obj.add(datemod);\r\n obj.add(state);\r\n\r\n return obj.toArray();\r\n }", "public final Object[] getArray() {\n return array;\n }", "@Override\r\n\tpublic T[] toArray() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tT[] result = (T[])new Object[topIndex + 1];\r\n\t\tfor(int index = 0; index < result.length; index ++) {\r\n\t\t\tresult[index] = stack[index];\r\n\t\t}\r\n\treturn result;\r\n\t}", "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "public Object[] getList() {\n\t\treturn new Object[]{pitch, duration, velocity};\n\t}", "public Item[] toItemArray()\r\n {\r\n Item[] a = new Item[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (Item) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic E[] toArray() {\r\n\t\tE[] array = null;\r\n\t\tif (!heap.isEmpty()) {\r\n\t\t\tarray = (E[]) Array.newInstance(heap.get(0).getClass(), heap.size());\r\n\t\t\tint i = 0;\r\n\t\t\tfor (E e : heap) {\r\n\t\t\t\tarray[i++] = e;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}", "public List<Expression> getElements() {\n\t\treturn elements;\n\t}", "public double[] asArray() {\n final double[] result = new double[COMPONENTS];\n asArray(result);\n return result;\n }", "public int[] getIntArray() {\r\n\t\t\r\n\t\treturn (value.getIntArray());\r\n\t}", "public java.lang.Object[] getArbolesAsArray()\r\n {\r\n return (arboles == null) ? null : arboles.toArray();\r\n }", "public Object[] toArray(){\n\t\t// allocate the array an an iterator\n\t\t\t\tObject[] arr = new Object[hashTableSize];\n\t\t\t\tIterator<T> iter = iterator();\n\t\t\t\tint i = 0;\n\n\t\t\t\t// iterate the hash table and assign its\n\t\t\t\t// values into the array\n\t\t\t\twhile (iter.hasNext()) {\n\t\t\t\t\tarr[i] = iter.next();\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\treturn arr;\n\t}", "public int[] toArray() \n {\n \treturn arrayCopy(state);\n }", "@Override\n public byte [] toArray()\n \n {\n final int size = size();\n final byte [] array = \n new byte [size]; \n \n\n int i = 0;\n for (ByteCursor c : this)\n {\n array[i++] = c.value;\n }\n return array;\n }", "public T[] toArray() {\n return null;\n }", "public org.hl7.fhir.ResourceReference[] getMemberArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(MEMBER$14, targetList);\n org.hl7.fhir.ResourceReference[] result = new org.hl7.fhir.ResourceReference[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "public amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value[] getValueArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(VALUE$0, targetList);\n amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value[] result = new amdocs.iam.pd.webservices.productattrrel.productdetailsoutput.Value[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "T[] getObjects() {\n\t\treturn this.array;\n\t}", "ArrayList<String> returnArray() {\n\t\treturn stringArray; // Return just the array and not the Set object\n\t}", "public T[] getMyList() {\n\n return myList;\n }", "public PurchaseItem[] getPurchaseListAsArray()\r\n\t{\r\n\t\treturn m_purechaseList.toArray(new PurchaseItem[0]);\r\n\t}", "public Node<E>[] toArray(){\n Node<E>[] array = new Node[size];\n Node<E> current = head.getNext();\n for (int i = 0; i < size; i++){\n array[i] = current;\n current = current.getNext();\n }\n return array;\n }", "public int[] getArray() {\r\n return array;\r\n }", "@Override\r\n\tpublic Object[] toArray() {\n\t\treturn set.toArray();\r\n\t}", "@Override\n public List<IExpression> getElements() {\n return elements;\n }", "public SubMenuItem[] getArray() {\n return this.toArray(new SubMenuItem[this.size()]);\n }", "public Object[] toArray() {\r\n\t\treturn this.records.toArray();\r\n\t}", "public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }", "public long[] toArray() {\n/* 406 */ long[] array = new long[(int)(this.max - this.min + 1L)];\n/* 407 */ for (int i = 0; i < array.length; i++) {\n/* 408 */ array[i] = this.min + i;\n/* */ }\n/* 410 */ return array;\n/* */ }", "public T[] items();", "Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }", "@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn snapshot().toArray();\n\t\t}", "public Array<Particle> getParticlesListIteration() {\n return new Array(masterList);\n }", "public int[] getArray() {\r\n\t\treturn array;\r\n\t}", "public V[] values() {\n MyStack<V> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current.getValue());\n current = current.getNext();\n }\n result.push(current.getValue());\n }\n }\n return result.toArray();\n }" ]
[ "0.8036791", "0.77703357", "0.75207335", "0.75193113", "0.75071645", "0.750005", "0.7388743", "0.7345959", "0.73448384", "0.73177546", "0.72916377", "0.7287121", "0.7279544", "0.7264225", "0.72271276", "0.72103053", "0.720587", "0.71608186", "0.71396303", "0.71190095", "0.7097382", "0.70961857", "0.703655", "0.6996843", "0.6983865", "0.6973381", "0.6967907", "0.6962018", "0.6939583", "0.6938862", "0.69135433", "0.6893408", "0.68914306", "0.6886479", "0.6884357", "0.68579936", "0.6846903", "0.6809535", "0.6752302", "0.6742144", "0.6740959", "0.673413", "0.67339486", "0.6728822", "0.6717023", "0.6715594", "0.66982555", "0.6697374", "0.6691748", "0.66707355", "0.6665492", "0.6657224", "0.66509", "0.66501784", "0.6649802", "0.6642132", "0.66307193", "0.66291", "0.6625237", "0.6621709", "0.6607805", "0.66053015", "0.66050726", "0.66005796", "0.65834546", "0.65524304", "0.65264195", "0.6525873", "0.65236115", "0.650904", "0.65032715", "0.64981574", "0.6486687", "0.64719665", "0.64713836", "0.64535606", "0.644286", "0.6431839", "0.6427153", "0.6426867", "0.6411721", "0.6398881", "0.638759", "0.6377684", "0.6376346", "0.63713914", "0.63712424", "0.6370402", "0.6360228", "0.63576645", "0.6354491", "0.63467306", "0.63362664", "0.6328389", "0.63268065", "0.6326702", "0.6322879", "0.63228047", "0.63202965", "0.6317526" ]
0.7224059
15
/ Returns an array containing the elements of this list. The runtime type of the returned array is that of the specified array.
@SuppressWarnings("unchecked") public E[] toArray(E[] arr) { if(arr.length < size) { arr = (E[]) Array.newInstance(arr.getClass().getComponentType(), size); } Node<E> cur = head; for(int i = 0; i < size; i++) { arr[i] = cur.item; cur = cur.next; } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tpublic T[] asArray() {\n\t\t// have to use explicit cast because we cannot use the alternative signature of toArray(T[]), as you cannot instantiate an array of a\n\t\t// type parameter (not even an empty array)\n\t\treturn (T[]) this.itemList.toArray();\n\t}", "protected Object[] getArray(){\r\n\t \treturn array;\r\n\t }", "@Override\n public Object[] toArray() {\n Object[] result = new Object[size];\n int i = 0;\n for (E e : this) {\n result[i++] = e;\n }\n return result;\n }", "public Object getArray() {\n\t\treturn array;\n\t}", "@Override\n public T[] toArray() {\n T[] result = (T[])new Object[numItems];\n for(int i = 0; i < numItems; i++)\n result[i] = arr[i];\n return result;\n }", "private Object[] elements() {\n return elements.toArray();\n }", "@Override\n\tpublic Object[] toArray() {\n\t\tObject[] result = copyArray(elements, size);\n\n\t\treturn result;\n\t}", "@Override\n public T[] toArray() {\n //create the return array\n T[] result = (T[])new Object[this.getSize()];\n //make a count variable to move through the array and a reference\n //to the first node\n int index = 0;\n Node n = first;\n //copy the node data to the array\n while(n != null){\n result[index++] = n.value;\n n = n.next;\n }\n return result;\n }", "E[] toArray();", "@Override\n public T[] toArray() {\n return (T[]) array;\n }", "public Object[] toArray()\n\t{\n\t\treturn list.toArray();\n\t}", "public Object[] toArray() {\n\t\tObject[] arg = new Object[size];\r\n\t\t\r\n\t\tNode<E> current = head;\r\n\t\tint i = 0;\r\n\t\twhile(current != null) {\r\n\t\t\targ[i] = current.getData();\r\n\t\t\ti++;\r\n\t\t\tcurrent = current.getNext();;\r\n\t\t}\r\n\t\treturn arg;\r\n\t}", "public COSArray toList() \n {\n return array;\n }", "public default T[] toArray() {\n Object[] array = new Object[size()];\n int i = 0;\n for (T t : this) {\n array[i++] = t;\n }\n return (T[]) array;\n }", "public Object[] toArray() {\n Object[] arr = new Object[size];\n for(int i = 0; i < this.size; i++) {\n arr[i] = this.get(i);\n }\n return arr;\n }", "public Object[] toArray(){\n\n \tObject[] o = new Object[list.size()];\n\n o = list.toArray();\n\n \treturn o;\n\n }", "public Object[] getArray() {\n compress();\n return O;\n }", "@Override\n public T[] toArray() {\n return this.copyArray(this.data, this.size);\n }", "public Object[] toArray() {\n\t\tObject[] ret = new Object[currentSize];\n\t\tfor (int i = 0; i < currentSize; i++)\n\t\t\tret[i] = array[i];\n\t\treturn ret;\n\t}", "@Override\n public Object[] toArray() {\n Object[] result = new Object[currentSize];\n System.arraycopy(container, 0, result, 0, currentSize);\n return result;\n }", "ArrayMixedObject getArray() {\n\t\treturn array;\n\t}", "public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "public E[] values(){\n\t\tE[] output = (E[]) new Object[howMany];\n\t\tint j = 0;\n\t\tfor (int i = 0; i < elem.length; i++)\n\t\t\tif (elem[i] != null){\n\t\t\t\toutput[j] = elem[i];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\treturn output;\n\t}", "public Object[] toArray() {\n Object[] tmp = new Object[this.container.length];\n System.arraycopy(this.container, 0, tmp, 0, tmp.length);\n return tmp;\n }", "public E[] getArray() {\n return this.array;\n }", "Object[] toArray();", "Object[] toArray();", "Object[] toArray();", "public AnyType getNativeArrayType() {\n return nativeArrayType;\n }", "public Object[] getElements() {\r\n\t\treturn data.toArray();\r\n\t}", "public Expression getArray()\n {\n return getExpression();\n }", "public Object[] toArray() {\n\t\treturn null;\n\t}", "public final Object[] getArray() {\n return array;\n }", "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "public T[] toArray() {\n return null;\n }", "public Object[] toArray() {\r\n Object[] arr = new Object[size];\r\n Node<T> current = head.next();\r\n for (int i = 0; i < size; i++) {\r\n arr[i] = current.getData();\r\n current = current.next();\r\n }\r\n return arr;\r\n }", "@Override\n public Object[] toArray() {\n Object[] tempArray = new Object[size];\n Node n = this.head;\n int i = 0;\n while (i<size) {\n tempArray[i] = n.getData();\n i++;\n n = n.next;\n }\n return tempArray;\n }", "public Object[] toArray() {\n Object[] myarray = new Object[size];\n DoublyLinkedListNode<T> pointer = head;\n for (int i = 0; i < size; i++) {\n myarray[i] = pointer.getData();\n pointer = pointer.getNext();\n }\n return myarray;\n\n\n }", "@Override\n\tpublic Object[] toArray() {\n\t\tif (isEmpty()) {\n\t return null;\n\t }\n\n\t\tObject[] data = new Object[size()];\n\n\t ListNode tmp = head;\n\t for (int i = 0; i < size(); i++) {\n\t data[i] = tmp.datum;\n\t tmp = tmp.next;\n\t }\n\n\t return data;\t\t\n\t}", "public Object[] toArray() {\n\t\tint k;\n\t\tNode p;\n\n\t\tObject[] retArray = new Object[mSize];\n\t\tfor (k = 0, p = mHead.next; k < mSize; k++, p = p.next)\n\t\t\tretArray[k] = p.data;\n\t\treturn retArray;\n\t}", "@Override\n\tpublic Object[] toArray() {\n\t\tListNode<L> newHead=first;\n\t\tObject[] array=new Object[size];\n\t\tfor(int i =0;i<size;i++) {\n\t\t\tarray[i]=newHead.storage;\n\t\t\tnewHead=newHead.next;\n\t\t}\n\t\treturn array;\n\t}", "public Polynomial[] getAsArray() {\n Polynomial[] list = new Polynomial[collection.size()];\n\n for (int i = 0; i < collection.size(); i++) {\n list[i] = collection.get(i);\n }\n return list;\n }", "public Object[] toRawArray();", "Array createArray();", "public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }", "@Override\r\n\tpublic T[] toArray() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tT[] result = (T[])new Object[topIndex + 1];\r\n\t\tfor(int index = 0; index < result.length; index ++) {\r\n\t\t\tresult[index] = stack[index];\r\n\t\t}\r\n\treturn result;\r\n\t}", "@Override\r\n\tpublic Object[] getElements(Object inputElement) {\n\t\treturn ((List) inputElement).toArray();\r\n\t}", "public Object[] toArray() {\n Object[] arr = new Object[size];\n Node<E> cur = head;\n for(int i = 0; i < size; i++) {\n arr[i] = cur.item;\n cur = cur.next;\n }\n return arr;\n }", "@Override\n public int[] toArray() {\n int[] result = new int[size];\n Entry tmp = first;\n for (int i = 0; i < size; i++) {\n result[i] = tmp.value;\n tmp = tmp.next;\n }\n return result;\n }", "public Object[] getElements() {\r\n\t\treturn elements.clone();\r\n\t}", "Object[] getChildArray();", "T[] getObjects() {\n\t\treturn this.array;\n\t}", "public ClassType[] getArray(){\n\t\t\tClassType[] temp = new ClassType[count];\n\t\t\tfor (int i = 0; i < count; i++){\n\t\t\t\ttemp[i] = new ClassType(anArray[i]);\n\t\t\t}\n\t\t\treturn temp;\n\t\t}", "public float[] toArray() {\r\n float[] result = new float[size];\r\n System.arraycopy(elementData, 0, result, 0, size);\r\n return result;\r\n }", "default Object[] toArray() {\n return toArray(new Object[0]);\n }", "@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn null;\n\t\t}", "T[] toArray(T[] a);", "public WebElement[] toArray() {\n\t\treturn ToArrayFunction.toArray(this, elements);\n\t}", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "public Object[] toArray() {\n\n return toArray(new Object[size()]);\n }", "@Nonnull\n public AnyType getArrayType() {\n return arrayType;\n }", "Exp getArrayExp();", "@Override\n @SuppressWarnings(\"rawtypes\")\n public Object[] getElements(Object inputElement) {\n if (inputElement instanceof Object[]) {\n return (Object[])inputElement;\n }\n if (inputElement instanceof Collection) {\n return ((Collection)inputElement).toArray();\n }\n return new Object[0];\n }", "public double[] getArray(){\n\t\t\treturn anArray; //FAIL\n\t\t}", "ArrayValue createArrayValue();", "public ArrayList<T> returnAsArray(ArrayList<T> arr) {\n\t\tif (arr == null) {\n\t\t\tarr = new ArrayList<T>();\n\t\t}\n\t\tif (this == null) {\n\t\t\treturn arr;\n\t\t}\n\t\tif (this.valCount == 0) {\n\t\t\treturn arr;\n\t\t}\n\t\tfor (int i = 0; i < childCount; ++i) {\n\t\t\tthis.children[i].returnAsArray(arr);\n\t\t\tif (i < childCount - 1) {\n\t\t\t\tarr.add(values[i]);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "public Object getValueArray(int offset, int length);", "@Override\r\n\t\tpublic Object[] getElements(Object inputElement) {\n\t\t\ttry{\r\n\t\t\t\treturn ((List)inputElement).toArray();\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}", "public String[] getArrayValue();", "public <T> T[] toArray(T[] arr);", "public Object[] toArray() {\n return Arrays.copyOf(this.values, this.index);\n }", "public java.lang.Object[] getArbolesAsArray()\r\n {\r\n return (arboles == null) ? null : arboles.toArray();\r\n }", "public Object[] toArray() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public <T> T[] toArray(T[] a) {\n int k = 0;\n Node<E> p;\n for (p = first(); p != null && k < a.length; p = succ(p)) {\n E item = p.item;\n if (item != null)\n a[k++] = (T)item;\n }\n if (p == null) {\n if (k < a.length)\n a[k] = null;\n return a;\n }\n\n // If won't fit, use ArrayList version\n ArrayList<E> al = new ArrayList<E>();\n for (Node<E> q = first(); q != null; q = succ(q)) {\n E item = q.item;\n if (item != null)\n al.add(item);\n }\n return al.toArray(a);\n }", "@Override\n public Object[] toArray() {\n return Arrays.copyOf(data, size);\n }", "public float[] array() {\r\n\t\treturn new float[] { x, y, z };\r\n\t}", "public static Object createArray(TypeList type) {\n\t\tList<Integer> listDimensions = type.getDimensions();\n\t\tint[] dimensions = new int[listDimensions.size()];\n\t\tfor (int i = 0; i < dimensions.length; i++) {\n\t\t\tdimensions[i] = listDimensions.get(i);\n\t\t}\n\n\t\tType eltType = type.getInnermostType();\n\t\treturn createArray(eltType, dimensions);\n\t}", "@Override\n\tpublic Object[] toArray() {\n\t\treturn null;\n\t}", "private TaskListItem[] getListArray() {\n return allLists.toArray(new TaskListItem[allLists.size()]);\n }", "public void testGetArray() {\n System.out.println(\"getArray\"); // NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n PropertyValue arrayPropertyValue = PropertyValue.createValue(primitveDescritor, type, DesignComponentTest.PROPERTY1_VALUE_STRING); // NOI18N\n List<PropertyValue> array = new ArrayList();\n \n array.add(arrayPropertyValue);\n \n PropertyValue result = PropertyValue.createArray(type,array);\n \n type = type.getArrayType();\n assertEquals(type,result.getType());\n assertNotNull(result.getArray());\n }", "public String[] getArray(){\n return (String[])this.items.toArray();\n }", "default <A> A getItemsAs( Class<A> arrayTypeClass ) {\n return DataConverter.get().convert( getRawItems(), arrayTypeClass );\n }", "JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);", "public Object[] toArray(){\n\t\t// allocate the array an an iterator\n\t\t\t\tObject[] arr = new Object[hashTableSize];\n\t\t\t\tIterator<T> iter = iterator();\n\t\t\t\tint i = 0;\n\n\t\t\t\t// iterate the hash table and assign its\n\t\t\t\t// values into the array\n\t\t\t\twhile (iter.hasNext()) {\n\t\t\t\t\tarr[i] = iter.next();\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\treturn arr;\n\t}", "public double[] getArray(){\n\t\t\tdouble[] temp = new double[count];\n\t\t\tfor (int i = 0; i < count; i++){\n\t\t\t\ttemp[i] = anArray[i];\n\t\t\t}\n\t\t\treturn temp;\n\t\t}", "public DynamicArray(){\n\t \n\t array = (E[]) new Object[dim];\n }", "public Object[] getElements(Object element) {\n\t\t\treturn ((ArrayList) element).toArray();\r\n\t\t}", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "public ObjectArrayTemplateElement()\n {\n super(Object[].class, obj -> {\n if (obj instanceof Collection)\n {\n return ((Collection) obj).toArray();\n }\n throw new UnsupportedOperationException(\"Can't convert object (\" + obj.getClass().getName() + \") to Object[]: \" + obj);\n }, Collection.class::isAssignableFrom);\n }", "public <T> T[] toArray(T[] userArray) {\n\t\tint k;\n\t\tNode p;\n\t\tObject[] retArray;\n\n\t\tif (mSize > userArray.length)\n\t\t\tretArray = new Object[mSize];\n\t\telse\n\t\t\tretArray = userArray;\n\n\t\tfor (k = 0, p = mHead.next; k < mSize; k++, p = p.next)\n\t\t\tretArray[k] = p.data;\n\n\t\tif (mSize < userArray.length)\n\t\t\tretArray[mSize] = null;\n\n\t\treturn (T[]) userArray;\n\t}", "public Item[] toItemArray()\r\n {\r\n Item[] a = new Item[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (Item) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "T[] getValues();", "public int[] getInnerArray() {\n\t\treturn data;\n\t}", "public abstract ArrayList<Cell> getSelfArray();", "public JType elementType() {\n throw new IllegalArgumentException(\"Not an array type\");\n }", "@Override\r\n\tpublic Object[] toArray() {\n\t\treturn set.toArray();\r\n\t}", "public double[] toArray() {\n\t\treturn acc.toArray();\n\t}", "private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}", "public E[] toArray() {\n return (E[]) Arrays.copyOfRange(queue, startPos, queue.length);\n }", "public Object[] backingArray()\n {\n return array;\n }", "public int[] toArray() {\n return Arrays.copyOf(buffer, elementsCount);\n }" ]
[ "0.7300199", "0.7263643", "0.72604895", "0.72452843", "0.7148399", "0.713878", "0.7124205", "0.7121683", "0.701629", "0.6978272", "0.6974921", "0.69629437", "0.6951374", "0.6949702", "0.6943273", "0.6911813", "0.68539554", "0.68327856", "0.6802179", "0.6801677", "0.6799603", "0.6781573", "0.6780212", "0.67719", "0.67645097", "0.67373973", "0.67373973", "0.67373973", "0.6720419", "0.67070323", "0.67063963", "0.6701519", "0.66935694", "0.6691612", "0.6668968", "0.66685957", "0.66676974", "0.6650716", "0.6640261", "0.66207415", "0.6608186", "0.6606793", "0.6589223", "0.6586855", "0.65861714", "0.6583804", "0.65834516", "0.65539485", "0.65526044", "0.6540486", "0.6536579", "0.6535531", "0.65311384", "0.6519435", "0.65188336", "0.6515861", "0.65044403", "0.64964235", "0.64717466", "0.6431655", "0.642811", "0.63986593", "0.63787943", "0.63776916", "0.63715583", "0.63688606", "0.63464093", "0.6338533", "0.63374287", "0.6331955", "0.633017", "0.63241106", "0.6309793", "0.6305777", "0.63037634", "0.6302989", "0.63014436", "0.6295039", "0.6287288", "0.625028", "0.6247166", "0.62463224", "0.62393165", "0.6236303", "0.6227704", "0.6213851", "0.62098575", "0.62095714", "0.62066716", "0.6203522", "0.61947376", "0.6192825", "0.6188976", "0.6179723", "0.6174093", "0.6165787", "0.61567575", "0.6139316", "0.6135068", "0.6131756", "0.6128376" ]
0.0
-1
/ Returns a shallow copy of the list.
public SinglyLinkedList<E> copy() { SinglyLinkedList<E> copy = new SinglyLinkedList<>(); for(Node<E> cur = head; cur != null; cur = cur.next) { copy.addLast(cur.item); } return copy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object[] deepCopy()\n {\n Object[] newList = new Object[size];\n\n int newListPosition = 0;\n for (int i =0; i < size; i++)\n {\n if (list[i] != null)\n {\n newList[newListPosition++] = list[i];\n }\n }\n\n return newList;\n }", "public ArrayList<E> clone() {\n ArrayList<E> temp = new ArrayList<E>();\n temp.size = this.size;\n temp.capacity = this.capacity;\n temp.list = Arrays.copyOf(this.list, this.list.length);\n return temp;\n }", "public List<E> clone();", "public MultiList<R,S> copy(){\n MultiList<R,S> retVal = new MultiList<R,S>();\n retVal.putAll_forCopy(this);\n return retVal;\n }", "ArrayList deepCopyShapeList(List aShapeList){\n ArrayList newList = new ArrayList();\r\n\r\n if (aShapeList.size() > 0) {\r\n Iterator iter = aShapeList.iterator();\r\n\r\n while (iter.hasNext())\r\n newList.add(((TShape)iter.next()).copy());\r\n }\r\n return\r\n newList;\r\n}", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "public List<T> getCopyOfUnfilteredItemList(){\n synchronized (listsLock){\n if (originalList != null){\n return new ArrayList<T>(originalList);\n } else {\n // if original list is null filtered list is unfiltered\n return new ArrayList<T>(filteredList);\n }\n }\n }", "@Override\n\tpublic SecuredRDFList copy();", "public Object clone()\n {\n ElementInsertionList clone = new ElementInsertionList();\n\n for (int i = 0; i < list.size(); i++)\n {\n clone.addElementInsertionMap((ElementInsertionMap)list.elementAt(i));\n }\n\n return clone;\n }", "public static void copy(java.util.List arg0, java.util.List arg1)\n { return; }", "@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}", "Prototype makeCopy();", "public static <T> List<T> clone(List<T> a) {\n\t\tList<T> newList = new ArrayList<T>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tnewList.add(elt);\n\t\t\n\t\treturn newList;\n\t}", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "private ArrayList<Concert> cloneConcertList(){\n ArrayList<Concert> tempConcertList = new ArrayList<Concert>();\n tempConcertList.addAll(concertList);\n return tempConcertList;\n }", "public static <T> List<T> clone(List<T> list, PropertyFilter propertyFilter) {\n\t\tList<T> clonedList = new ArrayList<T>(list.size());\n\t\tcloneCollection(list, clonedList, propertyFilter);\n\t\treturn clonedList;\n\t}", "public ArrayList<Variable> deepCopy (ArrayList<Variable> forCopy){\n ArrayList<Variable> copy = new ArrayList<>();\n for (Variable var: forCopy){ // for all variables in the arrayList clone\n Variable newVar = var.clone();\n copy.add(newVar);\n }\n return copy;\n }", "@Override\n\tpublic NamedList<T> clone() {\n\t\tArrayList<Object> newList = new ArrayList<Object>(nvPairs.size());\n\t\tnewList.addAll(nvPairs);\n\t\treturn new NamedList<T>(newList);\n\t}", "public List getList(List oldList) {\n List newList = new ArrayList();\n Collections.copy(newList, oldList);\n return newList;\n }", "@Override\n public synchronized WebBackForwardList clone() {\n return new WebBackForwardListImpl(this);\n }", "public SetSet deepCopy(){\n\t\tSetSet copy = new SetSet();\n\t\tfor(int i=0;i<size();i++){\n\t\t\tcopy.add(get(i).deepCopy());\n\t\t}\n\t\treturn copy;\n\t}", "@Override\n public IntArrayList clone() {\n try {\n /* */\n final IntArrayList cloned = (IntArrayList) super.clone();\n cloned.buffer = buffer.clone();\n return cloned;\n } catch (CloneNotSupportedException e) {\n throw new RuntimeException(e);\n }\n }", "public Object clone() {\n return this.copy();\n }", "@Override\n\tpublic Object clone() {\n\t\tRemoteInfoList list = new RemoteInfoList();\n\t\tfor (RemoteInfo rInfo : rInfoList) {\n\t\t\tlist.add((RemoteInfo)rInfo.clone());\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public static ArrayList<ConfigurableItemStack> copyList(List<ConfigurableItemStack> list) {\n ArrayList<ConfigurableItemStack> copy = new ArrayList<>(list.size());\n for(ConfigurableItemStack stack : list) {\n copy.add(new ConfigurableItemStack(stack));\n }\n return copy;\n }", "@Override\r\n public ListADT<T> toMutable() {\r\n return new ListADTImpl<T>(this.head);\r\n }", "public LinkedList<AnyType> clone() {\n LinkedList<AnyType> clone = new LinkedList<AnyType>();\n LinkedListIterator<AnyType> itr = this.first();\n LinkedListIterator<AnyType> cloneitr = clone.zeroth();\n while (itr.current != null) {\n clone.insert(itr.current.element, cloneitr);\n itr.advance();\n cloneitr.advance();\n }\n return clone;\n }", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tPrototype prototype=null;\n\t\t\n\t\tprototype=(Prototype)super.clone();\n//\t\tprototype.lists=(ArrayList<String>) this.lists.clone();\n\t\n\t\t\n\t\treturn prototype;\n\t}", "public static ArrayList<String> copy(ArrayList<String> original) {\n\t\tArrayList<String> copy = new ArrayList<String>();\r\n\t\tfor (int i = 0; i < original.size(); i++) {\r\n\t\t\tcopy.add(original.get(i));\r\n\t\t}\r\n\t\treturn copy;\r\n\t}", "public List<Person> copyPersons() {\n\t\tList<Person> copyPersons = new ArrayList<Person>(personsOrig.size());\t// NOTE this is still an empty List with initial capacity of personsOrig size\r\n\t\t// unfortunately there isn't a clone or factory method in Collections. So have to create \"target\" collection with some garbage\r\n\t\tPerson p;\r\n\t\tfor (int i = 0; i < personsOrig.size(); i++) {\r\n\t\t\tp = new Person(\"\", 0);\r\n\t\t\tcopyPersons.add(p);\r\n\t\t}\r\n\t\tCollections.copy(copyPersons, personsOrig);\r\n\t\tSystem.out.println(\"persons copy:\" + copyPersons);\r\n\r\n\t\tCollections.sort(copyPersons);\r\n\t\tSystem.out.println(\"Sorted copy:\" + copyPersons);\r\n\r\n\t\tSystem.out.println(\"Original persons:\" + personsOrig);\r\n\t\treturn copyPersons;\r\n\t}", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Vector clone()\r\n {\r\n Vector<O> v = new Vector<O>();\r\n \r\n VectorItem<O> vi = first;\r\n while (vi != null)\r\n {\r\n v.pushBack (vi.getObject());\r\n vi = vi.getNext();\r\n }\r\n \r\n return v;\r\n }", "public Object clone() throws CloneNotSupportedException\n {\n // shallow copy\n SongSublist newObject = (SongSublist)super.clone();\n // deep copy\n newObject.subs = (ArrayList<SongEntry>)subs.clone();\n\n return newObject;\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "@Override\r\n public ListADT<T> toImmutable() {\r\n return new ImmutableListADTImpl<T>(new ListADTImpl<T>(this.head));\r\n }", "public static void restoreList() {\n\n if (copyList.isEmpty())\n return;\n\n\n getList().clear();\n\n for (Map<String, ?> item : copyList) {\n getList().add(item);\n }\n\n copyList.clear();\n //Log.d(\"test\", \"After restore: Champlist size \" + getSize() + \" copylist size \" + copyList.size());\n\n }", "public Results copy()\n {\n Results copy = new Results();\n for(Object object : results) {\n copy.add( object );\n }\n return copy;\n }", "public static <T> List<T> copyToUnmodifiableList(List<T> list)\n {\n if (list != null)\n {\n List<T> listCopy = new ArrayList(list);\n return Collections.unmodifiableList(listCopy);\n }\n else\n {\n return Collections.emptyList();\n }\n }", "private List<positionTicTacToe> deepCopyATicTacToeBoard(List<positionTicTacToe> board)\n\t{\n\t\tList<positionTicTacToe> copiedBoard = new ArrayList<positionTicTacToe>();\n\t\tfor(int i=0;i<board.size();i++)\n\t\t{\n\t\t\tcopiedBoard.add(new positionTicTacToe(board.get(i).x,board.get(i).y,board.get(i).z,board.get(i).state));\n\t\t}\n\t\treturn copiedBoard;\n\t}", "public d clone() {\n ArrayList arrayList = this.e;\n int size = this.e.size();\n c[] cVarArr = new c[size];\n for (int i = 0; i < size; i++) {\n cVarArr[i] = ((c) arrayList.get(i)).clone();\n }\n return new d(cVarArr);\n }", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "public java.util.ArrayList getClones();", "public static ArrayList<ItemStack> cloneList(ArrayList<ItemStack> list) {\r\n\t\tArrayList<ItemStack> cloned = new ArrayList<ItemStack>(list.size());\r\n\t\tfor(ItemStack is : list) {\r\n\t\t\tcloned.add(new ItemStack(is.getItem(), is.getCount()));\r\n\t\t}\r\n\t\treturn cloned;\r\n\t}", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "Object clone();", "Object clone();", "@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\tCustomerList mylist = (CustomerList) super.clone();\n\t\ttry {\n\t\t\n\t\t\tmylist.m_prodList = (HashMap<Product,Integer>) m_prodList.clone();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Clone problem\");\n\t\t}\n\t\t\t\n\t\treturn mylist;\n\t}", "public Object clone()\n {\n IObserverList list = new IObserverList();\n \n for ( int i = 0; i < observers.size(); i++ )\n list.observers.addElement( observers.elementAt(i) );\n\n return list; \n }", "@Test\n\tpublic void testCopy2() {\n\n\t\tint[] arr = { 1, 2, 3, 7, 8 }; // this list\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet copied = listObj2.copy();\n\t\tcopied.add(-1);\n\t\tString expectedObj2 = \"1, 2, 3, 7, 8\";\n\t\tString expectedCopied = \"-1, 1, 2, 3, 7, 8\";\n\t\tint expectedObj2Size = 5;\n\t\tint expectedCopiedSize = 6;\n\n\t\tassertEquals(expectedObj2Size, listObj2.getSize());\n\t\tassertEquals(expectedObj2, listObj2.toString());\n\n\t\tassertEquals(expectedCopiedSize, copied.getSize());\n\t\tassertEquals(expectedCopied, copied.toString());\n\n\t}", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public LinkedList clone(){\n\t\tif(firstNode == null) return new LinkedList(null);\n\t\treturn new LinkedList(firstNode.clone());\n\t}", "@Override\n public LocalStore<V> copy() {\n return this;\n }", "public ArrayList<Book> getBookList()\r\n {\r\n ArrayList<Book> bookCopy = new ArrayList<Book>();\r\n //Add code here to copy the bookList ArrayList elements into the local variable bookCopy and return bookCopy\r\n //Hint: You will use the 2-arg Book constructor and the getters or you can add a copy constructor to the Book\r\n //Class\r\n for(Book book: bookList){\r\n Book bk = new Book(book.getTitle(), book.getPrice());\r\n bookCopy.add(bk);\r\n }\r\n return bookCopy;\r\n }", "public static <T> List<T> immutableList(T... elements){\n return Collections.unmodifiableList(Arrays.asList(elements.clone()));\n }", "public ConfabulatorObject getCopy() {\n\t\tConfabulatorObject copy = new ConfabulatorObject(getMessenger());\n\t\tlockMe(this);\n\t\tint maxD = maxLinkDistance;\n\t\tint maxC = maxLinkCount;\n\t\tList<Link> linksCopy = new ArrayList<Link>();\n\t\tfor (Link lnk: links) {\n\t\t\tlinksCopy.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\tcopy.initialize(maxD,maxC,linksCopy);\n\t\treturn copy;\n\t}", "public static <T> List<T> unmodifiableList(List<T> original) {\n ArrayList<T> list = new ArrayList<>(original.size());\n original.forEach(list::add);\n return Collections.unmodifiableList(list);\n }", "public Collection<Card> getCopyOfCardsList() {\n\t\treturn new ArrayList<>(cards);\n\t}", "public Object clone() {\n\t\tSubstrateNetwork s = new SubstrateNetwork(this.listNode, this.listLink);\n\t\treturn s;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public synchronized List<TreeNode> getChildrenCopy ()\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"getChildrenCopy of \" + this);\r\n }\r\n\r\n return new ArrayList(children);\r\n }", "public void cloneList(){\n Node insert = Head;\n while(insert != null){\n Node temp = new Node(insert.data);\n temp.next = insert.next;\n insert.next = temp;\n insert = temp.next;\n }\n\n //Adjusting arbitrary pointers\n\n Node move = Head;\n while(move != null){\n move.next.arbt = move.arbt;\n move = move.next.next;\n }\n\n //cloning linked list by removing copied nodes from original list\n\n copyList = Head.next;\n move = Head.next;\n while(move.next != null){\n move.next = move.next.next;\n move = move.next;\n }\n }", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public DoubleLinkedList clone() {\n\n\t\tDoubleLinkedList l = new DoubleLinkedList();\n\t\tDLNode n = head;\n\t\twhile (n != null) {\n\t\t\tif (n.val != Integer.MIN_VALUE) {\n\t\t\t\tl.pushBack(n.val);\n\t\t\t} else {\n\t\t\t\tl.pushBackRecursive(n.list.clone());\n\t\t\t}\n\t\t\tn = n.next;\n\t\t}\n\t\tl.elements = this.elements;\n\n\t\treturn l;\n\n\t}", "public Position copy() {\n return new Position(values.clone());\n }", "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 }", "protected Shingle copy() {\n return new Shingle(this);\n }", "public List<GraphNode> copy(List<GraphNode> graph) {\n Map<GraphNode, GraphNode> map = new HashMap<>();\n List<GraphNode> res = new ArrayList<>();\n for(GraphNode node : graph) {\n subCopy(node, map, res);\n }\n return res;\n }", "public List<GraphNode> copy(List<GraphNode> graph) {\n Map<GraphNode, GraphNode> map = new HashMap<>();\n List<GraphNode> res = new ArrayList<>();\n for(GraphNode node : graph) {\n subCopy(node, map, res);\n }\n return res;\n }", "public Function clone();", "public Update cloneShallow() {\n return (Update)cloneShallowContent(new Update());\n }", "@SuppressWarnings(\"unchecked\")\n public ArrayList(ArrayList<E> lst) {\n list = (E[])new Object[lst.size()];\n capacity = lst.capacity;\n size = lst.size;\n for(int i = 0; i < size; i++) {\n list[i] = lst.list[i];\n }\n }", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "public Object clone() {\r\n//STUB BEGIN\r\n \t/*\r\n DoubleLinkedList clone = null;\r\n try { \r\n \tclone = (DoubleLinkedList) super.clone();\r\n } catch (CloneNotSupportedException e) { \r\n \tthrow new InternalError();\r\n }*/ //JBSE still does not implement Object.clone\r\n \tDoubleLinkedList clone = new DoubleLinkedList();\r\n//STUB END\r\n\r\n // Put clone into \"virgin\" state\r\n//INSTRUMENTATION BEGIN\r\n //clone.header = new Entry(null, null, null);\r\n clone.header = new Entry(null, null, null, clone);\r\n//INSTRUMENTATION END\r\n clone.header.next = clone.header.previous = clone.header;\r\n clone.size = 0;\r\n clone.modCount = 0;\r\n\r\n // Initialize clone with our elements\r\n for (Entry e = header.next; e != header; e = e.next)\r\n clone.add(e.element);\r\n\r\n return clone;\r\n }", "public T cloneDeep();", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static void main(String[] args) {\n\r\n\t\tLinkedList<String> ll = new LinkedList<String>();\r\n\t\tll.add(\"My\");\r\n\t\tll.add(\"name\");\r\n\t\tll.add(\"is\");\r\n\t\tll.add(\"Sumit\");\r\n\t\r\n\t\tSystem.out.println(\"fisrt List:\"+ll);\r\n\t\t\r\n\t\tLinkedList<String> ll_sec = new LinkedList<String>();\r\n\t\tll_sec = (LinkedList<String>) ll.clone();\r\n\t\tSystem.out.println(\"Second List After cloning:\"+ll_sec);\r\n\t}", "T copy();", "@Override\n public Object clone() {\n return super.clone();\n }", "public static AttributeList cloneAttributeList(AttributeList source) throws IOException, DicomException {\r\n AttributeList dest = new AttributeList();\r\n \r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n DicomOutputStream dicomOutputStream = new DicomOutputStream(byteArrayOutputStream, TransferSyntax.ExplicitVRLittleEndian, TransferSyntax.ExplicitVRLittleEndian);\r\n source.write(dicomOutputStream);\r\n \r\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());\r\n dest.read(new DicomInputStream(byteArrayInputStream));\r\n \r\n return dest;\r\n }", "public JsonMember copy() {\n return new JsonMember(name, value.copy());\n }", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "public static <T> List<T> m66049a(List<T> list) {\n return Collections.unmodifiableList(new ArrayList(list));\n }", "public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }", "Component deepClone();", "public Board deepCopy() {\n Board copy = new Board();\n for (int i = 0; i < DIMENSION; i++) {\n System.arraycopy(this.fields[i], 0, copy.fields[i], 0, DIMENSION);\n }\n return copy;\n }", "public EventStack<T> deepCopy() {\n final Stack<EventStackEntry<T>> copiedStack = new Stack<>();\n for (final EventStackEntry<T> iterEntry : eventStack) {\n copiedStack.push(iterEntry.deepCopy());\n }\n final EventStack<T> copiedOutput = new EventStack<>(firstEventTime);\n copiedOutput.setStack(copiedStack);\n return copiedOutput;\n }", "public Array<T> compactClone()\n {\n Array<T> out = Array.fromUnsafe(new Object[next], next);\n System.arraycopy(array, 0, out.array, 0, next);\n return out;\n }", "public synchronized List<Item> getItems()\n\t{\n\t\t/**\n\t\t * TODO Q: Deep copy override clone in Item?\n\t\t * pre-condition: List not null;\n\t\t * Invariant:size list of active items cannot more than server capacity\n\t\t * post-condition:return the copy of items in the list.\n\t\t * Exception: list size more than server capacity.\n\t\t */\n\t\t// TODO: IMPLEMENT CODE HERE\n\t\t// Some reminders:\n\t\t// Don't forget that whatever you return is now outside of your control.\n\t\treturn new ArrayList<>(itemsUpForBidding);\n\t}", "private List<Flight> copyFlights(List<Flight> flights) {\n\t\tList<Flight> newList = new LinkedList<>();\n\t\tnewList.addAll(flights);\n\t\treturn newList;\n\t}", "@Test\r\n public void testImmutableObservableList() {\r\n ObservableList data = createObservableList(true);\r\n ImmutableObservableList immutable = new ImmutableObservableList<>(data);\r\n ListChangeReport report = new ListChangeReport(immutable);\r\n immutable.setBackingList(null);\r\n assertEquals(1, report.getEventCount());\r\n assertTrue(\"expected single removed\", wasSingleRemoved(report.getLastChange()));\r\n report.clear();\r\n immutable.setBackingList(data);\r\n assertEquals(1, report.getEventCount());\r\n assertTrue(\"expected singe added\", wasSingleAdded(report.getLastChange()));\r\n report.clear();\r\n ObservableList other = FXCollections.observableArrayList(\"onxe\", \"tewo\", \"other\");\r\n immutable.setBackingList(other);\r\n assertEquals(1, report.getEventCount());\r\n// report.prettyPrint();\r\n assertTrue(\"expected single replaced\", wasSingleReplaced(report.getLastChange()));\r\n }", "public Sudoku copy(){\n\t\treturn (Sudoku) this.clone();\n\t}", "public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }", "@SuppressWarnings(\"unchecked\" )\n public ConstList<T> makeConst() {\n if (clist == null)\n clist = (list.isEmpty() ? emptylist : new ConstList<T>(list));\n return clist;\n }", "private Instances deepCopy(Instances data) {\n Instances newInst = new Instances(data);\n\n newInst.clear();\n\n for (int i = 0; i < data.size(); i++) {\n Instance ni = new DenseInstance(data.numAttributes());\n for (int j = 0; j < data.numAttributes(); j++) {\n ni.setValue(newInst.attribute(j), data.instance(i).value(data.attribute(j)));\n }\n newInst.add(ni);\n }\n\n return newInst;\n }" ]
[ "0.78482074", "0.7766624", "0.7670136", "0.74422204", "0.7431053", "0.741632", "0.73672736", "0.71250373", "0.7036884", "0.7001357", "0.698662", "0.6945975", "0.6940777", "0.6925868", "0.69164485", "0.6904274", "0.68616927", "0.6779105", "0.67640525", "0.6679823", "0.66739976", "0.6658453", "0.66416144", "0.6638508", "0.6609423", "0.66043067", "0.6597336", "0.65919846", "0.6588597", "0.6579617", "0.6542815", "0.65362394", "0.6526138", "0.65218866", "0.6519759", "0.64690554", "0.64481217", "0.6432548", "0.64106846", "0.6378093", "0.6370726", "0.6358952", "0.635645", "0.6350268", "0.6350268", "0.6350268", "0.6350268", "0.6343463", "0.6343463", "0.6324427", "0.63124037", "0.6286111", "0.6270249", "0.626311", "0.62477195", "0.6218789", "0.6210007", "0.6202423", "0.61987543", "0.61508125", "0.6146696", "0.6130213", "0.61246294", "0.60955346", "0.6095039", "0.60934156", "0.60903174", "0.6074985", "0.60717434", "0.60717434", "0.6070661", "0.6069881", "0.60641384", "0.6060037", "0.6045928", "0.6042858", "0.60419047", "0.6037822", "0.60351706", "0.60328805", "0.6020191", "0.6015141", "0.60092556", "0.6005967", "0.59975576", "0.5982138", "0.5974589", "0.5970202", "0.5959319", "0.59581685", "0.5955163", "0.59530205", "0.5944506", "0.59309644", "0.5927898", "0.5923707", "0.59235466", "0.59112823", "0.59052896", "0.5904511" ]
0.6599602
26
Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int length = Integer.parseInt(br.readLine()); // 0층부터 존재하고, 호수는 15까지 존재한다. int[][] room = new int[15][15]; for (int h = 1; h <= 14; h++) room[0][h] = h; // 0층에 대한 작성은 완료. for (int f = 1; f <= 14; f++) { room[f][1] = 1; for (int h = 2; h <= 14; h++) room[f][h] = room[f][h-1] + room[f-1][h]; } for (int i = 1; i <= length; i++) { int f = Integer.parseInt(br.readLine()); int h = Integer.parseInt(br.readLine()); System.out.println(room[f][h]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t}", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t}", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public static void main(String[] args) \n {\n Scanner sc = new Scanner(System.in); \n \n // String input\n System.out.print(\"What's your name? \"); \n String name = sc.nextLine(); \n \n // Print the values to check if input was correctly obtained. \n System.out.println(\"Name: \" + name); \n\n // Close the Scanner\n sc.close();\n }", "public Game() {\n\t\tsc = new Scanner(System.in);\n\t}", "public Menu() {\n scanner = new Scanner(System.in);\n }", "public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}", "public static void main(String[] args) {\nScanner sc= new Scanner(System.in);\nString name=sc.nextLine();\n\t\tSystem.out.println(\"hello\\n\"+name);\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // String input\n String first = sc.nextLine();\n System.out.println(first);\n\n }", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "String consoleInput();", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public InputReader() {\n reader = new Scanner(System.in);\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "@Test\n\tpublic void one()\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"enter the value of a\");\n\t\tint a = sc.nextInt();\n\t\tSystem.out.println(\"value of a is: \" +a);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tInputStream input = System.in;\n\t\tScanner scanner = new Scanner(input);\n\t\t// nextLine()을 실행하기 전에 \n\t\t// 무엇을 해야할지 알려주는 메시지를 먼저 출력 하라.\n\t\t// 이를 'prompt(프롬프트)' 라고 한다\n\t\tSystem.out.println(\"문자열을 입력후 Enter....\");\n\t\tString strInput = scanner.nextLine();\n\t\tSystem.out.println(strInput);\n\n\t}", "private ConsoleScanner() {}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextLine()){\n\t\t\tString str=sc.nextLine();\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n String str=sc.next();\n String str1=sc.next();\n String str2=sc.next();\n String str3=sc.next();\n System.out.println(str);\n System.out.println(str1);\n System.out.println(str2);\n System.out.println(str3);\n\n\n }", "public static void main(String[] args) {\n\t\tString s = \"We're learning about Scanner\";\n\t\tSystem.out.println(s);\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint m = sc.nextInt();\n//\t\tint n = sc.nextInt();\n//\t\tSystem.out.println(\"The Value of m is: \"+m);\n//\t\tSystem.out.println(\"The Value of n is: \"+n);\n//\t\tdouble d = sc.nextDouble();\n//\t\tString name = sc.next();//Gives us one Word\n//\t\tSystem.out.println(\"Name is: \" + name);\n\t\t\n//\t\tString fullName = sc.nextLine();\n//\t\tSystem.out.println(\"Full Name is: \" + fullName);\n\t\t\n\t\tString intInput = sc.nextLine();\n\t\tint n = Integer.parseInt(intInput);\n\t\tSystem.out.println(n);\n\t}", "public String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "private String getUserInput(Scanner sc) {\n\t\t\n\t\tif (sc == null) {\n\t\t\treturn null;\n\t\t}\n\n\t System.out.print(\"\\nctransfer > \");\n\t return sc.nextLine();\n\t}", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tkeyboard.close();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString hello = sc.nextLine();\n\t\tSystem.out.println(hello);\n\n\n\t}", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "public static void main (String[] args) throws java.lang.Exception\r\n\t{\n\t\tScanner sc=new Scanner(System.in);int f=0;\r\n\t\twhile(sc.hasNext()){\r\n\t\tint t=sc.nextInt();\r\n\t\t\r\n\t\tif(t==42) f=1;\r\n\t\tif(f==0) System.out.println(t);\r\n\t\t}\r\n\t}", "public static void main(String...args){\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString s = scan.nextLine();\r\n//\t\tString str = s.replaceAll(\"\\\\s\", \"\"); // removing white space from string\r\n//\t\tSystem.out.println(str);\r\n\t\tchar[] ch = s.toCharArray();\r\n\t\tSet<Character> charSet = new HashSet<>();\r\n\t\tfor(char c: ch){\r\n\t\t\t\r\n\t\t\tcharSet.add(c);\t\r\n\t\t}\r\n\t\t\r\n//\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor(Character character : charSet){\r\n//\t\t\tsb.append(character);\r\n\t\t\tSystem.out.print(character);\r\n\t\t}\r\n//\t\tSystem.out.println(sb.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString input = sc.nextLine();\n\t\t\tSystem.out.println(input);\n\t\t\tif(input == null || input==\"\") {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}", "public void takeUserInput() {\n\t\t\r\n\t}", "public alphabetize()\n {\n word = new Scanner(System.in);\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tprocess(s);\n\t}", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "public static void main(String args[])throws IOException\n\t{\n\tScanner obj=new Scanner(System.in);\n\n\t//Entering a string\n\tSystem.out.println(\"\\nEnter a string !\");\n\tString s=obj.nextLine();\n\tSystem.out.println(\"you have entered \"+ s);\n\n\t//entering a word\n\tSystem.out.println(\"\\nEnter a word !\");\n\tString w=obj.next();\n\n\t//entering an integer\n\tSystem.out.println(\"\\nEnter an integer !\");\n\tint n=obj.nextInt();\n\n\t//entering a float\n\tSystem.out.println(\"\\nEnter a floating point number !\");\n\tfloat f=obj.nextFloat();\n\n\t//Printing the inputs\n\tSystem.out.println(\"\\nThe inputs are .....\");\n\tSystem.out.println(\"\\nWord : \"+w+\"\\nInteger : \"+n+\"\\nFloat : \"+f);\n\n\n}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}", "public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString = s.nextLine();\n\t\tSystem.out.println(\"You entered a string \" + inputString );\n\t\tSystem.out.println();\n\t}", "private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\n\t\tprocess(s);\n\n\t}", "public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\r\n System.out.println(\"Introduzca un entero: \");\r\n int a = scn.nextInt();\r\n System.out.println(\"El numero introducido es el: \" + a);\r\n String b = scn.nextLine();\r\n System.out.println(b);\r\n String c = scn.next();\r\n System.out.println(c);\r\n }", "public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "public static void main(String[] args) {\n\t\tScanner inpt = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Hello Word!!!\");\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the value of n : \");\r\n\t\tint n = sc.nextInt();\r\n\t\tSystem.out.println(\"Entered input is : \"+ n);\r\n\t}", "String getInput();", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "public static void main(String[] args) {\n\t\t \n\t\tScanner scanner=new Scanner(System.in);\n\t\tUtility utility=new Utility();\n\t\n\t\tdouble c;\n\tSystem.out.println(\"enter the number\");\n\t\tc=scanner.nextInt();\n\n\t\tutility.newt(c);\n\t\tscanner.close();\n\t}", "public static void main(String[] args) {\n\r\n\t\tchar n;\r\n\t\tScanner teclado=new Scanner (System.in);\r\n\t\tSystem.out.println(\"Introduce un valor al caracter\");\r\n\t\t\r\n\t\tn = teclado.nextLine().charAt(0); // Asigno el valor leido por teclado a la variable n\r\n\t\tSystem.out.println(\"El valor de la variable es \" + n);\r\n\t\tteclado.close();\r\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t//String str = \"Hello World\";\n\t\tScanner scanner = new Scanner(System.in); //create object;\n\t\tSystem.out.println(\"Enter an String input\");\n\t\tString userInput = scanner.nextLine();//iput\n\t\tSystem.out.println(userInput.toString());\n\t\n\t\t\n\t\t//System.out.println(\"First string upper case is \" + userInput.toUpperCase().charAt(0) + \" from \" + userInput);\n\t\t\n\t}", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "void Input() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter name of the book::\");\n Bname = scanner.nextLine();\n System.out.println(\"Enter price of the book::\");\n price = scanner.nextDouble();\n }", "public static void main(String[] args) {\n\n\t\tInputStreamReader rd= new InputStreamReader(System.in);\n\t\ttry {\n\t\t\tSystem.out.println(\"enter a number\");\n\t\t\tint value=rd.read();\n\t\t\tSystem.out.println(\"you entered:-\"+(char)value);\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 Scanner sc = new Scanner(System.in);\r\n int count=1;\r\n String op;\r\n while(sc.hasNext()){\r\n\r\n for(int i=1;i<=count;i++){\r\n count++;\r\n op= sc.nextLine();\r\n StdOut.println(i+\" \"+op);\r\n }\r\n }\r\n }", "public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }", "OutputStream getStdin();", "String getUserInput();", "private static String scan(String text)\r\n\t{\r\n\t\tSystem.out.print(text);\r\n\t\treturn input.nextLine();\r\n\t}", "private static Scanner determineInputSource(String[] args) throws FileNotFoundException{\n if (args.length > 0) {\n //Reading from file\n return new Scanner(new File(args[0]));\n }\n else {\n //Reading from standard Input\n return new Scanner(System.in);\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t\n\t\tSystem.out.println(Character.getNumericValue('s'));\n\t\t//10 a\n\t\t//35 z\n\t\t//28 s\n\t\twhile(true) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif(s.equals(\"halt\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchar prev = ' ';\n\t\t\t\tfor(int i = 0; i<s.length(); i++) {\n\t\t\t\t\tchar c = s.charAt(i);\n\t\t\t\t\tint numericValue = Character.getNumericValue(c);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public String userCommand(){\n return scanner.nextLine();\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "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 main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tchar a=sc.next().charAt(0);\r\n\t\t\r\n\t\tif(Character.isLowerCase(a))\r\n\t\t{\r\n\t\t\tSystem.out.println(Character.toUpperCase(a));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(Character.toLowerCase(a));\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n Processor proc1 = new Processor();\n proc1.start();\n System.out.println(\"Hit any key to stop.\");\n Scanner scanner = new Scanner(System.in);\n scanner.nextLine();\n proc1.shutdown();\n }", "public static void userName() {\n System.out.println(\"Please enter your name: \");\n String name = sc.nextLine(); \n System.out.println(\"Hello, \" + name);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner s = new Scanner(System.in);\r\n\t String txt = s.next();\r\n\t //your code here\r\n\t System.out.println(txt.substring(0,2));\r\n\r\n\t}", "public static void main(String[]args){//inicio del main\r\n\r\n\tScanner in = new Scanner(System.in);// creacion del scanner\r\n\tSystem.out.println(\"Input Character\");//impresion del mensaje en consola\r\n\tchar C= in.next().charAt(0);//lectura del char\r\n\t\r\n\tSystem.out.println(\"The ASCII value of \" +C+ \" is : \"+(int) C);//casteo del caracter e impresion del resultado\r\n\t}", "public static void main(String[] args) {\n String s1=\"asd\";\r\n String s2=\"bilo\";\r\n //Scanner sc= new Scanner(System.in);\r\n\t\t if (s1==s2)\r\n\t\t\t System.out.println(\"text compared0\");\r\n\t\t else\r\n\t\t\t System.out.println(\"text not compared0\");\r\n\t\t\t \r\n\t}", "@Test\n public void testMain() {\n String simulatedUserInput = \"100AUD\" + System.getProperty(\"line.separator\")\n + \"1\" + System.getProperty(\"line.separator\");\n\n InputStream savedStandardInputStream = System.in;\n System.setIn(new ByteArrayInputStream(simulatedUserInput.getBytes()));\n\n mainFunction mainfunc = new mainFunction();\n\n try {\n mainfunc.start();\n } catch(Exception e) {\n System.out.println(\"Exception!\");\n }\n\n assertEquals(1,1);\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(AlphabetSoup(s.nextLine())); \n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tdo{\n\t\t\tSystem.out.println(\"out:\" + scan.nextLine());\n\t\t}while(true);\n\t}", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(TimeConvert(s.nextLine())); \n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in); \r\n\t\twhile(sc.hasNext()){\r\n\t\t\tint x=sc.nextInt();\r\n\t\t\tint y=sc.nextInt();\r\n\t\t\tint result=getResult(x,y);\r\n\t\t\tSystem.out.println(result);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private static String getInput(String message, Scanner sc) {\n String result = \"\";\n while (result.equals(\"\")) {\n System.out.println(message);\n result = sc.nextLine();\n }\n return result;\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\r\n System.out.print(BinaryReversalMethod(s.nextLine()));\r\n s.close();\r\n }", "public static String inputString(String s)\n {\n if (s != null && s.length() > 0)\n {\n System.out.print(s);\n System.out.flush();\n }\n\n StringBuffer sb = new StringBuffer();\n try\n {\n InputStreamReader reader = new InputStreamReader(System.in);\n do\n {\n sb.append(new BufferedReader(reader).readLine());\n }\n while (System.in.available() > 0);\n\n return sb.toString();\n }\n catch (IOException e)\n {\n return null;\n }\n }", "public static void main(String[] args) \n\t{\n\t\tScanner src = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter the number: \");\n\t\tint n = src.nextInt();\n\t\tint temp;\n\t\tsrc.close();\n\t}", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString str=sc.nextLine();\n\t\tfindDuplicateChars(str);\n\t}", "public static void echoContents(Scanner in) {\n }", "public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}", "public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\r\n System.out.print(\"Enter a number: \");\r\n\r\n // nextInt() reads the next integer from the keyboard\r\n int number = reader.nextInt();\r\n\r\n // println() prints the following line to the output screen\r\n System.out.println(\"You entered: \" + number);\r\n }" ]
[ "0.8116788", "0.7859288", "0.7456636", "0.7390904", "0.7370572", "0.726009", "0.7220934", "0.7188939", "0.71190596", "0.7016008", "0.6999161", "0.69791657", "0.6916052", "0.6864569", "0.6834009", "0.6791698", "0.6791698", "0.6768515", "0.6752971", "0.67184204", "0.6700116", "0.65829825", "0.6555058", "0.6553874", "0.6551043", "0.65498847", "0.6548082", "0.65361446", "0.6535826", "0.6535826", "0.65253425", "0.650796", "0.64449716", "0.6437405", "0.6432809", "0.642896", "0.6408177", "0.64072996", "0.64058506", "0.6399164", "0.63945127", "0.63922393", "0.6370302", "0.63515437", "0.6347729", "0.63446486", "0.63238317", "0.6319479", "0.62970144", "0.6270386", "0.62682694", "0.6267702", "0.62541574", "0.6195879", "0.61863095", "0.6162363", "0.615476", "0.6152649", "0.6150961", "0.61463344", "0.61223024", "0.6121463", "0.6096281", "0.60921764", "0.608096", "0.6044462", "0.60317606", "0.60316205", "0.60253906", "0.6021175", "0.601883", "0.60092723", "0.59872925", "0.598554", "0.598554", "0.5984968", "0.59776694", "0.59752107", "0.59682125", "0.59632605", "0.5954111", "0.5950918", "0.5946668", "0.5946313", "0.59412134", "0.5939339", "0.593904", "0.59350663", "0.59273505", "0.5926322", "0.5917193", "0.5912088", "0.59112525", "0.59073883", "0.5907037", "0.5906843", "0.5898045", "0.58952606", "0.5889736", "0.5887788", "0.5880382" ]
0.0
-1
/ access modifiers changed from: private
public void b(Status status) { this.e = status; a(this.e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n protected void prot() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private TMCourse() {\n\t}", "private void m50366E() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "public abstract Object mo26777y();", "@Override\n protected void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "private MApi() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Infer() {\n\n }", "protected abstract Set method_1559();", "@Override\n void init() {\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "public abstract void mo70713b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "private Singletion3() {}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private ChainingMethods() {\n // private constructor\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private abstract void privateabstract();", "protected boolean func_70814_o() { return true; }", "private Get() {}", "private Get() {}", "public void m23075a() {\n }", "private Util() { }", "@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 protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21779D() {\n }", "private test5() {\r\n\t\r\n\t}", "public void mo21825b() {\n }", "@Override\n public void memoria() {\n \n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "protected Doodler() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "@Override\n public boolean isPrivate() {\n return true;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public abstract void mo56925d();", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void mo21877s() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "@Override\n public void get() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private void ss(){\n }", "public void mo21782G() {\n }", "public abstract void mo27385c();", "@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}", "protected void h() {}", "private void init() {\n\n\t}", "private final void i() {\n }" ]
[ "0.70451087", "0.66481936", "0.66338545", "0.6534467", "0.6533057", "0.63756114", "0.6368523", "0.63063055", "0.6244554", "0.62261415", "0.62046665", "0.61776316", "0.6142759", "0.6131381", "0.6131381", "0.61274433", "0.610919", "0.610797", "0.60792845", "0.6062989", "0.6059318", "0.60447836", "0.6037732", "0.6033637", "0.6028711", "0.60249", "0.6015989", "0.6015989", "0.6010123", "0.5991239", "0.5977965", "0.59756213", "0.59711885", "0.59652776", "0.59562653", "0.59491456", "0.5947999", "0.5942879", "0.5941421", "0.59406793", "0.5936351", "0.5936351", "0.5934477", "0.5934473", "0.59311885", "0.59261817", "0.592184", "0.59162307", "0.59162307", "0.5915696", "0.5908215", "0.5903059", "0.5903059", "0.5894341", "0.5887855", "0.58869827", "0.5884463", "0.5881538", "0.588023", "0.5879579", "0.58791363", "0.58698714", "0.58686715", "0.5857818", "0.5855094", "0.5851806", "0.58393794", "0.58365846", "0.58286095", "0.5816463", "0.58148336", "0.58144826", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5809802", "0.5802026", "0.57927555", "0.5792171", "0.5790551", "0.5786574", "0.5786574", "0.5786574", "0.5786574", "0.5786161", "0.578553", "0.5785096", "0.57780075", "0.5774098", "0.57732016", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.5763271", "0.57621974", "0.57540506" ]
0.0
-1
/ access modifiers changed from: private
public void c(BluetoothDevice bluetoothDevice) { c.a(a, String.format("connectDevice#device major is %s", new Object[]{d(bluetoothDevice)})); if (bluetoothDevice.getBluetoothClass().getMajorDeviceClass() != 1024) { c.d(a, "not support audio video!!!"); } a.b().getProfileProxy(this.b, this.f, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n protected void prot() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private TMCourse() {\n\t}", "private void m50366E() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "public abstract Object mo26777y();", "@Override\n protected void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "private MApi() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Infer() {\n\n }", "protected abstract Set method_1559();", "@Override\n void init() {\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "public abstract void mo70713b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "private Singletion3() {}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private ChainingMethods() {\n // private constructor\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private abstract void privateabstract();", "protected boolean func_70814_o() { return true; }", "private Get() {}", "private Get() {}", "public void m23075a() {\n }", "private Util() { }", "@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 protected void getExras() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21779D() {\n }", "private test5() {\r\n\t\r\n\t}", "public void mo21825b() {\n }", "@Override\n public void memoria() {\n \n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "protected Doodler() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "@Override\n public boolean isPrivate() {\n return true;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public abstract void mo56925d();", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public void mo21877s() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "@Override\n public void get() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private void ss(){\n }", "public void mo21782G() {\n }", "public abstract void mo27385c();", "@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}", "protected void h() {}", "private void init() {\n\n\t}", "private final void i() {\n }" ]
[ "0.70451087", "0.66481936", "0.66338545", "0.6534467", "0.6533057", "0.63756114", "0.6368523", "0.63063055", "0.6244554", "0.62261415", "0.62046665", "0.61776316", "0.6142759", "0.6131381", "0.6131381", "0.61274433", "0.610919", "0.610797", "0.60792845", "0.6062989", "0.6059318", "0.60447836", "0.6037732", "0.6033637", "0.6028711", "0.60249", "0.6015989", "0.6015989", "0.6010123", "0.5991239", "0.5977965", "0.59756213", "0.59711885", "0.59652776", "0.59562653", "0.59491456", "0.5947999", "0.5942879", "0.5941421", "0.59406793", "0.5936351", "0.5936351", "0.5934477", "0.5934473", "0.59311885", "0.59261817", "0.592184", "0.59162307", "0.59162307", "0.5915696", "0.5908215", "0.5903059", "0.5903059", "0.5894341", "0.5887855", "0.58869827", "0.5884463", "0.5881538", "0.588023", "0.5879579", "0.58791363", "0.58698714", "0.58686715", "0.5857818", "0.5855094", "0.5851806", "0.58393794", "0.58365846", "0.58286095", "0.5816463", "0.58148336", "0.58144826", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5814171", "0.5809802", "0.5802026", "0.57927555", "0.5792171", "0.5790551", "0.5786574", "0.5786574", "0.5786574", "0.5786574", "0.5786161", "0.578553", "0.5785096", "0.57780075", "0.5774098", "0.57732016", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.57683206", "0.5763271", "0.57621974", "0.57540506" ]
0.0
-1
Other approach to solve this problem would be to use inorder traversal (left, root, right) / properties where previous element in output would always be lesser than the current output.
public boolean isValidBST(TreeNode root) { inOrder(root); return isSorted(list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeNode inorderSuccessor(TreeNode root, TreeNode p) {\n TreeNode ans = null;\n while (root != null) {\n if (root.val > p.val) {\n ans = root;\n root = root.left;\n } else root = root.right;\n }\n return ans;\n}", "public ArrayList<Integer> inOrderTraversal() {\r\n\t\treturn inOrderTraversal(treeMinimum());\r\n\t}", "public static void main(String[] args) {\n\n\n TreeNode root = new TreeNode(1);\n TreeNode left1 = new TreeNode(2);\n TreeNode left2 = new TreeNode(3);\n TreeNode left3 = new TreeNode(4);\n TreeNode left4 = new TreeNode(5);\n TreeNode right1 = new TreeNode(6);\n TreeNode right2 = new TreeNode(7);\n TreeNode right3 = new TreeNode(8);\n TreeNode right4 = new TreeNode(9);\n TreeNode right5 = new TreeNode(10);\n root.left = left1;\n root.right = right1;\n left1.left = left2;\n left1.right = left3;\n left3.right = left4;\n right1.left = right2;\n right1.right = right3;\n right2.right = right4;\n right3.left = right5;\n //[3, 2, 4, 5, 1, 7, 9, 6, 10, 8]\n List<Integer> list = inorderTraversalN(root);\n System.err.println(list);\n }", "public void levelOrderTraversal() {\n LinkedList<Node> queue = new LinkedList<>();\n queue.add(root);\n\n while (!queue.isEmpty()) {\n Node removed = queue.removeFirst();\n System.out.print(removed.data + \" \");\n if (removed.left != null) queue.add(removed.left);\n if (removed.right != null) queue.add(removed.right);\n }\n\n System.out.println();\n }", "static void inorder(TreeNode root, List<Integer> output) {\n if (root == null) {\n return;\n }\n inorder(root.left, output);\n output.add(root.val);\n inorder(root.right, output);\n }", "private void inOrder(Node root) {\r\n\t\t// inOrderCount++;\r\n\t\t// System.out.println(\" Count: \" + inOrderCount);\r\n\t\tif (root == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// System.out.println(\" Count: \" + inOrderCount);\r\n\t\tinOrder(root.getlChild());\r\n\t\tif (inOrderCount < 20) {\r\n\t\t\tSystem.out.print(\"< \" + root.getData() + \" > \");\r\n\t\t\tinOrderCount++;\r\n\t\t\t//System.out.println(\" Count: \" + inOrderCount);\r\n\t\t}\r\n\t\tinOrder(root.getrChild());\r\n\r\n\t}", "@Test\n public void test(){\n BinarySearchTree tree = new BinarySearchTree(new Node(35));\n\n tree.addNode(4);\n tree.addNode(15);\n tree.addNode(3);\n tree.addNode(1);\n tree.addNode(20);\n tree.addNode(8);\n tree.addNode(50);\n tree.addNode(40);\n tree.addNode(30);\n tree.addNode(80);\n tree.addNode(70);\n\n tree.addNode(90);\n\n tree.deleteNode(50);\n System.out.println(\"=====中序遍历 递归法=====\");\n TreeUtil.traverseInOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traverseInOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====前序遍历=====\");\n TreeUtil.traversePreOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traversePreOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历=====\");\n TreeUtil.traversePostOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历 迭代法=====\");\n TreeUtil.traversePostOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====层次遍历=====\");\n TreeUtil.traverseLevelOrder(tree.getRoot());\n\n int height = TreeUtil.getChildDepth(tree.getRoot());\n System.out.println(\"\");\n System.out.println(\"树高:\"+height);\n }", "private static List<Integer> getTopView(TreeNode root) {\n List<Integer> output = new ArrayList<>();\n if (root == null) return output;\n\n Map<Integer, Integer> treeMap = new TreeMap<>();\t/* TreeMap is sorted according to the natural ordering of its keys */\n\n Queue<Pair> queue = new LinkedList<>();\n queue.add(new Pair(root, 0));\n\n while (!queue.isEmpty()) {\n int queueSize = queue.size();\n\n while (queueSize-- > 0) {\n\n Pair pair = queue.poll();\n TreeNode currNode = pair.node;\n int horizontalDistance = pair.horizontalDistance;\n\n if (!treeMap.containsKey(horizontalDistance)) {\n treeMap.put(horizontalDistance, currNode.data);\n }\n\n if (currNode.left != null) queue.add(new Pair(currNode.left, horizontalDistance - 1));\n if (currNode.right != null) queue.add(new Pair(currNode.right, horizontalDistance + 1));\n }\n }\n\n output.addAll(treeMap.values());\n return output;\n }", "public TreeNode inorderSuccessor(TreeNode root, TreeNode p) {\n if (root == null) return null;\n if (root.val > p.val) {\n TreeNode left = inorderSuccessor(root.left, p);\n return left == null ? root : left;\n } else return inorderSuccessor(root.right, p);\n}", "private void levelOrderTraversal() {\n\t\tif(root==null) {\n\t\t\tSystem.out.println(\"\\nBinary node is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tQueue<OO8BinaryTreeNode> queue = new LinkedList<OO8BinaryTreeNode>();\n\t\tqueue.add(root);\n\t\tOO8BinaryTreeNode currentNode = null;\n\t\twhile(!queue.isEmpty()) {\n\t\t\tcurrentNode=queue.remove();\n\t\t\tSystem.out.print(currentNode.getValue() + \" \");\n\t\t\tif(currentNode.getLeftNode()!=null)\n\t\t\t\tqueue.add(currentNode.getLeftNode());\n\t\t\tif(currentNode.getRightNode()!=null)\n\t\t\t\tqueue.add(currentNode.getRightNode());\n\t\t}\n\t\tSystem.out.println();\n\t}", "static void inorderTraversal(Node tmp)\n {\n if(tmp!=null) {\n inorderTraversal(tmp.left);\n System.out.print(tmp.val+\" \");\n inorderTraversal(tmp.right);\n }\n \n \n \n }", "private void inorder() {\n inorder(root);\n }", "static void topView( Node root) \n{ \n\t// Base case \n\tif (root == null) { \n\t\treturn; \n\t} \n\n\t// Take a temporary node \n\tNode temp = null; \n\n\t// Queue to do BFS \n\tQueue<Pair > q = new LinkedList<Pair>(); \n\n\t// map to store node at each vartical distance \n\tMap<Integer, Integer> mp = new TreeMap<Integer, Integer>(); \n\n\tq.add(new Pair( root, 0 )); \n\n\t// BFS \n\twhile (q.size()>0) { \n\n\t\ttemp = q.peek().first; \n\t\tint d = q.peek().second; \n\t\tq.remove(); \n\n\t\t// If any node is not at that vertical distance \n\t\t// just insert that node in map and print it \n\t\tif (mp.get(d) == null) {mp.put(d, temp.data); \n\t\t} \n\n\t\t// Continue for left node \n\t\tif (temp.left!=null) { \n\t\t\tq.add(new Pair( temp.left, d - 1 )); \n\t\t} \n\n\t\t// Continue for right node \n\t\tif (temp.right!=null) { \n\t\t\tq.add(new Pair( temp.right, d + 1 )); \n\t\t} \n\t} \n\tfor(Integer data:mp.values()){ \n\tSystem.out.print( data + \" \"); \n\t} \n}", "public void inorder()\r\n {\r\n inorder(root);\r\n }", "private PersistentLinkedList<T> pop() {\n //the latest element won't become empty\n int index = this.treeSize - 1;\n Node<T> newRoot = new Node<>(branchingFactor);\n\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n ArrayList<Node<T>> newNodes = new ArrayList<>();\n newNodes.add(newRoot);\n ArrayList<Integer> newNodesIndices = new ArrayList<>();\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n TraverseData traverseData = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, index, b));\n currentNode = traverseData.currentNode;\n currentNewNode = traverseData.currentNewNode;\n newNodes.add(currentNewNode);\n newNodesIndices.add(index / b);\n index = traverseData.index;\n }\n newNodesIndices.add(index);\n\n for (int i = 0; i < branchingFactor && i < index; i++) {\n currentNewNode.set(i, currentNode.get(i));\n }\n currentNewNode.set(index, null);\n\n if (index == 0) {\n int latestIndex = newNodes.size() - 2;\n newNodes.get(latestIndex).set(newNodesIndices.get(latestIndex), null);\n\n for (int i = latestIndex; i > 0; i--) {\n if (newNodesIndices.get(i) == 0) {\n newNodes.get(i - 1).set(newNodesIndices.get(i - 1), null);\n } else {\n break;\n }\n }\n }\n\n if (newNodes.size() > 1) {\n int nonNullChildren = 0;\n for (Node<T> child : newRoot.children) {\n if (child != null) {\n nonNullChildren++;\n }\n }\n if (nonNullChildren == 1) { //need new root\n newRoot = newRoot.get(0);\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth - 1,\n this.base / branchingFactor, this.treeSize - 1, unusedTreeIndices,\n indexCorrespondingToTheFirstElement, indexCorrespondingToTheLatestElement);\n }\n }\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth, this.base,\n this.treeSize - 1, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }", "public static int compareOrder(SiblingCountingNode first, SiblingCountingNode second) {\n NodeInfo ow = second;\n \n // are they the same node?\n if (first.isSameNodeInfo(second)) {\n return 0;\n }\n \n NodeInfo firstParent = first.getParent();\n if (firstParent == null) {\n // first node is the root\n return -1;\n }\n \n NodeInfo secondParent = second.getParent();\n if (secondParent == null) {\n // second node is the root\n return +1;\n }\n \n // do they have the same parent (common case)?\n if (firstParent.isSameNodeInfo(secondParent)) {\n int cat1 = nodeCategories[first.getNodeKind()];\n int cat2 = nodeCategories[second.getNodeKind()];\n if (cat1 == cat2) {\n return first.getSiblingPosition() - second.getSiblingPosition();\n } else {\n return cat1 - cat2;\n }\n }\n \n // find the depths of both nodes in the tree\n int depth1 = 0;\n int depth2 = 0;\n NodeInfo p1 = first;\n NodeInfo p2 = second;\n while (p1 != null) {\n depth1++;\n p1 = p1.getParent();\n }\n while (p2 != null) {\n depth2++;\n p2 = p2.getParent();\n }\n // move up one branch of the tree so we have two nodes on the same level\n \n p1 = first;\n while (depth1 > depth2) {\n p1 = p1.getParent();\n if (p1.isSameNodeInfo(second)) {\n return +1;\n }\n depth1--;\n }\n \n p2 = ow;\n while (depth2 > depth1) {\n p2 = p2.getParent();\n if (p2.isSameNodeInfo(first)) {\n return -1;\n }\n depth2--;\n }\n \n // now move up both branches in sync until we find a common parent\n while (true) {\n NodeInfo par1 = p1.getParent();\n NodeInfo par2 = p2.getParent();\n if (par1 == null || par2 == null) {\n throw new NullPointerException(\"DOM/JDOM tree compare - internal error\");\n }\n if (par1.isSameNodeInfo(par2)) {\n return ((SiblingCountingNode)p1).getSiblingPosition() -\n ((SiblingCountingNode)p2).getSiblingPosition();\n }\n p1 = par1;\n p2 = par2;\n }\n }", "static int downToZero(Node root) {\n /*\n * Write your code here.\n */\n Queue<Node> queue = new PriorityQueue<>();\n queue.add(root);\n int min = 100001;\n while (!queue.isEmpty()){\n Node current = queue.poll();\n if(current.value <= 4){\n if (current.value == 4){\n min = current.depth + 3;\n return min;\n }\n min = current.depth+current.value;\n return min;\n }\n Node toAdd1 = new Node(current.value-1, current.depth+1);\n queue.add(toAdd1);\n for(int i = 2; i<=Math.sqrt(current.value); i++){\n if(current.value%i==0){\n Node toAdd = new Node(current.value/i, current.depth+1);\n queue.add(toAdd);\n }\n }\n }\n return min;\n }", "public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void inOrder(){\n inOrder(root);\n }", "static void preOrderTraversalStackOptimised(Node root) {\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n\n while (curr != null) {\n System.out.print(curr.data + \" \");\n if (curr.right != null) {\n stack.push(curr.right);\n }\n curr = curr.left;\n }\n\n if (!stack.isEmpty()) {\n curr = stack.pop();\n }\n }\n }", "static void bfs(TreeNode root, List<Integer> output) {\n if (root == null) {\n return;\n }\n Queue<TreeNode> queue = new LinkedList<>();\n queue.offer(root);\n\n while (!queue.isEmpty()) {\n TreeNode node = queue.poll();\n output.add(node.val);\n if (node.left != null) {\n queue.add(node.left);\n }\n if (node.right != null) {\n queue.add(node.right);\n }\n }\n }", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "@Test\n public void levelOrder() throws Exception {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n\n Queue<Integer> expected = new LinkedList<Integer>();\n expected.add(110);\n expected.add(80);\n expected.add(150);\n expected.add(120);\n expected.add(40);\n BinarySearchTree.levelOrder(root);\n assertEquals(expected, BinarySearchTree.printQ);\n }", "public void inorderTraversal() \n { \n inorderTraversal(header.rightChild); \n }", "private int treeTraverse (TreeNode root, int previousVal) {\n if (root == null)\n return 0;\n \n // traverse left, then right\n int left = treeTraverse(root.left, root.val);\n int right = treeTraverse(root.right, root.val);\n \n // calculate the longest path\n path = Math.max(left + right, path);\n\n //return\n if (root.val == previousVal) \n return Math.max(left, right) + 1;\n \n return 0;\n }", "private E[] getPreOrderLeftSubTree(E[] inOrderTraversal,E[] preOrderTraversal) {\n\t\treturn null;\n\t}", "private void inOrder(HomogeneusNode root) {\n if (root != null) {\n inOrder(root.getLeft());\n System.out.printf(\"%d\", root.getData());\n inOrder(root.getRight());\n }\n }", "public String postorder() {\n \tresult = \"\";\n \ttraversal(root);\n return result;\n }", "public void inOrderTraverseRecursive();", "public List<Integer> inorderTraversal2(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n TreeNode curr = root; // not necessary\n Deque<TreeNode> stack = new ArrayDeque<>();\n\n while (true) {\n // inorder: left, root, right\n // add all left nodes into stack\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n } // curr == null\n // if stack is empty, then finished\n if (stack.isEmpty()) {\n break;\n }\n // all left nodes in stack\n // if right node empty, pop, else add right\n curr = stack.pop();\n // add left and root\n result.add(curr.val);\n // if right is null, then next round pop stack\n // else next round add right.left first ...\n curr = curr.right;\n }\n // stack is empty\n return result;\n }", "ArrayList<Integer> leftView(Node root)\n {\n \n ArrayList<Integer> ans=new ArrayList<>();\n if(root==null) return ans;\n ans.add(root.data);\n Queue<Node> queue=new LinkedList<>();\n queue.add(root);\n queue.add(null);\n while(!queue.isEmpty()){\n Node curr=queue.poll();\n if(curr==null){\n if(queue.isEmpty()) break;\n ans.add(queue.peek().data);\n queue.add(null);\n }\n else{\n if(curr.left!=null) queue.add(curr.left);\n if(curr.right!=null) queue.add(curr.right);\n }\n }\n return ans;\n }", "public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }", "public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }", "public static Node inorderSuccessor(Node x) {\n Node cursor = null;\n if (x == null) {\n return cursor;\n }\n\n if (x.right != null) {\n cursor = x.right;\n while (cursor != null) {\n cursor = cursor.left;\n }\n return cursor;\n } else {\n cursor = x.parent;\n while (cursor != null && cursor.val < x.val) {\n cursor = cursor.parent;\n }\n return cursor;\n }\n }", "public void inOrder(){\n inOrder(root);\n System.out.println();\n }", "public void bottomViewSorted()\r\n\t{\r\n\t\tint hd = 0;\r\n\t\tTreeMap<Integer, Node> map = new TreeMap<>();\r\n\t\tif(root == null)\r\n\t\t\treturn;\r\n\t\tQueue<Node> que = new LinkedList<>();\r\n\t\troot.hd=hd;\r\n\t\tNode node;\r\n\t\tque.add(root);\r\n\t\t\r\n\t\twhile(que.size() != 0)\r\n\t\t{\r\n\t\t\tnode = que.poll();\r\n\t\t\thd = node.hd;\r\n\t\t\tmap.put(hd, node);\r\n\t\t\tif(node.left != null)\r\n\t\t\t{\r\n\t\t\t\tnode.left.hd = hd - 1;\r\n\t\t\t\tque.add(node.left);\r\n\t\t\t}\r\n\t\t\tif(node.right != null)\r\n\t\t\t{\t\r\n\t\t\t\tnode.right.hd = hd + 1;\r\n\t\t\t\tque.add(node.right);\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tSet<Integer> keys = map.keySet();\r\n\r\n\t\tfor(Integer i : keys)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Key: \" +i+ \" & Value: \" +map.get(i).data);\r\n\t\t}\r\n\t}", "public void levelOrderTraversal(){\n System.out.println(\"levelOrderTraversal\");\n\n Queue<Node> queue = new ArrayCircularQueue<>();\n\n if(root!=null){\n queue.insert(root);\n }\n\n while(!queue.isEmpty()){\n Node node = queue.delete();\n System.out.print(node.getData() + \" \");\n if(node.getLeft()!=null){\n queue.insert(node.getLeft());\n }\n if(node.getRight()!=null){\n queue.insert(node.getRight());\n }\n }\n System.out.println();\n }", "public int depth() { return Math.max(left.depth(), right.depth()) + 1; }", "public List < Integer > inorderTraversal(TreeNode root) {\n List < Integer > res = new ArrayList < > ();\n TreeNode curr = root;\n TreeNode pre;\n while (curr != null) {\n if (curr.left == null) {\n res.add(curr.val);\n curr = curr.right; // move to next right node\n } else { // has a left subtree\n pre = curr.left;\n while (pre.right != null) { // find rightmost\n pre = pre.right;\n }\n pre.right = curr; // put cur after the pre node\n TreeNode temp = curr; // store cur node\n curr = curr.left; // move cur to the top of the new tree\n temp.left = null; // original cur left be null, avoid infinite loops\n }\n }\n return res;\n }", "public String inOrderTraverse(){\r\n\r\n\t\t//Stack that keeps track of where we go\r\n\t\tStack<BinarySearchTree> traverseStack = new Stack<BinarySearchTree>();\r\n\t\t\r\n\t\t//This is where we want to start\r\n\t\tBinarySearchTree curr = this;\r\n\t\t\r\n\t\t//When true, the string is returned\r\n\t\tBoolean done = false;\r\n\t\t\r\n\t\t//The string to return\r\n\t\tString treeAsString = \"\";\r\n\t\t\r\n\t\t//INORDER: LEFT > ROOT > RIGHT\r\n\r\n\t\twhile(!done){\r\n\t\t\tif(curr != null){\r\n\t\t\t\t\r\n\t\t\t\t//We need to get left first push it onto the stack\r\n\t\t\t\ttraverseStack.push(curr);\r\n\r\n\t\t\t\t//Getting the left first\r\n\t\t\t\tcurr = curr.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t//curr is null. We checked left.\r\n\t\t\t\tif(!traverseStack.isEmpty()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//pop the stack to get the item\r\n\t\t\t\t\tcurr = traverseStack.pop();\r\n\r\n\t\t\t\t\t//append the item\r\n\t\t\t\t\ttreeAsString += curr.toString() + \" \";\r\n\r\n\t\t\t\t\t//Check the right\r\n\t\t\t\t\tcurr = curr.getRightChild();\r\n\t\t\t\t}\r\n\t\t\t\t//curr was null, the stack was empty, we visited all\r\n\t\t\t\t//of the 'nodes'\r\n\t\t\t\telse{\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn treeAsString;\r\n\t}", "public static void main(String[] args)\n throws Exception\n {\n PrintWriter pen = new PrintWriter(System.out, true);\n BST<String, String> dict =\n new BST<String, String>((left, right) -> left.compareTo(right));\n\n String[] values =\n new String[] { \"gorilla\", \"dingo\", \"chimp\", \"emu\", \"elephant\", \"beta\",\n \"aardvark\", \"chinchilla\", \"yeti\", \"gibbon\", \"horse\",\n \"elephant\", \"duck\", \"emu\" };\n String[] moreValues =\n new String[] { \"gnu\", \"dingo\", \"flying squirrel\", \"iguana\", \"squirrel\",\n \"red squirrel\", \"moose\" };\n\n // Add each element and make sure that it's there.\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n\n // A quick printout for fun\n pen.println(\"After setting the first set of values\");\n iterate(pen, dict.iterator());\n\n // Another quick printout for fun\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n pen.println(\"After setting the second set of values\");\n iterate(pen, dict.iterator());\n\n // Build iterators that traverse in different ways\n Iterable<String> df_pre_lr =\n dict.values(Traversal.DEPTH_FIRST_PREORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_lr =\n dict.values(Traversal.DEPTH_FIRST_INORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_rl =\n dict.values(Traversal.DEPTH_FIRST_INORDER_RIGHT_TO_LEFT);\n Iterable<String> bf_pre_rl =\n dict.values(Traversal.BREADTH_FIRST_PREORDER_RIGHT_TO_LEFT);\n\n // Iterate!\n pen.println(\"Iterating depth-first, preorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_pre_lr);\n \n pen.println(\"Iterating depth-first, inorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_in_lr);\n \n pen.println(\"Iterating depth-first, inorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, df_in_rl);\n \n pen.println(\"Iterating breadth-first, preorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, bf_pre_rl);\n\n // And we're done\n pen.close();\n }", "static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }", "public List<List<Integer>> verticalTraversal(TreeNode root) {\n\tTreeMap<Integer, List<Integer>> map = new TreeMap<>();\n\tQueue<Integer> q = new LinkedList<>();\n\tQueue<TreeNode> Q = new LinkedList<>();\n\tq.add(0);\n\tQ.add(root);\n\t\n\twhile(!q.isEmpty()) {\n\t int size = q.size();\n\t TreeMap<Integer, TreeSet<Integer>> temp = new TreeMap<>();\n\t for (int i = 0; i < size; i++) {\n\t\tint val = q.poll();\n\t\tTreeNode node = Q.poll();\n\t\tTreeSet<Integer> set = temp.get(val);\n\t\tif (set == null) {\n\t\t set = new TreeSet<>();\n\t\t temp.put(val, set);\n\t\t}\n\t\tset.add(node.val);\n\t\tif (node.left != null) {\n\t\t q.add(val - 1);\n\t\t Q.add(node.left);\n\t\t}\n\t\tif (node.right != null) {\n\t\t q.add(val + 1);\n\t\t Q.add(node.right);\n\t\t}\n\t }\n\t for (int key : temp.keySet()) {\n\t\tList<Integer> li = map.get(key);\n\t\tif (li == null) {\n\t\t li = new LinkedList<>();\n\t\t map.put(key, li);\n\t\t}\n\t\tli.addAll(temp.get(key));\n\t }\n\t}\n\t\n\tList<List<Integer>> res = new LinkedList<>();\n\tfor (int key : map.keySet()) {\n\t res.add(map.get(key));\n\t}\n\treturn res;\n\n }", "public List<Integer> rightSideView(TreeNode root) {\n List<Integer> r = new ArrayList<>();\n LinkedList<LinkedList<Integer>> levelOrder = new LinkedList<>();\n LinkedList<TreeNode> queue = new LinkedList<>();\n if(root == null) return r;\n queue.offer(root);\n while(!queue.isEmpty()){\n int size = queue.size();\n LinkedList<Integer> res = new LinkedList<>();\n for(int i=0;i<size;i++){\n TreeNode cur = queue.pop();\n res.add(cur.val);\n if(cur.left != null) queue.offer(cur.left);\n if(cur.right != null) queue.offer(cur.right);\n }\n levelOrder.add(res);\n }\n //2. store the last element of each list\n LinkedList<Integer> ans = new LinkedList<>();\n for(LinkedList<Integer> l : levelOrder){\n int s = l.get(l.size() - 1);\n ans.add(s);\n }\n return ans;\n }", "public void inOrderTraversal(){\n System.out.println(\"inOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack<Node>();\n\n for(Node node = root; node!= null; node=node.getLeft()){\n stack.push(node);\n }\n while(!stack.isEmpty()){\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n for(node=node.getRight(); node!= null; node = node.getLeft()){\n stack.push(node);\n }\n }\n\n System.out.println();\n }", "public static void levelOrderLinewise1(Node node){\r\n Queue<Node> mainq = new ArrayDeque<>();\r\n Queue<Node> childq = new ArrayDeque<>();\r\n \r\n //Adding root in mainq\r\n mainq.add(node);\r\n \r\n while(mainq.size()>0){\r\n //1. get + remove\r\n Node rem = mainq.remove();\r\n \r\n //2. Print \r\n System.out.print(rem.data + \" \");\r\n \r\n //3. Add children of node to Childq\r\n for(Node child : rem.children){\r\n childq.add(child);\r\n }\r\n \r\n //Check if size of mainq got 0 then print \"enter\" and swap the mainq and childq\r\n if(mainq.size()==0){\r\n System.out.println();\r\n Queue<Node> temp = new ArrayDeque<>();\r\n temp = mainq;\r\n mainq = childq;\r\n childq = temp;\r\n }\r\n }\r\n }", "public void inorderTraversal() {\n inorderThroughRoot(root);\n System.out.println();\n }", "private void inorder() {\r\n\t\t\tinorder(root);\r\n\t\t}", "private void traverseInOrder(BinaryNode<AnyType> curr) {\n\t\tif (curr.left != null) {\n\t\t\ttraverseInOrder(curr.left);\n\t\t}\n\t\tSystem.out.println(curr.element);\n\n\t\t// checking for duplicates\n\n\t\tfor (int i = 0; i < curr.duplicate.size(); i++) {\n\t\t\tSystem.out.println(curr.duplicate.get(i).element);\n\t\t}\n\n\t\tif (curr.right != null) {\n\t\t\ttraverseInOrder(curr.right);\n\t\t}\n\t}", "@Override\r\n\tpublic List<Node<T>> getPreOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// La lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPre(raiz, lista);\r\n\t}", "@Override\r\n\tpublic Iterator<T> iteratorLevelOrder() {\r\n\t\tLinkedList<T> list = new LinkedList<T>();\r\n\t\tQueue<BSTNode<T>> work = new ArrayDeque<BSTNode<T>>();\r\n\t\twork.add(this.root);//start at the root\r\n\r\n\t\twhile(!work.isEmpty()) {\r\n\t\t\tBSTNode<T> node = work.remove();//pop the first\r\n\t\t\tlist.add(node.data);\r\n\t\t\t\r\n\t\t\tif(node.left!= null) {\r\n\t\t\t\twork.add(node.left);\r\n\t\t\t}\r\n\t\t\tif(node.right!= null) {\r\n\t\t\t\twork.add(node.right);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t}", "void pairwiseCombine(){\n\t\t\n\t\tmin.Left.Right = min.Right;\n\t\tmin.Right.Left = min.Left;\n\t\t/**\n\t\tPairwise combine differentiates itself in operation of depending on the presence of a child node\n\t\t*/\n\t\t\n\t\tif(min.Child==null){\n\t\t/*map acts as the table to store similar degree nodes*/\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Right;\n\t\t\tmin = null;\n\t\t\tmin = current;\n\t\t\tlast = current.Left;\n\t\t\twhile(current!=last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\t\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\t\n\t\t\t\t\t/*Since a parent node can have only one child node a condition is checked to update its child node*/\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t/*If the node stored is less than the incoming node*/\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\tif(temp.Child == temp.Child.Right){\n\t\t\t\t\t\t\t\ttemp.Child.Right = current;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t/*If the incoming node is lower*/\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\t\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\t/*Since our condition is used only till last node and exits during last node the iteration is repeated for the last node*/\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\n\t\t}\n\t\telse{\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Child;\n\t\t\tcurrent.Parent = null;\n\t\t\tif(min!=min.Right){\n\t\t\t\tcurrent.Right.Left = min.Left;\n\t\t\t\tmin.Left.Right = current.Right;\n\t\t\t\tcurrent.Right = min.Right;\n\t\t\t\tmin.Right.Left = current;\n\t\t\t\tlast = current.Left;\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlast = current.Left;\n\n\t\t\t}\n\t\t\tmin =null;\n\t\t\tmin = current;\n\t\t\t/*In the presence of a child the child has to be inserted at the top level*/\n\t\t\twhile(current != last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\n\t\t\t\twhile(map.containsKey(current.degree)){\n\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist && temp.dist!=0){\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\t\t}\n\n\t}", "public void preOrder(){\n preOrder(root);\n System.out.println();\n }", "private void validOrderResult() {\n TreeNode currentTreeNode = treeLeaf;\n TreeNode orderTreeNode = null;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof OrderGlobalTreeNode) {\n orderTreeNode = currentTreeNode;\n break;\n } else {\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }\n if (null != orderTreeNode) {\n OrderGlobalTreeNode orderGlobalTreeNode = OrderGlobalTreeNode.class.cast(orderTreeNode);\n TreeNode aggTreeNode = orderTreeNode.getOutputNode();\n while (aggTreeNode != null && aggTreeNode.getNodeType() != NodeType.AGGREGATE) {\n aggTreeNode = aggTreeNode.getOutputNode();\n }\n if (null != aggTreeNode) {\n if (aggTreeNode instanceof FoldTreeNode) {\n TreeNode inputTreeNode = UnaryTreeNode.class.cast(aggTreeNode).getInputNode();\n if (inputTreeNode == orderTreeNode) {\n return;\n }\n UnaryTreeNode inputUnaryTreeNode = UnaryTreeNode.class.cast(inputTreeNode);\n if (inputUnaryTreeNode.getInputNode() == orderTreeNode &&\n (inputUnaryTreeNode instanceof EdgeVertexTreeNode &&\n EdgeVertexTreeNode.class.cast(inputUnaryTreeNode).getDirection() != Direction.BOTH)) {\n return;\n }\n String orderLabel = orderGlobalTreeNode.enableOrderFlag(labelManager);\n SelectOneTreeNode selectOneTreeNode = new SelectOneTreeNode(new SourceDelegateNode(inputUnaryTreeNode, schema), orderLabel, Pop.last, Lists.newArrayList(), schema);\n selectOneTreeNode.setConstantValueType(new ValueValueType(Message.VariantType.VT_INTEGER));\n OrderGlobalTreeNode addOrderTreeNode = new OrderGlobalTreeNode(inputUnaryTreeNode, schema,\n Lists.newArrayList(Pair.of(selectOneTreeNode, Order.incr)));\n UnaryTreeNode.class.cast(aggTreeNode).setInputNode(addOrderTreeNode);\n }\n } else {\n if (treeLeaf instanceof OrderGlobalTreeNode) {\n return;\n }\n TreeNode currTreeNode = orderTreeNode.getOutputNode();\n boolean hasSimpleShuffle = false;\n while (currTreeNode != null) {\n if (currTreeNode.getNodeType() == NodeType.FLATMAP\n || (currTreeNode instanceof PropertyNode &&\n !(UnaryTreeNode.class.cast(currTreeNode).getInputNode().getOutputValueType() instanceof EdgeValueType))) {\n hasSimpleShuffle = true;\n break;\n }\n currTreeNode = currTreeNode.getOutputNode();\n }\n if (!hasSimpleShuffle) {\n return;\n }\n\n UnaryTreeNode outputTreeNode = UnaryTreeNode.class.cast(treeLeaf);\n if (outputTreeNode.getInputNode() == orderTreeNode) {\n if (outputTreeNode instanceof EdgeVertexTreeNode &&\n EdgeVertexTreeNode.class.cast(outputTreeNode).getDirection() != Direction.BOTH) {\n return;\n }\n if (orderTreeNode.getOutputValueType() instanceof EdgeValueType && outputTreeNode instanceof PropertyNode) {\n return;\n }\n }\n String orderLabel = orderGlobalTreeNode.enableOrderFlag(labelManager);\n SelectOneTreeNode selectOneTreeNode = new SelectOneTreeNode(new SourceDelegateNode(treeLeaf, schema), orderLabel, Pop.last, Lists.newArrayList(), schema);\n selectOneTreeNode.setConstantValueType(new ValueValueType(Message.VariantType.VT_INTEGER));\n treeLeaf = new OrderGlobalTreeNode(treeLeaf, schema,\n Lists.newArrayList(Pair.of(selectOneTreeNode, Order.incr)));\n }\n }\n }", "private E[] geInOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "static void levelOrder(Node root){\n Queue<Node> queue = new LinkedList<Node>();\r\n \r\n queue.add(root);\r\n while (!queue.isEmpty()) {\r\n Node head = queue.remove();\r\n\r\n if (head == null) {\r\n continue;\r\n }\r\n\r\n System.out.print(head.data + \" \");\r\n\r\n queue.add(head.left);\r\n queue.add(head.right);\r\n }\r\n System.out.println();\r\n \r\n }", "public static void main(String[] args) {\n Node root = new Node(20);\n root.left = new Node(60);\n root.left.left = new Node(4);\n root.left.right = new Node(10);\n root.right = new Node(80);\n root.right.left = new Node(8);\n root.right.right = new Node(100);\n List<Node> ls = new ArrayList<>();\n /*findWrongNode(root, ls);\n List<Node> out = new ArrayList<>();\n findWronglySorted(ls, out);\n for (Node a: out) {\n System.out.print(a.data + \" \");\n }*/\n findWrongNodeWithoutExtraSpace(root);\n System.out.println(first.data);\n System.out.println(second.data);\n }", "public void inorder()\n {\n inorder(root);\n }", "public void inorder()\n {\n inorder(root);\n }", "Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node);", "public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n while (node != null || !stack.empty()) {\n // push left nodes into stack\n while (node != null) {\n stack.push(node);\n node = node.left;\n }\n node = stack.pop();\n result.add(node.val);\n // ! key step: invoke recursive call on node's right child\n node = node.right;\n }\n return result;\n }", "void inOrder(TreeNode node) \n { \n if (node == null) \n return; \n \n inOrder(node.left); \n System.out.print(node.val + \" \"); \n \n inOrder(node.right); \n }", "static ArrayList<Integer> preorder(Node root)\n {\n ArrayList<Integer> output_arr=new ArrayList<>();\n if(root==null){\n return null;\n }\n Stack<Node> stack=new Stack<>();\n stack.add(root);\n \n while(!stack.isEmpty()){\n Node currentnode=stack.pop();\n output_arr.add(currentnode.data);\n if(currentnode.right!=null){\n stack.add(currentnode.right);\n }\n if(currentnode.left!=null){\n stack.add(currentnode.left);\n }\n \n }\n return output_arr;\n }", "private int pushDownRoot() {\n\t\treturn pushDown(0);// TODO: A one-line function that calls pushDown()\n\t}", "private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}", "public void preOrderTraversal(){\n System.out.println(\"preOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack();\n\n if(root!=null){\n stack.push(root);\n }\n while(!stack.isEmpty()) {\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n if (node.getRight() != null) {\n stack.push(node.getRight());\n }\n if (node.getLeft() != null) {\n stack.push(node.getLeft());\n }\n }\n System.out.println();\n }", "@Test\n public void whenAddTwoNodesOnDifferentLevelsThenNextFromBottomLevel() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n Iterator iter = tree.iterator();\n assertThat(iter.next(), is(\"2\"));\n }", "ArrayList<Integer> preOrder(Node root)\n {\n // Code\n ArrayList<Integer> result = new ArrayList<Integer>();\n\n if (root == null) {\n return null;\n }\n Stack<Node> stack = new Stack<Node>();\n stack.push(root);\n // Node newNode = root;\n\n while (stack.empty() == false) {\n Node mynode = stack.peek();\n result.add(mynode.data);\n //System.out.print(mynode.data + \" \");\n stack.pop();\n\n if (mynode.right != null) {\n stack.push(mynode.right);\n }\n if(mynode.left != null){\n stack.push(mynode.left);\n }\n\n }\n return result;\n }", "public void inorder()\n {\n inorderRec(root);\n }", "@Override\n public boolean hasPrevious()\n {\n if(left == null)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "private void inOrderTraversalRec(final Node root){\n if(root == null){\n return;\n }\n inOrderTraversalRec(root.getLeft());\n System.out.print(root.getData() + \" \");\n inOrderTraversalRec(root.getRight());\n }", "void inorder(Node root) {\n\t\tboolean leftdone = false;\n\n\t\t// Start traversal from root\n\t\twhile (root != null) {\n\t\t\t// If left child is not traversed, find the\n\t\t\t// leftmost child\n\t\t\tif (!leftdone) {\n\t\t\t\twhile (root.left != null) {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Print root's data\n\t\t\tSystem.out.print(root.data + \" \");\n\n\t\t\t// Mark left as done\n\t\t\tleftdone = true;\n\n\t\t\t// If right child exists\n\t\t\tif (root.right != null) {\n\t\t\t\tleftdone = false;\n\t\t\t\troot = root.right;\n\t\t\t}\n\n\t\t\t// If right child doesn't exist, move to parent\n\t\t\telse if (root.parent != null) {\n\t\t\t\t// If this node is right child of its parent,\n\t\t\t\t// visit parent's parent first\n\t\t\t\twhile (root.parent != null && root == root.parent.right)\n\t\t\t\t\troot = root.parent;\n\n\t\t\t\tif (root.parent == null)\n\t\t\t\t\tbreak;\n\t\t\t\troot = root.parent;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t}\n\t}", "public Node getSuccessor(Node element) {\r\n\t\tNode successor = null;\r\n\t\tif (element.getRightChild() != null) {\r\n\t\t\tsuccessor = element.getRightChild();\r\n\t\t\tif (successor.getLeftChild() == null) {\r\n\t\t\t\tsuccessor = element.getRightChild();\r\n\t\t\t} else {\r\n\t\t\t\twhile (successor.getLeftChild() != null) {\r\n\t\t\t\t\tsuccessor = successor.getLeftChild();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No right tree\");\r\n\t\t\tif (element.isRoot()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tsuccessor = element;\r\n\t\t\tSystem.out.println(\"-- \" + element.getKey());\r\n\t\t\tNode leftChild = successor.getParent().getLeftChild();\r\n\t\t\tif (leftChild == null) {\r\n\t\t\t\tleftChild = successor.getParent();\r\n\t\t\t}\r\n\t\t\twhile (!successor.getParent().equals(root) && !leftChild.equals(successor)) {\r\n\t\t\t\tSystem.out.println(\"In loop\");\r\n\t\t\t\tsuccessor = successor.getParent();\r\n\t\t\t\tleftChild = successor.getParent().getLeftChild();\r\n\t\t\t\tif (leftChild == null) {\r\n\t\t\t\t\tleftChild = successor.getParent();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (successor.getKey() > element.getKey()) {\r\n\t\t\t\tsuccessor = successor.getParent();\r\n\t\t\t} else {\r\n\t\t\t\tsuccessor = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn successor;\r\n\t}", "private void inOrderTraversal(int index) {\n // go through the graph as long as has values\n if (array[index] == null) {\n return;\n }\n //call recursively the method on left child\n inOrderTraversal(2 * index + 1);\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on right child\n inOrderTraversal(2 * index + 2);\n }", "private String traverseForToString() {\n\t\tif (this.root != null)\n\t\t\tpreorderTraverseForToString(this.root);\n\n\t\treturn this.order;\n\t}", "public String preorderTraverse(){\r\n\t\t\r\n\t\t//the recursive call to the private method\r\n\t\t//StringBuffer is used because it is passed by reference\r\n\t\t//StringBuffer can be changed in recursive calls\r\n\t\treturn preorderTraverse(this, new StringBuffer(\"\"));\r\n\t}", "public DNode getPrev() { return prev; }", "@Override\n @SuppressWarnings(\"Duplicates\")\n public V remove(K key) {\n TreeNode<KeyValuePair<K, V>> previous = root;\n TreeNode<KeyValuePair<K, V>> current = root;\n boolean smaller = false;\n V value = null;\n TreeNode<KeyValuePair<K, V>> result = null;\n int iter = 0;\n while(true) {\n if(current == null) {\n break;\n }\n// System.out.println(\"Iteration #\" + iter);\n// System.out.println(\"Previous = \" + previous.getValue());\n// System.out.println(\"Current = \" + current.getValue());\n if(key.compareTo(current.getValue().getKey()) < 0) {\n// System.out.println(\"Less\");\n smaller = true;\n previous = current;\n current = current.getLeft();\n } else if(key.compareTo(current.getValue().getKey()) > 0) {\n// System.out.println(\"Larger\");\n smaller = false;\n previous = current;\n current = current.getRight();\n } else if (key.equals(current.getValue().getKey())) {\n if(current.getValue().getKey() == previous.getValue().getKey()) {\n if(current.getLeft() == null && current.getRight() == null) root = null;\n else if(current.getLeft() == null && current.getRight() != null) root = root.getRight();\n else if(current.getLeft() != null && current.getRight() == null) root = root.getLeft();\n else if(current.getRight() != null && current.getLeft() != null) current.setValue(minVal(current));\n }\n// System.out.println(\"Found the value! key:val = \" + current.getValue().getKey()+\":\"+current.getValue().getValue());\n// System.out.println(\"Previous = \" + previous.getValue());\n result = current;\n break;\n }\n iter++;\n }\n if(result != null) {\n// System.out.println(\"not null result\");\n value = result.getValue().getValue();\n if(current.getLeft() == null && current.getRight() == null) {\n if(smaller) previous.setLeft(null);\n else previous.setRight(null);\n } else if(current.getLeft() != null && current.getRight() == null) {\n if(smaller) previous.setLeft(current.getLeft());\n else previous.setRight(current.getLeft());\n } else if(current.getLeft() == null && current.getRight() != null) {\n// System.out.println(\"Right not null\");\n// System.out.println(\"Previous = \" + previous.getValue());\n// System.out.println(\"Current = \" + current.getValue());\n if(smaller) previous.setLeft(current.getRight());\n else previous.setRight(current.getRight());\n } else {\n// System.out.println(\"Else\");\n current.setValue(minVal(current));\n }\n size--;\n return value;\n }\n return null;\n }", "private E[] getPreOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "private E[] getInOrderLeftSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "public List<List<Integer>> verticalTraversal(TreeNode root) {\n List<List<Integer>> res = new ArrayList<>();\n if (root == null) {\n return res;\n }\n Map<Integer, List<int[]>> map = new HashMap<>();// replace List<int[]> -> PriorityQueue<int[]>也可以\n Queue<Node> q = new ArrayDeque<>();\n q.offer(new Node(root, 0, 0));// node, x, y\n int minVal = Integer.MAX_VALUE, maxVal = Integer.MIN_VALUE;\n while (q.size() > 0) {\n Node cur = q.poll();\n TreeNode node = cur.node;\n int x = cur.x, y = cur.y;\n map.putIfAbsent(y, new ArrayList<>());\n map.get(y).add(new int[]{x, node.val});\n minVal = Math.min(minVal, y);\n maxVal = Math.max(maxVal, y);\n if (node.left != null) {\n q.offer(new Node(node.left, x + 1, y - 1));\n }\n if (node.right != null) {\n q.offer(new Node(node.right, x + 1, y + 1));\n }\n }\n for (int i = minVal; i <= maxVal; i++) {\n List<int[]> cur = map.get(i);\n Collections.sort(cur, (a, b) -> {\n if (a[0] == b[0]) {\n return a[1] - b[1];\n }\n return a[0] - b[0];// up first\n });\n List<Integer> temp = new ArrayList<>();\n for (int[] p : cur) {\n temp.add(p[1]);\n }\n res.add(temp);\n }\n return res;\n }", "private void traversePreOrder(BinaryNode<AnyType> curr, int indent) {\n\t\tfor(int i = 0; i < indent; i++) {\n\t\t\tSystem.out.print(\"\\t\");\n\t\t}\n\t\tSystem.out.println(curr.element);\n\t\tfor (int i = 0; i < curr.duplicate.size(); i++) {\n\t\t\tSystem.out.println(curr.duplicate.get(i).element);\n\t\t}\n\t\tif (curr.left != null) {\n\t\t\ttraversePreOrder(curr.left, indent + 1);\n\t\t}\n\n\t\tif (curr.right != null) {\n\t\t\ttraversePreOrder(curr.right, indent + 1);\n\t\t}\n\t}", "private int helper(List<List<Integer>> res, TreeNode root) {\n if (root == null) return -1;\n int left = helper(res, root.left);\n int right = helper(res, root.right);\n int curr = Math.max(left, right) + 1;\n if (res.size() == curr) res.add(new ArrayList<>());\n res.get(curr).add(root.val);\n return curr;\n }", "void inOrderTraversal(Node node){\r\n\t\tif( node == null ) {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tinOrderTraversal( node.left );\r\n\t\tSystem.out.print( node.value + \" \");\r\n\t\tinOrderTraversal( node.right );\r\n\t}", "private static void commonNodesIterInOrd(Node root1,Node root2)\n {\n if(root1 == null || root2 == null) return;\n \n LinkedList<Node> stack1 = new LinkedList<>();\n LinkedList<Node> stack2 = new LinkedList<>();\n \n Node n1 = root1, n2 = root2;\n \n while(true)\n {\n if(n1!=null)\n {\n stack1.push(n1); n1 = n1.left;\n }\n if(n2!=null)\n {\n stack2.push(n2); n2 = n2.left;\n } \n \n if(n1 == null && n2 == null)\n {\n if(stack1.size() == 0 || stack2.size() == 0)\n break;\n \n n1 = stack1.peekFirst(); n2 = stack2.peekFirst();\n \n if(n1.data < n2.data)\n {\n stack1.pop(); n1 = n1.right; n2 = null;\n }\n else if(n1.data > n2.data)\n {\n stack2.pop(); n2 = n2.right; n1 = null;\n }\n else\n {\n stack1.pop(); stack2.pop(); \n System.out.print(n1.data+\" \");\n n1 = n1.right; n2 = n2.right;\n }\n }\n }\n }", "void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }", "private static int nodeDepthsIterativeQueue(Node root) {\n\t\tQueue<Level>q = new LinkedList<>();\n\t\tint result = 0;\n\t\tq.add(new Level(root, 0));\n\t\twhile(!q.isEmpty()) {\n\t\t\tLevel curr = q.poll();\n\t\t\tif(curr.root == null)\n\t\t\t\tcontinue;\n\t\t\tresult += curr.depth;\n\t\t\tSystem.out.println(curr.toString());\n\t\t\tq.add(new Level(curr.root.left, curr.depth + 1));\n\t\t\tq.add(new Level(curr.root.right, curr.depth + 1));\n\t\t}\n\t\treturn result;\n\t}", "private int percolateUpLeaf(){\n\t\treturn percolateUp(heap.size()-1);// TODO: A one-line function that calls percolateUp()\n\t}", "public double getAscendingNode() {\n return ascendingNode;\n }", "@Test\n public void shouldDetectCycleWhenUpstreamLeavesAreAtDifferentLevels() {\n\n String g1 = \"g1\";\n String g2 = \"g2\";\n String p1 = \"p1\";\n String p2 = \"p2\";\n String p3 = \"p3\";\n String p4 = \"p4\";\n String p5 = \"p5\";\n String p6 = \"p6\";\n String current = \"current\";\n\n ValueStreamMap valueStreamMap = new ValueStreamMap(current, null);\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p4, p4), null, current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p3, p3), null, p4);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p2, p2), null, p3);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p1, p1), null, p2);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g1, g1, \"git\"), null, p1, new MaterialRevision(null));\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,2,\"2\"), current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p6, p6), new PipelineRevision(p6,1,\"1\"), p5);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,1,\"1\"), p6);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g2,g2,\"git\"), null, p5, new MaterialRevision(null));\n\n assertThat(valueStreamMap.hasCycle(), is(true));\n }", "public void traverseLevelOrder() {\n\t\tif (root == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tLinkedList<Node> ls = new LinkedList<>();\n\t\tls.add(root);\n\t\twhile (!ls.isEmpty()) {\n\t\t\tNode node = ls.remove();\n\t\t\tSystem.out.print(\" \" + node.value);\n\t\t\tif (node.left != null) {\n\t\t\t\tls.add(node.left);\n\t\t\t}\n\t\t\tif (node.right != null) {\n\t\t\t\tls.add(node.right);\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<K> inOrdorTraverseBST(){\n BSTNode<K> currentNode = this.rootNode;\n LinkedList<BSTNode<K>> nodeStack = new LinkedList<BSTNode<K>>();\n ArrayList<K> result = new ArrayList<K>();\n \n if (currentNode == null)\n return null;\n \n while (currentNode != null || nodeStack.size() > 0) {\n while (currentNode != null) {\n nodeStack.add(currentNode);\n currentNode = currentNode.getLeftChild();\n }\n currentNode = nodeStack.pollLast();\n result.add(currentNode.getId());\n currentNode = currentNode.getRightChild();\n }\n \n return result;\n }", "public void traverse(Node root){\n\t\tNode pred, current;\n\t\tcurrent=root;\n\t\tint rank=10;\n\t\tint rankCount=1;\n\t\twhile(current!=null){\n\t\t\tif(current.left==null){\n\t\t\t\tif(rankCount==rank){\n\t\t\t\t\t\tSystem.out.print(current.value+\" \");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trankCount++;\n\t\t\t\tcurrent=current.right;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpred=current.left;\n\t\t\t\twhile(pred.right!=null && pred.right!=current){\n\t\t\t\t\tpred=pred.right;\n\t\t\t\t}\n\n\t\t\t\tif(pred.right==null){\n\t\t\t\t\tpred.right=current;\n\t\t\t\t\tcurrent=current.left;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tpred.right=null;\n\t\t\t\t\tif(rankCount==rank){\n\t\t\t\t\t\tSystem.out.print(current.value+\" \");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trankCount++;\n\t\t\t\t\tcurrent=current.right;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Node<S> getPrev() { return prev; }", "public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n TreeNode cur = root;\n while (true) {\n if (cur.val > p.val && cur.val > q.val) cur = cur.left;\n else if (cur.val < p.val && cur.val < q.val) cur = cur.right;\n else return cur;\n }\n}", "private int leftChild(int i){return 2*i+1;}", "private int parent(int i){return (i-1)/2;}", "static ArrayList <Integer> levelOrder(Node root) \n {\n ArrayList<Integer> list=new ArrayList<>();\n Queue<Node> queue = new LinkedList<Node>(); \n queue.add(root); \n while (!queue.isEmpty()) \n { \n \n /* poll() removes the present head. \n For more information on poll() visit \n http://www.tutorialspoint.com/java/util/linkedlist_poll.htm */\n Node tempNode = queue.poll(); \n list.add(tempNode.data); \n \n /*Enqueue left child */\n if (tempNode.left != null) { \n queue.add(tempNode.left); \n } \n \n /*Enqueue right child */\n if (tempNode.right != null) { \n queue.add(tempNode.right); \n } \n }\n return list;\n }", "private void preOrderTraversalRec(final Node root){\n if(root == null){\n return;\n }\n System.out.print(root.getData() + \" \");\n preOrderTraversalRec(root.getLeft());\n preOrderTraversalRec(root.getRight());\n }", "public void inOrder() {\n inOrder(root);\n }", "public static void main(String[] args) {\n \n LinkedBinaryTree expr = new LinkedBinaryTree<String>();\n // a is the root of the tree\n Position a, b, c, d, e, f, g, h, i;\n a = expr.addRoot(\"*\");\n b = expr.addLeft(a, \"+\");\n c = expr.addLeft(b, \"/\");\n d = expr.addLeft(c, \"*\");\n e = expr.addLeft(d, \"+\");\n expr.addLeft(e, \"5\");\n expr.addRight(e, \"2\");\n f = expr.addRight(d, \"-\");\n expr.addLeft(f, \"2\");\n expr.addRight(f, \"1\");\n g = expr.addRight(c, \"+\");\n expr.addLeft(g, \"2\");\n expr.addRight(g, \"9\");\n h = expr.addRight(b, \"-\");\n i = expr.addLeft(h, \"-\");\n expr.addLeft(i, \"7\");\n expr.addRight(i, \"2\");\n expr.addRight(h, \"1\");\n expr.addRight(a, \"8\");\n \n System.out.println(\"The original expression:\");\n System.out.println(\"(((5+2)*(2–1)/(2+9)+((7–2)–1))*8)\\n\");\n \n System.out.println(\"Preorder traversal:\");\n Iterable<Position<String>> preIter = expr.preorder();\n for (Position<String> s : preIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Inorder traversal:\");\n Iterable<Position<String>> inIter = expr.inorder();\n for (Position<String> s : inIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Postorder traversal:\");\n Iterable<Position<String>> postIter = expr.postorder();\n for (Position<String> s : postIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Breadth traversal:\");\n Iterable<Position<String>> breadthIter = expr.breadthfirst();\n for (Position<String> s : breadthIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Parenthesized representation:\"); \n printParenthesize(expr, a);\n System.out.println();\n }" ]
[ "0.6039826", "0.6021008", "0.5938422", "0.59231526", "0.59216046", "0.5873527", "0.586764", "0.58506364", "0.58425975", "0.583327", "0.5822201", "0.5813169", "0.5801554", "0.57611024", "0.5751747", "0.57375765", "0.5734824", "0.5718054", "0.5717647", "0.5712643", "0.57123387", "0.5708722", "0.5700635", "0.56991243", "0.56963754", "0.5691826", "0.56702214", "0.56589764", "0.5655397", "0.56476396", "0.56379557", "0.56379396", "0.56379396", "0.56330425", "0.5624021", "0.5621379", "0.56139195", "0.5613139", "0.5610805", "0.56100076", "0.56072205", "0.56012535", "0.5591242", "0.55901194", "0.5582969", "0.5579846", "0.55794483", "0.55783105", "0.55778277", "0.5577008", "0.55695933", "0.55689275", "0.5564084", "0.5563356", "0.555676", "0.555461", "0.5554325", "0.55509084", "0.55509084", "0.55490077", "0.5546896", "0.55451125", "0.553793", "0.5533419", "0.5532441", "0.5532219", "0.5529004", "0.5522711", "0.55145603", "0.55136216", "0.5511907", "0.5509228", "0.55058974", "0.55036587", "0.55030686", "0.54978806", "0.5490839", "0.5489693", "0.5488432", "0.5482958", "0.5482081", "0.54820764", "0.54780704", "0.5477308", "0.5476111", "0.54740167", "0.5468438", "0.5468377", "0.54657716", "0.546362", "0.546064", "0.54575974", "0.54547876", "0.5450305", "0.5448156", "0.5447199", "0.54468584", "0.54461753", "0.54458576", "0.5444377", "0.54390603" ]
0.0
-1
/ TESTS / S:=[a]+b,; / S:='a',;
public static void main(String[] args) { Scan sc = new Scan(); while(!sc.getRule().isEmpty()) { Atom a = sc.scanThis(sc.getRule(),""); System.out.println(a.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void macroParseTest1() throws TapisException\n {\n var s = \"$varname\";\n var m = _pattern.matcher(s);\n var b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"varname\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), s, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname ,/path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname , /path/name \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), \"/path/name\", \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname \";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, true, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.groupCount(), 3, \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(1), \"$varname\", \"Failed on \\\"\"+ s + \"\\\"\");\n Assert.assertEquals(m.group(3), null, \"Failed on \\\"\"+ s + \"\\\"\");\n\n s = \"$varname,\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n \n s = \"$varname /path/name\";\n m = _pattern.matcher(s);\n b = m.matches();\n Assert.assertEquals(b, false, \"Failed on \\\"\"+ s + \"\\\"\");\n }", "@Test\n public void addMultipleNonEmptyTest() {\n Set<String> s = this.createFromArgsTest(\"zero\", \"three\");\n Set<String> sExpected = this.createFromArgsRef(\"zero\", \"one\", \"two\",\n \"three\");\n\n s.add(\"two\");\n s.add(\"one\");\n\n assertEquals(sExpected, s);\n }", "@Test\n public final void whenSemicolonDelimiterIsSpecifiedThenItIsUsedToSeparateNumbers() {\n assertEquals(3+6+15, StringCalculator.add(\"//;\\n3;6;15\"));\n }", "@Test\n\tpublic void test3()\n\t{\n\t\tassertEquals(\n\t\t\t\"$1: (spacex|spx)\\n\" +\n\t\t\t\"$webpage: {<a=$1> b=reddit}\",\n\t\t\texplodeRulesAndCreateString(\"webpage: a=(spacex|spx) b=reddit\")\n\t\t);\n\t}", "@Test\n public final void test1() {\n assertEquals(3+6+15, StringCalculator.add(\"//;\\n3;6;15\"));\n }", "@Test\n public void shouldReplaceSign() {\n Assert.assertThat(\"match any digits\", CharMatcher.is('$').trimAndCollapseFrom(\"$$ this is $ test $$\",'x'),containsString(\" this is x test \"));\n Assert.assertThat(\"match any digits\", CharMatcher.is('$').or(CharMatcher.is(' ')).trimFrom(\"$$ this is $ test $$\"),equalTo(\"this is $ test\"));\n }", "public static void main(String[] args) {\n\t\t Pattern p = Pattern.compile(\"(a+)\");\r\n\t\t Matcher m = p.matcher(\"aaaaaba\");\r\n\t\t //System.out.println(m.matches())\r\n\t\t m.find();\t\t \r\n\t\t m.find();\r\n\t\t System.out.println(\"grCount \"+m.groupCount());\t \r\n\t\t MatchResult mr = m.toMatchResult();\r\n\t\t \r\n\t\t System.out.println(m.end());\r\n\t\t System.out.println(\"'\"+mr.group()+\"'\");\r\n\t\t System.out.println(\"start \"+mr.start(1));\r\n\t\t \r\n\t}", "@Test\n public void delims() {\n }", "@Test\n\t public void test2()\n\t{\n\t\t\tString s = new String(\"abcdefg\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"\", LRS.lrs(s)); \n\t}", "@Test\n public void testOptimise_8() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(b|a)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(c|d)*|(d|c)*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|d)*\");\n\n }", "@Test\n public void addNonEmptyTest() {\n Set<String> s = this.createFromArgsTest(\"zero\", \"one\", \"three\");\n Set<String> sExpected = this.createFromArgsRef(\"zero\", \"one\", \"two\",\n \"three\");\n\n s.add(\"two\");\n\n assertEquals(sExpected, s);\n }", "public void test() {\r\n PropertiesSubstitutor ps = new PropertiesSubstitutor(MockParametersCallbacks.NAME);\r\n\r\n char[] fillC = new char[1000];\r\n Arrays.fill(fillC, '-');\r\n String fill = new String(fillC);\r\n\r\n String line = \"Text ${subst1} $subst2 \" + fill + \":$end //\";\r\n String exp = \"Text subst1 subst2 \" + fill + \":end //\";\r\n\r\n for (int i = 0; i < 100000; i++) {\r\n String s = ps.substitute(line);\r\n assertEquals(exp, s);\r\n }\r\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(u\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n SystemInUtil.addInputLine(\"%I\");\n streamTokenizer0.ordinaryChars((-4), (-4));\n SystemInUtil.addInputLine(\"jsutil>>stringtokenizer\");\n streamTokenizer0.ordinaryChar((-4));\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n stringReader0.reset();\n streamTokenizer1.sval = \"O+{,>!q=l-@]>\";\n SystemInUtil.addInputLine(\"0(u\");\n streamTokenizer1.wordChars(96, (-4));\n JSTerm jSTerm0 = new JSTerm(streamTokenizer1);\n streamTokenizer0.lowerCaseMode(false);\n streamTokenizer0.eolIsSignificant(true);\n streamTokenizer1.quoteChar((-4));\n streamTokenizer0.commentChar((-2));\n SystemInUtil.addInputLine((String) null);\n stringReader0.reset();\n StringReader stringReader1 = new StringReader(\"%I\");\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF((JSSubstitution) null);\n assertEquals(10, jSPredicateForm0.capacity());\n }", "@Test\n\tpublic void common() {\n\t\tString testString = \"Monday,Tuesday,Thursday,Friday,,\";\n\t\tIterable<String> parts = Splitter.on(\",\").split(testString);\n\t\tfor (String s : parts)\n\t\t\tSystem.out.println(s);\n\t}", "@Test\n\t public void test3()\n\t{\n\t\t\tString s = new String();\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"\", LRS.lrs(s)); \n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"[aT&d;~c\\\"\");\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSPredicateForm0);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm1 = jSTerm0.clonePF();\n JSPredicateForm jSPredicateForm2 = jSPredicateForm1.standarizerPredicateForm();\n JSPredicateForm jSPredicateForm3 = jSPredicateForm0.clonePF();\n jSPredicateForm3.removeAllElements();\n jSSubstitution0.addAll((Collection) jSPredicateForm3);\n JSPredicateForm jSPredicateForm4 = jSPredicateForm1.applySubstitutionPF(jSSubstitution0);\n JSSubstitution jSSubstitution1 = jSPredicateForm4.matches(jSPredicateForm2, jSSubstitution0);\n jSTerm1.firstElement();\n jSPredicateForm1.equals((JSPredicateForm) jSTerm0);\n boolean boolean0 = jSTerm0.equals((JSPredicateForm) jSTerm0);\n assertFalse(boolean0);\n \n jSPredicateForm4.clonePF();\n jSPredicateForm1.applySubstitutionPF(jSSubstitution0);\n jSPredicateForm4.matches(jSPredicateForm2, jSSubstitution1);\n assertFalse(jSSubstitution1.fail());\n assertEquals(\"[[aT&d;~c\\\", [[[aT&d;~c\\\"]]]\", jSPredicateForm1.toString());\n assertTrue(jSPredicateForm1.equals((Object)jSPredicateForm2));\n }", "private static void addInitialValues(final List<String> result, final String text)\n {\n int pos = 0;\n int sep = SimProposal.nextSep(text, pos);\n while (sep >= 0)\n {\n result.add(text.substring(pos, sep).trim());\n pos = sep + 1;\n sep = SimProposal.nextSep(text, pos);\n }\n // Handle remaining \"xyz\" or \"xyz)\"\n if (pos < text.length())\n {\n final String rest = text.substring(pos);\n sep = rest.lastIndexOf(')');\n if (sep < 0)\n result.add(rest.trim());\n else\n result.add(rest.substring(0, sep).trim());\n }\n }", "@Test\n\tpublic void test1 ()\n\t{\n\t\t\tString s = new String(\"aaaaaaaaa\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t\t\tassertEquals(\"aaaaaaaa\", LRS.lrs(s)); \n\t}", "private void initOperators(Set<String> s) {\n\t\ts.add(\"=\");\n\t\ts.add(\"+\");\n\t\ts.add(\"-\");\n\t\ts.add(\"*\");\n\t\ts.add(\"/\");\n\t\ts.add(\"(\");\n\t\ts.add(\")\");\n\t\ts.add(\";\");\n }", "@Test\n public void testOptimise_2() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a+++++++++++++++++++++\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a+\");\n }", "@Test\n void multiConstruct() {\n var multicons = \"(define conCar_a (cons 1 2))(define conCar_b (cons 3 conCar_a))(define conCar_c (cons conCar_b 4))(define conCar_d (cons conCar_b conCar_c))\";\n Main.parseInputString(multicons);\n assertEquals(\"(3 1 . 2)\", Main.parseInputString(\"(display (car conCar_d)) \"));\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public void testSchemeConstructor(){\n try{\n try{\n StringReader sr = new StringReader(\"\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme = new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"==(A,B,C\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme = new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme = new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme = new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A()\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A('a')\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n\n try{\n StringReader sr = new StringReader(\"A(A B)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(X,)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(X,X)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(X,Y,Y)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(X,Y,Z,X,Q)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(X,Y,Z,Q,X)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(Y,X,Z,X,Q)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(Y,X,Z,Q,X)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(X,X,Z,Y,Q)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(Y,Q,Z,X,X)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n try{\n StringReader sr = new StringReader(\"A(X,X,X,X,X)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme =\n new ExtendedScheme(lex);\n assertTrue(false);\n }catch(ParserException e){\n assertTrue(true);\n };\n\n StringReader sr = new StringReader(\"Apple(Id1)\");\n Lex lex = new Lex(sr);\n ExtendedScheme scheme = new ExtendedScheme(lex);\n ArrayList<Node> nodes = scheme.getNodes();\n assertTrue(nodes.get(0) instanceof Identifier);\n assertTrue(((Token)nodes.get(0)).getValue().equals(\"Id1\"));\n assertTrue(scheme.getName().getValue().equals(\"Apple\"));\n assertTrue(scheme.toString().equals(\"Apple(Id1)\"));\n\n sr = new StringReader(\"M(Id1,\\n Id2)\");\n lex = new Lex(sr);\n scheme = new ExtendedScheme(lex);\n nodes = scheme.getNodes();\n assertTrue(nodes.size() == 2);\n assertTrue(nodes.get(0) instanceof Identifier);\n assertTrue(nodes.get(1) instanceof Identifier);\n assertTrue(((Token)nodes.get(0)).getValue().equals(\"Id1\"));\n assertTrue(((Token)nodes.get(1)).getValue().equals(\"Id2\"));\n assertTrue(scheme.getName().getValue().equals(\"M\"));\n assertTrue(scheme.toString().equals(\"M(Id1,Id2)\"));\n\n sr = new StringReader(\"List(Name1,\\n Name2,\\n Name3)\");\n lex = new Lex(sr);\n scheme = new ExtendedScheme(lex);\n nodes = scheme.getNodes();\n assertTrue(nodes.size() == 3);\n assertTrue(nodes.get(0) instanceof Identifier);\n assertTrue(nodes.get(1) instanceof Identifier);\n assertTrue(nodes.get(2) instanceof Identifier);\n assertTrue(((Token)nodes.get(0)).getValue().equals(\"Name1\"));\n assertTrue(((Token)nodes.get(1)).getValue().equals(\"Name2\"));\n assertTrue(((Token)nodes.get(2)).getValue().equals(\"Name3\"));\n assertTrue(scheme.getName().getValue().equals(\"List\"));\n assertTrue(scheme.toString().equals(\n \"List(Name1,Name2,Name3)\"));\n }catch(ParserException e){\n System.out.println(\n \"ERROR in SchemeTest.testSchemeConstructor\\n\" +\n \" should not get here.\\n\" +\n \" error = \" + e.getMessage());\n };\n }", "@Test\n\tpublic void test6()\n\t{\n\t\tassertEquals(\n\t\t\t\"$1: {<web> page}\\n\" +\n\t\t\t\"$2: (webpage|$1)\\n\" +\n\t\t\t\"$webpage: {<spacex> $2}\",\n\t\t\texplodeRulesAndCreateString(\"webpage: spacex (webpage|(web page))\")\n\t\t);\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "private String rebef(String s, char a, char b){\n\t\t\tStringBuilder tmp = new StringBuilder();\t\t\n\t\t\tboolean copy = true;\n\t\t\tfor (int i = 0; i < s.length(); ++i){\n\t\t\t\tif(s.charAt(i) == a) copy = false;\n\t\t\t\tif(copy) tmp.append(s.charAt(i));\n\t\t\t\tif(s.charAt(i) == b) copy = true;\n\t\t\t}\n\t\t\treturn tmp.toString();\n\t\t}", "@Test(timeout = 4000)\n public void test41() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "@Test(timeout = 4000)\n public void test141() throws Throwable {\n StringReader stringReader0 = new StringReader(\"m5e,Sda5B,s'H\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(2, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(\",\", token0.toString());\n }", "static void sbb_with_reg(String passed){\n\t\tint subt = hexa_to_deci(registers.get('A'));\n\t\tint mult = hexa_to_deci(registers.get(passed.charAt(4)));\n\t\tmult++;\n\t\tmult%=256;\n\t\tmult = 256-mult;\n\t\tmult%=256;\n\t\tsubt+=mult;\n\t\tCS = subt>255?true:false;\n\t\tregisters.put('A', decimel_to_hexa_8bit(subt));\n\t\tmodify_status(registers.get('A'));\n\t}", "static Rule parse(String s) {\n var arr = s.split(\" bags contain \");\n var left = arr[0];\n var right = List.of(arr[1].split(\", \"));\n return new Rule(left, right.map(Bags::parse).filter(bag -> bag != null));\n }", "@Test\r\n\tpublic void testListArg() {\r\n\t\tAssert.assertEquals(\"test[(`a,`b,`c)]\", new FunctionImpl.FunctionBuilderImpl(\"test\").param(SymbolValue.froms(\"a\", \"b\", \"c\")).build().toQ());\r\n\t}", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "@Test\n public void removeDuplicatesFromString() {\n\n assertEquals(\"IAMDREW\", Computation.removeDuplicates(\"IIIAAAAMDREEEWW\"));\n }", "public Expression setRegexTest(Expression exp, Expression test){\r\n\t\tregexExpr.put(exp, test);\r\n\t\tExpression tt = Term.function(Term.TEST);\r\n\t\ttt.setExpr(test);\r\n\t\tExpression seq = sequence(exp, tt);\r\n\t\treturn seq;\r\n\t}", "@Test\r\n \tpublic void testQualifiedValues2() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = false;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n //\t\t// Line 15\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.2\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 16\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.3\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 17-18\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.4\");\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,\\\"Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74\\n\" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote\\nValue91,Value92\\n\\\"ValueA1\\\",ValueA2\\\"\\nValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1 Value44.2 Value44.3 Value44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1 Value54.2 Value54.3 Value54.4,\\\"Value55.1,Value55.2 Value55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1 Value64.2 Value64.3 Value64.4,\\\"Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74 \" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote Value91,Value92 \\\"ValueA1\\\",ValueA2\\\" ValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t}", "public static void main(String[] args) {\n\n String[] split = \"hjhk***jklj,j\\nkl\".split(quote(\"***\") + \"|,\");\n for (String every : split)\n System.out.println(\"test slpit: \" + every);\n// Pattern p = Pattern.compile(\"\\\\[([^\\\\]]+)\\\\]\");\n// Matcher m = p.matcher(\"[***]\");\n// while(m.find()) {\n// System.out.println(m.group(0));\n// }\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "@Test\n public void shouldCollapseAllDigitsByX(){\n Assert.assertThat(\"match any digits\",CharMatcher.DIGIT.replaceFrom(\"123TT T4\",\"x\"),is(\"xxxTT Tx\"));\n Assert.assertThat(\"match any digits\",CharMatcher.DIGIT.or(CharMatcher.WHITESPACE).replaceFrom(\"123TT T4\", \"x\"),is(\"xTTxTx\"));\n }", "@Test\r\n public void addAllFromSetWithStrings() throws Exception {\r\n TreeSet<String> s = new TreeSet<>();\r\n s.addAll(sStr);\r\n assertTrue(s.contains(\"kek\"));\r\n assertTrue(s.contains(\"lel\"));\r\n assertTrue(s.contains(\"lol\"));\r\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(u\");\n stringReader0.reset();\n stringReader0.ready();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer1);\n stringReader0.reset();\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n StringReader stringReader1 = new StringReader(\"call\");\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader1);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader1);\n streamTokenizer4.nextToken();\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader1);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer2);\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader1);\n streamTokenizer7.slashStarComments(true);\n streamTokenizer2.commentChar((-4));\n boolean boolean0 = jSTerm1.equals((JSPredicateForm) jSTerm0);\n assertTrue(boolean0);\n \n StringReader stringReader2 = new StringReader(\"c}^$\");\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader2);\n boolean boolean1 = jSTerm1.equals((JSPredicateForm) null);\n assertFalse(boolean1);\n }", "@Test\n\tpublic void test_StringCalculator_WhenMultipleDigitsUsed_ThenReturmSum() {\n\t\tAssert.assertEquals(10, calc.Add(\"1,2,3,2,2\"));\n\t}", "public static void TestRegex()\n\t{\n\t String line = \" if( aaa&&(ypbreg))\";\n\t String pattern = \"(&&)\\\\s*\\\\(*\\\\s*!?ypbreg\\\\)*\";\n\t // Create a Pattern object\n\t Pattern r = Pattern.compile(pattern);\n\t System.out.println(line.contains(pattern));\n\t // Now create matcher object.\n\t Matcher m = r.matcher(line);\n\t if (m.find( )) {\n\t // System.out.println(\"Found value: \" + m.group(0) );\n\t int count = m.groupCount();\n\t System.out.println(\"group count is \"+count);\n\t for(int i=0;i<count;i++){\n\t System.out.println(m.group(i));\n\t }\n\t // System.out.println(line.replaceFirst(BregPattern.pEqualTrue1, \"!$1\"));\n\n\t } else {\n\t System.out.println(\"NO MATCH\");\n\t }\n\t}", "public void addAll(String s){\n this.split(s,sp,items);\n }", "@Test\n\tpublic void phraseConcatTest() {\n\t\tString query1 = \"\\\" hello my \\\"\";\n\t\tString query2 = \"\\\" I am the king \\\"\";\n\t\tString query3 = \"\\\" yes you are \\\" \";\n\t\t\n\t\tString query1Result = \"hello+my\";\n\t\tString query2Result = \"I+am+the+king\";\n\t\tString query3Result = \"yes+you+are\";\n\t\t\n\t\tassertEquals(query1Result, queryTest.fixPhrases(query1));\n\t\tassertEquals(query2Result, queryTest.fixPhrases(query2));\n\t\tassertEquals(query3Result, queryTest.fixPhrases(query3));\n\t}", "@Test(timeout = 4000)\n public void test56() throws Throwable {\n String string0 = SQLUtil.normalize(\")]*/f/f2Nx{fI.* \", false);\n assertEquals(\") ] */ f / f2Nx { fI.*\", string0);\n }", "public static void main(String[] args) {\n\t\tString record =\"px123,kingstone,340,1|3|4|1\";\n\t\tString record1 =\"px125,electronics,storege,pendrive,kingstone,340,1|3|4|1\";\n\t\tString record2 =\"px125,electronics,storege,pendrive,kingstone,340\";\n\t\tString what = \"\\\\d+,(\\\\d\\\\|*)+$\";\n\t\tPattern p=Pattern.compile(what);\n\t\tMatcher m=p.matcher(record);\n\t\tif(m.find())\n\t\t{\n\t\t\tSystem.out.println(\"correct\");\n\t\t\tString str[]=m.group().split(\",\");\n\t\t\tSystem.out.println(str[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"wrong\");\n\t\t}\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm();\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer4.pushBack();\n streamTokenizer0.nval = 1.0;\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.slashSlashComments(false);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "@Test\n void doubleConstructInConstruct() {\n assertEquals(\"(1 . 2)\", Main.parseInputString(\"(display (car (cons (cons 1 2) (cons 3 4))))\"));\n }", "@Parameters\n\tpublic static Collection<Object[]> firstValues() {\n\t\tList<Pattern> mceJTD_1 = new LinkedList<Pattern>();\n\t\tmceJTD_1.add(Pattern.compile(\"(.+\\\\.)?Comparator\\\\<String\\\\> stringVar_2 = atr1\\\\.trim\\\\(\\\\)\\\\.CASE_INSENSITIVE_ORDER; //mutGenLimit 0\"));\n\t\tmceJTD_1.add(Pattern.compile(\"(.+\\\\.)?String stringVar_3 = stringMethod_3\\\\( 1, 2 \\\\)\\\\.concat\\\\( \\\"lalala\\\" \\\\)\\\\.intern\\\\(\\\\); //mutGenLimit 0\"));\n\t\tmceJTD_1.add(Pattern.compile(\"(.+\\\\.)?Comparator\\\\<String\\\\> stringVar_4 = stringMethod_4\\\\( 1, 2 \\\\)\\\\.CASE_INSENSITIVE_ORDER; //mutGenLimit 0\"));\n\t\tProperty propJTD_1 = new Property(MutationOperator.JTD,\n\t\t\t\t\t\t\t\t\t\t\t\"test/JTD_1\",\n\t\t\t\t\t\t\t\t\t\t\t\"radiatedMethod\",\n\t\t\t\t\t\t\t\t\t\t\t3,\n\t\t\t\t\t\t\t\t\t\t\t3,\n\t\t\t\t\t\t\t\t\t\t\tmceJTD_1,\n\t\t\t\t\t\t\t\t\t\t\tTestingTools.NO_PATTERN_EXPECTED);\n\t\t\n\t\t/*\n\t\t * Original code\n\t\t * \n\t\t * \tComparator<String> stringVar_2 = this.atr1.trim().CASE_INSENSITIVE_ORDER; //mutGenLimit 1\n\t\t *\tString stringVar_3 = this.stringMethod_3(1, 2); //mutGenLimit 1\n\t\t *\tString stringVar_4 = this.atr2; //mutGenLimit 1\n\t\t *\tString stringVar_5 = this.atr2; //mutGenLimit 1\n\t\t *\n\t\t */\n\t\tList<Pattern> mceJTD_2 = new LinkedList<Pattern>();\n\t\tmceJTD_2.add(Pattern.compile(\"(.+\\\\.)?Comparator\\\\<String\\\\> stringVar_2 = atr1\\\\.trim\\\\(\\\\)\\\\.CASE_INSENSITIVE_ORDER; //mutGenLimit 0\"));\n\t\tmceJTD_2.add(Pattern.compile(\"(.+\\\\.)?String stringVar_3 = stringMethod_3\\\\( 1, 2 \\\\); //mutGenLimit 0\"));\n\t\tmceJTD_2.add(Pattern.compile(\"(.+\\\\.)?String stringVar_4 = atr2; //mutGenLimit 0\"));\n\t\tmceJTD_2.add(Pattern.compile(\"(.+\\\\.)?String stringVar_5 = atr2; //mutGenLimit 0\"));\n\t\tProperty propJTD_2 = new Property(MutationOperator.JTD,\n\t\t\t\t\t\t\t\t\t\t\t\"test/JTD_2\",\n\t\t\t\t\t\t\t\t\t\t\t\"radiatedMethod\",\n\t\t\t\t\t\t\t\t\t\t\t4,\n\t\t\t\t\t\t\t\t\t\t\t4,\n\t\t\t\t\t\t\t\t\t\t\tmceJTD_2,\n\t\t\t\t\t\t\t\t\t\t\tTestingTools.NO_PATTERN_EXPECTED);\n\t\t\n\t\t\n\t\t/*\n\t\t * Original code\n\t\t * \n\t\t * \tint var1 = this.field1; //mutGenLimit 2\n\t\t *\tint var2 = this.method1(field1, field2); //mutGenLimit 2\n\t\t *\tint var3 = this.method1(this.field1, field2); //mutGenLimit 2\n\t\t *\tint var4 = this.method1(this.method1(this.field1, this.method2(this.field2, this.field3)), 0); //mutGenLimit 2\n\t\t *\treturn this.method1(this.field1, var5); //mutGenLimit 2\n\t\t * \n\t\t */\n\t\tList<Pattern> mceJTD_3 = new LinkedList<Pattern>();\n\t\tmceJTD_3.add(Pattern.compile(\"int var1 = field1; //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var2 = method1\\\\( field1, field2 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var3 = method1\\\\( this\\\\.field1, field2 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var3 = this\\\\.method1\\\\( field1, field2 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var4 = method1\\\\( this\\\\.method1\\\\( this\\\\.field1, this\\\\.method2\\\\( this\\\\.field2, this\\\\.field3 \\\\) \\\\), 0 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var4 = this\\\\.method1\\\\( method1\\\\( this\\\\.field1, this\\\\.method2\\\\( this\\\\.field2, this\\\\.field3 \\\\) \\\\), 0 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var4 = this\\\\.method1\\\\( this\\\\.method1\\\\( field1, this\\\\.method2\\\\( this\\\\.field2, this\\\\.field3 \\\\) \\\\), 0 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var4 = this\\\\.method1\\\\( this\\\\.method1\\\\( this\\\\.field1, method2\\\\( this\\\\.field2, this\\\\.field3 \\\\) \\\\), 0 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var4 = this\\\\.method1\\\\( this\\\\.method1\\\\( this\\\\.field1, this\\\\.method2\\\\( field2, this\\\\.field3 \\\\) \\\\), 0 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"int var4 = this\\\\.method1\\\\( this\\\\.method1\\\\( this\\\\.field1, this\\\\.method2\\\\( this\\\\.field2, field3 \\\\) \\\\), 0 \\\\); //mutGenLimit 1\"));\n\t\tmceJTD_3.add(Pattern.compile(\"\"));\n\t\tmceJTD_3.add(Pattern.compile(\"\"));\n\t\tProperty propJTD_3 = new Property(MutationOperator.JTD,\n\t\t\t\t\t\t\t\t\t\t\t\"test/JTD_3\",\n\t\t\t\t\t\t\t\t\t\t\t\"radiatedMethod\",\n\t\t\t\t\t\t\t\t\t\t\t12,\n\t\t\t\t\t\t\t\t\t\t\t12,\n\t\t\t\t\t\t\t\t\t\t\tmceJTD_3,\n\t\t\t\t\t\t\t\t\t\t\tTestingTools.NO_PATTERN_EXPECTED);\n\t\t\n\t\t//MUTANTS FOLDERS\n\t\tList<MutantInfo> mfJTD_1;\n\t\tList<MutantInfo> mfJTD_2;\n\t\tList<MutantInfo> mfJTD_3;\n\t\t\n\t\t//MUTANTS GENERATION\n\t\tmfJTD_1 = TestingTools.generateMutants(propJTD_1);\n\t\tmfJTD_2 = TestingTools.generateMutants(propJTD_2);\n\t\tmfJTD_3 = TestingTools.generateMutants(propJTD_3);\n\t\t\n\t\t//PARAMETERS\n\t\treturn Arrays.asList(new Object[][] {\n\t\t\t\t{propJTD_1, mfJTD_1},\n\t\t\t\t{propJTD_2, mfJTD_2},\n\t\t\t\t{propJTD_3, mfJTD_3},\n\t\t});\n\t}", "@Test(timeout = 4000)\n public void test149() throws Throwable {\n StringReader stringReader0 = new StringReader(\" ,(\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 71, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"(\", token0.toString());\n }", "@Test\n public void testParseRegexp_correctness1new()\n throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"(01|10)*1111\");\n assertEquals(re.toString(), \"(01|10)*1111\");\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n String string0 = SQLUtil.normalize(\"TiI~,Q-Hqtp'@\", true);\n assertEquals(\"TiI ~, Q - Hqtp '@'\", string0);\n }", "@Test\n\tpublic void explicitANDTest() {\n\t\tString query = \"hello goodbye\";\n\t\tString query2 = \"hello goodbye hello\";\n\t\tString query3 = \"( hello ( goodbye | hello bye ) )\";\n\t\t\n\t\tString queryResults = \"hello & goodbye\";\n\t\tString query2Results = \"hello & goodbye & hello\";\n\t\tString query3Results = \"( hello & ( goodbye | hello & bye ) )\";\n\n\t\tassertEquals(queryResults, String.join(\" \", queryTest.addExplicitAND(query.split(\" \"))));\n\t\tassertEquals(query2Results, String.join(\" \", queryTest.addExplicitAND(query2.split(\" \"))));\n\t\tassertEquals(query3Results, String.join(\" \", queryTest.addExplicitAND(query3.split(\" \"))));\n\t}", "@Test\r\n public void testRegexpSetInclusion() {\r\n rs.getRegexp(reString);\r\n stringSet.add(reString);\r\n assertTrue(rs.getRegexpSet().containsAll(stringSet));\r\n }", "@Test\r\n public void partialAndExactMatching() {\n\r\n eval( \"f <- function(fumble, fooey) { fumble ^ fooey } \");\r\n assertThat( eval( \"f(f = 3, fooey = 4)\"), equalTo( c(81) ) );\r\n }", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n String string0 = SQLUtil.normalize(\"renamed,k3__[c*z4nv8e@bl6\", true);\n assertEquals(\"renamed, k3__ [ c * z4nv8e @ bl6\", string0);\n }", "@Test\n\tpublic void testInterpolationSearch() {\n\t}", "@Test\n public void testOptimise_4() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)*\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)?\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"(a|b)*(a|b)+\");\n BasicRegexp re6 = BasicRegexp.parseRegexp(\"(a|b)+(a|b)?\");\n BasicRegexp re7 = BasicRegexp.parseRegexp(\"(a|b)?(a|b)+\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re6.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n assertEquals(re7.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(a|b)+\");\n }", "@Test\n public void LexerTest1() {\n String test = \"^^C B [ABC] %Hi \\r [GF_B] \\r % own line comment \\r\";\n for(Token t:(new Lexer(test)).getTokens()){\n System.out.println(t.type+\" : \"+t.value);\n }\n }", "public static void main(String args[]){\n \"abc\".chars().forEach(System.out::println);\n\n\n //breaks a String into sub-strings according to specified RegEx:\n Stream<String> stream =\n Pattern.compile(\", \").splitAsStream(\"a, b, c\");\n\n stream.forEach(System.out::println);\n\n }", "@Test\n public void testMatch() {\n assertMetrics(\"match:1\", \"a\",\"a\");\n assertMetrics(\"match:0.9339\",\"a\",\"a x\");\n assertMetrics(\"match:0\", \"a\",\"x\");\n assertMetrics(\"match:0.9243\",\"a\",\"x a\");\n assertMetrics(\"match:0.9025\",\"a\",\"x a x\");\n\n assertMetrics(\"match:1\", \"a b\",\"a b\");\n assertMetrics(\"match:0.9558\",\"a b\",\"a b x\");\n assertMetrics(\"match:0.9463\",\"a b\",\"x a b\");\n assertMetrics(\"match:0.1296\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x b\");\n assertMetrics(\"match:0.1288\",\"a b\",\"a x x x x x x x x x x x x x x x x x x x x x x x x x x x b\");\n\n assertMetrics(\"match:0.8647\",\"a b c\",\"x x a x b x x x x x x x x a b c x x x x x x x x c x x\");\n assertMetrics(\"match:0.861\", \"a b c\",\"x x a x b x x x x x x x x x x a b c x x x x x x c x x\");\n assertMetrics(\"match:0.4869\",\"a b c\",\"a b x x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.4853\",\"a b c\",\"x x a x b x x x x x x x x x x b a c x x x x x x c x x\");\n assertMetrics(\"match:0.3621\",\"a b c\",\"a x b x x x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3619\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x c x x\");\n assertMetrics(\"match:0.3584\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x c\");\n assertMetrics(\"match:0.3474\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x b x x x b x b x\");\n assertMetrics(\"match:0.3421\",\"a b c\",\"x x a x b x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.305\" ,\"a b c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n assertMetrics(\"match:0.2927\",\"a b!200 c\",\"x x a x b:0.7 x x x x x x x x x x x x x x x x x x x x x x\");\n }", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "public void addAll(String s,String sp){\n this.split(s,sp,items);\n }", "@Test\n\tpublic void ifYouEncounterEqualsThenThatsNotAPattern() {\n\t\tfinal Tokenizable line = line(\"=\");\n\t\tcontext.checking(new Expectations() {{\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing nested = parser.tryParsing(line);\n\t\tassertNull(nested);\n\t\tassertEquals(0, line.at());\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n SystemInUtil.addInputLine(\"UN..Ex0IyC7\");\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"[aT&d;~c\\\"\");\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSPredicateForm0);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm1 = jSTerm0.clonePF();\n JSPredicateForm jSPredicateForm2 = jSPredicateForm1.standarizerPredicateForm();\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n jSPredicateForm2.forEach(consumer0);\n SystemInUtil.addInputLine(\"[aT&d;~c\\\"\");\n SystemInUtil.addInputLine(\"7'GUR\");\n SystemInUtil.addInputLine(\"PL^\\\"T$L:8.ammp}+R{\");\n JSPredicateForm jSPredicateForm3 = new JSPredicateForm();\n Integer integer0 = new Integer((-1529));\n jSPredicateForm0.add((Object) integer0);\n jSPredicateForm1.print();\n System.setCurrentTimeMillis((-1018L));\n }", "public void parseTest(StringBuffer s){\n\t\tint i=0, j=0;\n\t\tInteger index;\n\t\tchar[] c = new char[8];\n\t\tString x;\n\t\t\n\t\tif (s.toString().contains(\"geoNear\")){\n\t\t\tPerformance.near=(new String(s)).substring(s.indexOf(\"{\"), s.lastIndexOf(\"}\")+1);\n\t\t\t\n\t\t\ts=new StringBuffer(Performance.near);\n\t\t\n\t\t\twhile (i<s.length()){\n\t\t\t\tif (s.charAt(i)=='§'){\n\t\t\t\t\tindex=i;\n\t\t\t\t\twhile (s.charAt(i)!=')'){\n\t\t\t\t\t\tif (s.charAt(i)!=' '){\n\t\t\t\t\t\t\tc[j]=s.charAt(i);\n\t\t\t\t\t\t\ts.deleteCharAt(i);\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t\ts.deleteCharAt(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\ts.deleteCharAt(i);\n\t\t\t\t\t\t\n\t\t\t\t\tx=(new String(c)).substring(0, j);\n\t\t\t\t\tPerformance.paramsM.add(x);\n\t\t\t\t\tPerformance.placesM.add(index);\n\t\t\t\t\tc=c.clone();\n\t\t\t\t\tj=0;\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\t\tPerformance.requestM = new StringBuffer(s);\n\t\t\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\tif (s.toString().contains(\"limit\"))\t{\n\t\t\tint a, b;\n\t\t\ta =s.lastIndexOf(\"(\");\n\t\t\tb=a+1;\n\t\t\twhile (s.charAt(b)!=')'){\n\t\t\t\tif (Character.isDigit(s.charAt(b)))\n\t\t\t\t\tPerformance.limit.append(s.charAt(b));\n\t\t\t\tb++;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tint l=3;\n\n\t\twhile (s.charAt(l)!='.'){\n\t\t\tPerformance.col.append(s.charAt(l));\n\t\t\tl++;\n\t\t}\n\t\n\t\tint k=s.indexOf(\"{\");\n\t\tk++;\n\t\twhile (s.charAt(k)!=':'){\n\t\t\tif (s.charAt(k)!=' '& s.charAt(k)!='\"'& s.charAt(k)!='\\'')\n\t\t\t\tPerformance.geoField.append(s.charAt(k));\n\t\t\tk++;\n\t\t}\n\t\n\t\tk++;\n\t\n\t\ts=new StringBuffer(s.substring(k, s.lastIndexOf(\"}\")));\n\t\t\n\t\twhile (i<s.length()){\n\t\t\tif (s.charAt(i)=='§'){\n\t\t\t\tindex=i;\n\t\t\t\twhile (s.charAt(i)!=')'){\n\t\t\t\t\tif (s.charAt(i)!=' '){\n\t\t\t\t\t\tc[j]=s.charAt(i);\n\t\t\t\t\t\ts.deleteCharAt(i);\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}else\n\t\t\t\t\t\ts.deleteCharAt(i);\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ts.deleteCharAt(i);\n\t\t\t\tx=(new String(c)).substring(0, j);\n\t\t\t\n\t\t\t\tPerformance.paramsM.add(x);\n\t\t\t\tPerformance.placesM.add(index);\n\t\t\t\tc=c.clone();\n\t\t\t\tj=0;\n\t\t\t}\n\t\t\telse\n\t\t\t\ti++;\n\t\t}\n\t\t\n\t\t\tPerformance.requestM = new StringBuffer(s);\n\t}\n}", "public boolean matchResult(String expected,String count){\r\n List<String> expected_Result=new ArrayList<String>();\r\n String s1[];\r\n if(expected.contains(\",\")){\r\n s1 =expected.split(\",\");\r\n for(int i=0;i<s1.length;i++){\r\n expected_Result.add(s1[i]);\r\n }\r\n }\r\n else if(expected.length()!=0){\r\n expected_Result.add(expected);\r\n }\r\n\r\n Boolean match=islistmatching(expected_Result,getResult());\r\n\r\n return match;\r\n\r\n }", "public void addAll(String s,String sp,boolean isMultiToken){\n this.split(s,sp,items,isMultiToken);\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n String string0 = SQLUtil.normalize(\"T/ayt.^*^>$)r\", false);\n assertEquals(\"T / ayt.^ * ^ > $) r\", string0);\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n String string0 = SQLUtil.normalize(\"Wk-M{)u04i&=ml]M\", false);\n assertEquals(\"Wk - M {) u04i & = ml ] M\", string0);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder(\"u\\\"lR>,*-okLM\");\n SQLUtil.addRequiredCondition(\"u\\\"lR>,*-okLM\", stringBuilder0);\n assertEquals(\"u\\\"lR>,*-okLM and u\\\"lR>,*-okLM\", stringBuilder0.toString());\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM = 3 m\", \"0xA0182\");\r\n }", "@Test\r\n public void deriveFromAndAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M&=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH&=9\", \"(long,km^2/h)\");\r\n }", "@Test\r\n public void deriveFromDoubleLeftAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M<<=9\", \"(int,m)\");\r\n //example with int m - char\r\n check(\"varI_M<<=\\'c\\'\", \"(int,m)\");\r\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n String string0 = SQLUtil.normalize(\"b}v&-;$$:Hw1:\", false);\n assertEquals(\"b } v & - ; $ $ : Hw1 :\", string0);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(u\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n streamTokenizer0.eolIsSignificant(true);\n streamTokenizer0.ordinaryChar((-1106826472));\n SystemInUtil.addInputLine(\"%;I\");\n streamTokenizer0.ordinaryChars((-4), (-4));\n SystemInUtil.addInputLine(\"jsutil>mst<ingtokengzer\");\n streamTokenizer0.ordinaryChar((-4));\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n stringReader0.reset();\n streamTokenizer1.sval = \"O+{,>!q=l-@]>\";\n JSTerm jSTerm0 = new JSTerm();\n JSPredicateForm jSPredicateForm0 = new JSPredicateForm();\n // Undeclared exception!\n try { \n jSTerm0.matches(jSPredicateForm0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0 >= 0\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void addAbbreviationsFromString(String s) {\n\t\tString[] abbreviationStrings = s.split(\"\\\\\\\\\");\n\t\tfor (String abbrevString : abbreviationStrings) {\n\t\t\tString[] valueStrings = abbrevString.split(\"=\");\n\t\t\tif (valueStrings.length == 2) {\n\t\t\t\taddAbbreviation(valueStrings[0], valueStrings[1]);\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n SystemInUtil.addInputLine((String) null);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer0.nval = 13.010465232034644;\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n JSSubstitution jSSubstitution2 = jSTerm0.matches((JSPredicateForm) jSTerm1);\n assertTrue(jSSubstitution2.fail());\n }", "@Test\n public void testSubSequence() {\n LOGGER.info(\"testSubSequence\");\n final AtomString atomString1 = new AtomString(\"Hello\");\n final CharSequence expected = \"el\";\n final CharSequence actual = atomString1.subSequence(1, 3);\n assertEquals(expected, actual);\n }", "static void ana_with_reg(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(registers.get(passed.charAt(4)));\n\t\tval1 = val1&val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}", "@Test\r\n \tpublic void testQualifiedValues() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = true;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,Value55.1,Value55.2\\nValue55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74\\n\" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote\\nValue91,Value92\\nValueA1,ValueA2\\nValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1 Value44.2 Value44.3 Value44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1 Value54.2 Value54.3 Value54.4,Value55.1,Value55.2 Value55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1 Value64.2 Value64.3 Value64.4,Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74 \" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote Value91,Value92 ValueA1,ValueA2 ValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t}", "@Test\n\t public void test4()\n\t{\n\t\t\t// String s = new String();\n\t // s = s.replaceAll(\"\\\\s+\", \" \");\n\t\t\tassertEquals(\"\", LRS.lcp(\"vcd\",\"cd\"));\n\t}", "private static HashSet<String> set(String... s)\r\n {\r\n return new HashSet<>(Arrays.asList(s));\r\n }", "public String visit(AndExpression n, String s) {\n n.f0.accept(this, null);\n n.f2.accept(this, null);\n return null;\n }", "@Test\n public void testOptimise_6() throws InvalidRegexpException {\n BasicRegexp re1 = BasicRegexp.parseRegexp(\"a|a|b\");\n BasicRegexp re2 = BasicRegexp.parseRegexp(\"b|a|a\");\n BasicRegexp re3 = BasicRegexp.parseRegexp(\"(b|b)*|(a|a)*|a*\");\n BasicRegexp re4 = BasicRegexp.parseRegexp(\"(c|b|b)*|(a|a)*|a*\");\n BasicRegexp re5 = BasicRegexp.parseRegexp(\"a*b*|a*b*\");\n\n assertEquals(re1.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a|b\");\n assertEquals(re2.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b|a\");\n assertEquals(re3.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"b*|a*\");\n assertEquals(re4.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"(c|b)*|a*\");\n assertEquals(re5.optimise(BasicRegexp.OPTIMISE_ALL, -1).toString(),\n \"a*b*\");\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer2);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer5.ordinaryChars((-4), 0);\n streamTokenizer1.parseNumbers();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm1 = new JSTerm();\n streamTokenizer0.commentChar(58);\n jSTerm0.equals((JSPredicateForm) jSTerm1);\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n assertFalse(streamTokenizer8.equals((Object)streamTokenizer6));\n }", "@Test\n public void testSubstitute() {\n System.out.println(\"substitute\");\n StringBuilder sb = new StringBuilder();\n String tag = \"__TAG__\";\n String content = \"aa __TAG__ cc\";\n boolean expResult = false;\n boolean result = ConnectionManager.substitute(sb, tag, content);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "public static void main(String[] args)\n {\n Pattern pattern = Pattern.compile(\"aba\");\n Matcher m = pattern.matcher(\"abababa\");\n //boolean find()//return true if found the pattern and go to the next sub sequence\n while(m.find()){\n System.out.print(m.start());//0 and 4 but not 2!\n System.out.print(m.end());//3 and 7 (return the position of the last char matched + 1)\n System.out.print(m.group());// = s.substring(m.start(), m.end());\n System.out.print(\"\\n\");\n }\n //what's append?\n //first occurence starts at 0, ends at 2 and aba\n //search for the second occurence from 3\n //second occurence starts at 4, ends at 6 and aba\n //search for the thrid occurence from 7\n \n System.out.print(\"========\\n\");\n \n //0-length matches\n Pattern pattern2 = Pattern.compile(\"a?\");\n Matcher m2 = pattern2.matcher(\"aba\");\n while(m2.find()){\n System.out.print(m2.start());//the char a is or not is at position 0,1,2 and 3\n System.out.print(m2.end());//1,1,3,3 ==> ?? @see page 500\n System.out.print(\"\\n\");\n }\n \n /** Expressions **/\n // \\d digit\n // \\s whitespace\n // \\w letters, digits or _\n // [abc] searching for a, b or c\n // [a-f] searching for a letter to f lettre included\n // [A-F] searching for A letter to F lettre included\n // [a-fA-F] search for a letter to f or A letter to F lettre included\n // 0 [x-X] search for 0 followed by x or X\n /** quantifiers **/\n //? Zero or one\n //* Zero or more\n //+ One or more\n// 0[x-X]+ => 0 followed by one x or one X\n// (0[x-X])+ => 0 followed by x or X one time\n \n //. = any char (whitespace is a char)\n //Escaping special char !!! . = any char, \\. = compilator error, \\\\. = .\n }", "public MyStringBuilder2 [] regMatch(String [] pats)\n\t{\n\t\t//System.out.print(\"hi\");\n\t\t\tMyStringBuilder2[] answers = new MyStringBuilder2[pats.length];\n\t\t\tMyStringBuilder2[] finals = new MyStringBuilder2[pats.length];\n\t\t\tfinals = recursiveArrayAdd(finals, pats, 0);\n\t\t\tif(finals[0] == null) {\n\t\t\t\tfinals = null;\n\t\t\t}\n\t\t\treturn finals;\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"[aT&d;~c\\\"\");\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSPredicateForm0);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm1 = jSTerm0.clonePF();\n JSPredicateForm jSPredicateForm2 = jSPredicateForm1.standarizerPredicateForm();\n JSPredicateForm jSPredicateForm3 = jSPredicateForm0.clonePF();\n jSPredicateForm3.removeAllElements();\n jSSubstitution0.addAll((Collection) jSPredicateForm3);\n JSPredicateForm jSPredicateForm4 = jSPredicateForm1.applySubstitutionPF(jSSubstitution0);\n JSSubstitution jSSubstitution1 = jSPredicateForm4.matches(jSPredicateForm2, jSSubstitution0);\n Object object0 = jSTerm1.firstElement();\n jSSubstitution1.add(object0);\n jSTerm0.equals((JSPredicateForm) jSTerm0);\n SystemInUtil.addInputLine(\"DeVC\");\n jSPredicateForm4.clonePF();\n jSTerm0.matches(jSPredicateForm3);\n jSPredicateForm1.applySubstitutionPF(jSSubstitution0);\n // Undeclared exception!\n try { \n jSPredicateForm4.matches(jSPredicateForm2, jSSubstitution1);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // umd.cs.shop.JSPredicateForm cannot be cast to umd.cs.shop.JSPairVarTerm\n //\n verifyException(\"umd.cs.shop.JSSubstitution\", e);\n }\n }", "@Test\n\tpublic void test4()\n\t{\n\t\tassertEquals(\n\t\t\t\"$webpage: {<spacex>}\",\n\t\t\texplodeRulesAndCreateString(\"webpage: spacex\")\n\t\t);\n\t}", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n String string0 = SQLUtil.normalize(\"^PcBSW[==qn/g\", true);\n assertEquals(\"^ PcBSW  [ = = qn / g\", string0);\n }", "private boolean STRING(String s) {\r\n int n = input.match(s, in);\r\n in += n;\r\n return (n > 0);\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString s = \"adceb\";\r\n\t\tString p = \"*a*b\";\r\n\t\t\r\n//\t\tString s = \"\";\r\n//\t\tString p = \"**\";\r\n\t\t\r\n\t\tSolution sln = new Solution();\r\n\t\t\r\n\t\tSystem.out.println(sln.isMatch(s, p));\r\n\r\n\t}", "@Test\n\tvoid testRemoveAllAdjacentDuplicatesInString() {\n\t\tRemoveAllAdjacentDuplicatesInString tester = new RemoveAllAdjacentDuplicatesInString();\n\t\tassertEquals(\"ca\", tester.removeDuplicates(\"abbaca\"));\n\t}", "@Test\n @Ignore\n public void testReplaceCommonSubexpression() throws Exception {\n\n checkPlanning( ProjectRemoveRule.INSTANCE, \"select d1.deptno from (select * from dept) d1, (select * from dept) d2\" );\n }" ]
[ "0.55405396", "0.52941954", "0.51996756", "0.517615", "0.51737756", "0.5132555", "0.51009715", "0.5042528", "0.50286335", "0.5027608", "0.50027096", "0.49942696", "0.49922594", "0.4992229", "0.49505928", "0.49422184", "0.49367246", "0.4935096", "0.49203965", "0.4914923", "0.49143696", "0.49114424", "0.49006432", "0.48967484", "0.4893336", "0.48847914", "0.48845845", "0.48830032", "0.48645744", "0.48587185", "0.4857789", "0.483307", "0.48298404", "0.48080853", "0.48074436", "0.48072627", "0.4805549", "0.4801057", "0.4776079", "0.47753122", "0.4774809", "0.47730914", "0.47719544", "0.47673362", "0.4762471", "0.4756238", "0.47548243", "0.47542122", "0.47526237", "0.47522286", "0.47473633", "0.4739228", "0.4737836", "0.4735175", "0.47335234", "0.47261938", "0.47217852", "0.47190702", "0.47190094", "0.47176462", "0.4716911", "0.47154963", "0.4713479", "0.47096702", "0.47019324", "0.470174", "0.46986455", "0.46976605", "0.46831474", "0.4682185", "0.46815416", "0.46811068", "0.46723092", "0.4668349", "0.46667144", "0.4662422", "0.4654608", "0.46433705", "0.46425247", "0.46389025", "0.4638326", "0.46372274", "0.46371597", "0.46351156", "0.46344754", "0.46311167", "0.46242425", "0.46228954", "0.46178952", "0.461697", "0.46132946", "0.46108323", "0.4609863", "0.46083426", "0.46080026", "0.46070412", "0.46018434", "0.4599258", "0.4595109", "0.4593657", "0.45905298" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.id
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getOrderItemId() {\n return orderItemId;\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public int getId() {\n return orderID;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public Integer\t\tgetOrderID();", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public int getOrderID() {\n return orderID;\n }", "public Long getItemId() {\r\n return itemId;\r\n }", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n stmt = Database.getDefaultConnection().createStatement();\n \n if(modalita == TRIGGER)\n rst = stmt.executeQuery(\"SELECT T.id_trigger FROM trigger1 T WHERE T.nomeTrigger = '\" + ogg + \"' AND T.schema = '\" + schema + \"'\");\n else\n rst = stmt.executeQuery(\"SELECT P.ID_procedura FROM Procedura P WHERE P.nomeProcedura = '\" + ogg + \"' AND P.schema = '\" + schema + \"'\");\n \n while(rst.next()){\n id = rst.getInt(1);\n }\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n \n return id;\n }", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public int getItemId() {\n return itemId;\n }", "public Integer getOrderId() {\n return orderId;\n }", "public long getItemShopBasketId();", "public Integer getId() {\n\t\treturn wishlistItemId;\n\t}", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public int getOrderID() {\r\n return emporderID;\r\n }", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "long getID(Object item);", "public String getOrderid() {\n return orderid;\n }", "public final ItemId getId() {\r\n return null;\r\n }", "public int getOrderId() {\n return orderId;\n }", "public int getOrderID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "int getItemId() {\n return m_itemId;\n }", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public int getItemID()\n {\n return itemID;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public String getItemId() {\r\n return itemId;\r\n }", "public String getOrderId(JsonObject order) {\r\n\t\tint orderID = 0;\r\n\t\tString customerId = order.get(\"customerId\").getAsString();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT * FROM home_heating_fuel_orders\" + \" WHERE customerID = '\" + customerId + \"';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\torderID = Math.max(rs.getInt(\"orderID\"), orderID);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t\treturn orderID + \"\";\r\n\t}", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public int getItemId() {\n\t\treturn id;\n\t}", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "public Integer getId() {\n return aao.getId();\n }", "public String getOrderID() {\n return this.orderID;\n }", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public String getBusinessOrderId() {\n return businessOrderId;\n }", "public String getOrderID() {return orderID;}", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "public String getItemId() {\n return itemId;\n }", "public static int insert(OrderItems order) {\r\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\r\n\r\n\t\tPreparedStatement insertStatement = null;\r\n\t\tint insertedId = -1;\r\n\t\ttry {\r\n\t\t\tinsertStatement = dbConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tinsertStatement.setInt(1, order.getIdOrder());\r\n\t\t\tinsertStatement.setString(2, order.getNumeClient());\r\n\t\t\tinsertStatement.setString(3, order.getDenumireProdus());\r\n\t\t\tinsertStatement.setInt(4, order.getCantitate());\r\n\t\t\tinsertStatement.executeUpdate();\r\n\r\n\t\t\tResultSet rs = insertStatement.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tinsertedId = rs.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println( \"OrderItemsDAO:insert \" + e.getMessage());\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.close(insertStatement);\r\n\t\t\tConnectionFactory.close(dbConnection);\r\n\t\t}\r\n\t\treturn insertedId;\r\n\t}", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "int getItemID();", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "public int getBId() {\n return instance.getBId();\n }", "private int getOrderId() {\n int orderId;\n try {\n if (orderIdField.getText().isEmpty()) {\n orderId = -1;\n }\n else {\n orderId = Integer.parseInt(orderIdField.getText());\n }\n } catch (NumberFormatException exc) {\n orderId = -1;\n }\n return orderId;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "io.dstore.values.IntegerValue getOrderPersonId();", "public String getItemID() {\n\t return this.itemID;\n\t}", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public Integer getId()\n\t{\n\t\treturn this.id; \n\t}", "public List<OrderItem> searchOrderItem(int idOrderItem) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, idOrderItem);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public Integer getId() {\r\n return this.id;\r\n }", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "int getBId();", "public int getBId() {\n return bId_;\n }", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "public int obtId() {\r\n\t\treturn id;\r\n\t}", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public Integer getId() { return this.id; }", "public Integer getId() {\n\t\treturn this.id;\n\t}", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}", "@Override\n\tpublic long getColumnId() {\n\t\treturn _expandoColumn.getColumnId();\n\t}", "public Integer getId(){\n\t\treturn id;\n\t}", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public int getC_OrderLine_ID();", "public int getOrder_code_id() {\n return order_code_id;\n }", "public Integer getOrderbyid() {\r\n return orderbyid;\r\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public long getBomItemKey() {\n\t\treturn bomItemKey;\n\t}", "public Integer getId() \r\n\t{\r\n\t\treturn id;\r\n\t}", "public long getShopBasketId();", "public String getOrdersId() {\n return ordersId;\n }", "public int geti_ordertrx_temp_ID();", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }" ]
[ "0.72451365", "0.71510136", "0.67039657", "0.6557137", "0.6239548", "0.61852527", "0.61324733", "0.6053348", "0.60450935", "0.60313255", "0.60313255", "0.6015891", "0.6010478", "0.5958181", "0.5947304", "0.5943278", "0.5938545", "0.59203106", "0.5914234", "0.5910364", "0.5897271", "0.58909005", "0.5882896", "0.5874101", "0.58667", "0.5850537", "0.5846703", "0.58358306", "0.5815593", "0.5807991", "0.5807991", "0.57932115", "0.5773977", "0.57711124", "0.57664526", "0.57524025", "0.57508206", "0.5748033", "0.5743724", "0.57420224", "0.5739383", "0.57393694", "0.5730199", "0.57172483", "0.5716045", "0.56999767", "0.56972176", "0.5692973", "0.56857914", "0.567952", "0.56746054", "0.56323457", "0.56261057", "0.56109875", "0.56050843", "0.55968726", "0.55968726", "0.55968726", "0.5595077", "0.55903536", "0.5585887", "0.5585855", "0.5570861", "0.5565643", "0.55578434", "0.55578434", "0.5547098", "0.553337", "0.5528981", "0.55248266", "0.552372", "0.5520003", "0.5520003", "0.5520003", "0.5520003", "0.55133724", "0.55073667", "0.5506393", "0.5498565", "0.5498565", "0.5496472", "0.54915416", "0.5484967", "0.5484301", "0.54785395", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777", "0.5465777" ]
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.id
public void setId(Long id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void setOrderID(int orderID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORDERID$0);\n }\n target.setIntValue(orderID);\n }\n }", "public int getId() {\n return orderID;\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "private void setBId(int value) {\n \n bId_ = value;\n }", "public void setOrderId(int value) {\n this.orderId = value;\n }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public void xsetOrderID(org.apache.xmlbeans.XmlInt orderID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(ORDERID$0);\n }\n target.set(orderID);\n }\n }", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "@JsonSetter(\"orderId\")\r\n public void setOrderId (int value) { \r\n this.orderId = value;\r\n }", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }", "public void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);", "void setItemId(String itemId);", "public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public String getOrderID() {return orderID;}", "public void setOrderbyid(Integer orderbyid) {\r\n this.orderbyid = orderbyid;\r\n }", "public int getOrderID() {\n return orderID;\n }", "public String getOrderid() {\n return orderid;\n }", "public int registerOrderItem(OrderItem i) {\n int ok = 0;\n try {\n String query = \"INSERT INTO order_Item (id_Order_Item, amount, product_id_Product, order_id_Order) VALUES (?, ?, ?, ?) ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n\n st.setInt(1, 0);\n st.setInt(2, i.getAmount());\n st.setInt(3, i.getProductIdProduct());\n st.setInt(4, i.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the insert\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "public void setItemShopBasketId(long itemShopBasketId);", "public Builder setItemId(long value) {\n \n itemId_ = value;\n onChanged();\n return this;\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int id) throws ItemException\n {\n if (id > 0)\n {\n this.id = id;\n }\n else\n {\n Throwable t = new Throwable(\n \"ERROR setId: the item's id value is not a valid positive integer.\");\n throw new ItemException(\"There was a problem with the item's id value to be set.\", t);\n }\n }", "public void setValues(PreparedStatement ps, int i) throws SQLException {\n String id = items.get(i).getTransactionId();\n ps.setString(1, id);\n\t\t\t\t}", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "public int getOrderId() {\n return orderId;\n }", "public Integer getOrderId() {\n return orderId;\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId == null ? null : orderId.trim();\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId == null ? null : orderId.trim();\n }", "public void setC_OrderLine_ID (int C_OrderLine_ID);", "public void setID(String idIn) {this.id = idIn;}", "public String getOrdersId() {\n return ordersId;\n }", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethodAndClear(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryWithClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check\r\n // the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "public void setOrderId(String orderId) {\n\t\tthis.orderId = orderId;\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId(int id)\r\n {\r\n this.mId = id;\r\n }", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "public void setOrder_code_id(int order_code_id) {\n this.order_code_id = order_code_id;\n }", "public void setOrderid(String orderid) {\n this.orderid = orderid == null ? null : orderid.trim();\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public void setOrder(String id,String email);", "public void setItemNo(int value) {\n this.itemNo = value;\n }", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "public int getOrderID() {\r\n return emporderID;\r\n }", "public void setItemId(int itemId) {\n\t\tthis.itemId = itemId;\n\t}", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(String idIn) {\n this.id = idIn;\n }", "public void setId(BigDecimal id) {\n\t\tthis.id = id;\n\t}", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "private void setOtherId(int value) {\n \n otherId_ = value;\n }", "public void setItemid(Integer itemid) {\n this.itemid = itemid;\n }", "public void setItemid(Integer itemid) {\n this.itemid = itemid;\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "void prepareOrder(int orderId);", "public void setId( Integer id )\n {\n this.id = id ;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(long id) {\n id_ = id;\n }", "public void setId(int value) {\n this.id = value;\n }", "public Orders(int ordersId) {\r\n this.ordersId = ordersId;\r\n }", "@Override\r\n\tpublic void setId( java.math.BigDecimal value ) {\r\n\t\tthis.unwrapModel().setId( value );\r\n\t}", "@Override\n public void updateOne(int id, Booking itemToUpdate) {\n String sql = \"UPDATE bookings SET customer_phone_number = ? WHERE id = ?\";\n jdbc.update(sql, itemToUpdate.getCustomerPhoneNumber(), id);\n }", "@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}", "public void setITEM(int value) {\r\n this.item = value;\r\n }" ]
[ "0.6775741", "0.65783644", "0.65692234", "0.62068266", "0.609644", "0.609644", "0.60085267", "0.59639543", "0.5939686", "0.5911774", "0.58727556", "0.58636737", "0.58309644", "0.58129257", "0.5806817", "0.5763984", "0.5729369", "0.5729369", "0.5714717", "0.57127845", "0.5687116", "0.56487936", "0.5598295", "0.559384", "0.5592268", "0.5565877", "0.55520093", "0.5525665", "0.5520999", "0.550849", "0.5503453", "0.5499768", "0.54975355", "0.5494051", "0.5451968", "0.5451386", "0.5440643", "0.5431362", "0.5423634", "0.5419086", "0.5415056", "0.54133666", "0.53879184", "0.53838676", "0.5381812", "0.53760886", "0.53639305", "0.53552806", "0.53552806", "0.53543735", "0.534664", "0.53430325", "0.53266877", "0.5323453", "0.5305657", "0.5302777", "0.5300797", "0.5295659", "0.5295659", "0.5294663", "0.52924466", "0.527949", "0.527949", "0.52759314", "0.52676034", "0.52673", "0.52645445", "0.52602", "0.5253824", "0.5243619", "0.5243619", "0.5243619", "0.5243619", "0.5243619", "0.5243619", "0.5243619", "0.5242955", "0.523855", "0.52380073", "0.52335626", "0.5221489", "0.5221489", "0.52160776", "0.5210411", "0.5210104", "0.5206436", "0.5206436", "0.5206436", "0.5206436", "0.5206436", "0.5206436", "0.5206436", "0.5206436", "0.5206436", "0.52055484", "0.52050203", "0.52014434", "0.52000517", "0.5198908", "0.51928097", "0.51867276" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.disabled
public Boolean getDisabled() { return disabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final String getDisabledAttribute() {\n return getAttributeValue(\"disabled\");\n }", "boolean isItemDisabled( final Object item );", "public DisabledReason disabledReason() {\n return this.disabledReason;\n }", "public Byte getDisableFlag() {\n return disableFlag;\n }", "public final boolean isDisabled()\n {\n return myDisabledProperty.get();\n }", "public boolean isIsDisabled() {\r\n return isDisabled;\r\n }", "public boolean isDisabled()\n {\n return disabled;\n }", "public boolean isDisabled() {\n return disabled;\n }", "public final boolean isDisabled() {\n return isAttributeDefined(\"disabled\");\n }", "public boolean isDisabled() {\n\t\treturn disabled;\n\t}", "@ApiModelProperty(value = \"The date/time the auto order was disabled due to failed rebills\")\r\n public String getDisabledDts() {\r\n return disabledDts;\r\n }", "public final BooleanProperty disabledProperty()\n {\n return myDisabledProperty;\n }", "public Boolean checkDisabled() {\r\n\t\treturn searchRepository.checkDisabled();\r\n\t}", "java.lang.String getEnabled();", "public int getForbidCondition() {\n\t\t\treturn forbidCondition;\n\t\t}", "public String getDisablebuyerrequirements() {\r\n return disablebuyerrequirements;\r\n }", "public static boolean isDisabled() {\r\n return disabled;\r\n }", "public JsStatement disable()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'disable'\");\n\t}", "public String disabledReasonMessage() {\n return this.disabledReasonMessage;\n }", "@java.lang.Override\n public java.util.List<java.lang.Integer> getDisabledReasonValueList() {\n return disabledReason_;\n }", "public boolean isDisabled() {\n\t\treturn !enabled;\n\t}", "@Override\r\n\tpublic boolean isDisabled() throws NotesApiException {\n\t\treturn false;\r\n\t}", "public void setDisabled() {\n\t\tdisabled = true;\n\t}", "public Boolean getEnabled() {\n return this.enabled;\n }", "public Boolean getEnabled() {\n return this.enabled;\n }", "public boolean getEnabled() {\r\n \t\tif (status == AlternativeStatus.ADOPTED) {\r\n \t\t\treturn true;\r\n \t\t} else {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t}", "public boolean getEnabled() {\n\t\treturn mCurrentState != STATE.DISABLED;\n\t}", "public Boolean getbEnable() {\n return bEnable;\n }", "Date getDateDisabled();", "@Override\n public java.lang.Object getUilButtonDisabledColor() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (UIL_BUTTON_DISABLED_COLOR_);\n return (java.lang.Object)retnValue;\n }", "@Override\n public String whetherDisabled(Where where) {\n return null;\n }", "@Override\n\tpublic boolean getEnabled();", "public Boolean getOrderStatus() {\n return orderStatus;\n }", "boolean getEnabled();", "boolean getEnabled();", "boolean getEnabled();", "@java.lang.Override\n public java.util.List<com.google.cloud.datafusion.v1beta1.Instance.DisabledReason>\n getDisabledReasonList() {\n return new com.google.protobuf.Internal.ListAdapter<\n java.lang.Integer, com.google.cloud.datafusion.v1beta1.Instance.DisabledReason>(\n disabledReason_, disabledReason_converter_);\n }", "@ApiModelProperty(value = \"True if this auto order is enabled\")\r\n public Boolean isEnabled() {\r\n return enabled;\r\n }", "@java.lang.Override\n public int getDisabledReasonValue(int index) {\n return disabledReason_.get(index);\n }", "public static String getDisabledCode(int editCode){\r\n\t\t\r\n\t\tif (editCode == SIM_CAN_BE_EDITED){\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn \"disabled=\\\"disabled\\\"\";\r\n\t\t}\r\n\t\t\r\n\t}", "public String getEnabled() {\r\n\t\treturn enabled;\r\n\t}", "public Boolean getEnabled() {\r\n return enabled;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"inactive\";\n\t}", "public boolean getEnabled() {\n return enabled;\n }", "public Boolean getEnabled() {\n return enabled;\n }", "public boolean isDisabled() {\n final FacesContext facesContext = getFacesContext();\n final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);\n final Boolean disabled = (Boolean) getStateHelper().eval(AbstractUICommand.PropertyKeys.disabled);\n if (disabled == null) {\n SupportsDisabled parent =\n ComponentUtils.findAncestor(getCurrentComponent(facesContext), SupportsDisabled.class);\n if (parent != null && parent.isDisabled()) {\n return true;\n }\n }\n return disabled != null && disabled\n || tobagoConfig.getSecurityAnnotation() == SecurityAnnotation.disable && !isAllowed();\n }", "public void setDisabled(Boolean disabled) {\n this.disabled = disabled;\n }", "public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}", "@Override\r\n\tpublic void setDisabled(boolean arg0) throws NotesApiException {\n\r\n\t}", "public java.util.List<com.google.cloud.datafusion.v1beta1.Instance.DisabledReason>\n getDisabledReasonList() {\n return new com.google.protobuf.Internal.ListAdapter<\n java.lang.Integer, com.google.cloud.datafusion.v1beta1.Instance.DisabledReason>(\n disabledReason_, disabledReason_converter_);\n }", "public void setDisabled(boolean disabled) {\n this.disabled = disabled;\n }", "final public int getEnabled() {\n return enabledType;\n }", "@JsonGetter(\"dnisEnabled\")\r\n public boolean getDnisEnabled ( ) { \r\n return this.dnisEnabled;\r\n }", "@java.lang.Override\n public com.google.cloud.datafusion.v1beta1.Instance.DisabledReason getDisabledReason(int index) {\n return disabledReason_converter_.convert(disabledReason_.get(index));\n }", "public Boolean getEnable() {\n return this.enable;\n }", "public boolean getBooleanValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not a boolean.\");\n }", "@java.lang.Override\n public int getDisabledReasonCount() {\n return disabledReason_.size();\n }", "public Boolean getBlocked() {\n return this.blocked;\n }", "public com.google.protobuf.ByteString\n getEnabledBytes() {\n java.lang.Object ref = enabled_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n enabled_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getEnabledBytes() {\n java.lang.Object ref = enabled_;\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 enabled_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Criteria andEnabledNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"enabled <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public Boolean getEnable() {\n return enable;\n }", "public String getShEnabledDisabled() {\n\n\t\treturn shEnabledDisabled;\n\n\t}", "com.google.protobuf.ByteString\n getEnabledBytes();", "public String getIsEnable() {\n return isEnable;\n }", "public int getContainsNonBmp() {\n return containsNonBmp;\n }", "public int getDisableComment() {\n return disableComment_;\n }", "public static void setDisabled(boolean _disabled) {\r\n disabled = _disabled;\r\n }", "public int getDisabledReasonCount() {\n return disabledReason_.size();\n }", "public Boolean getEnable() {\n return enable;\n }", "public List<User> getDisabledUsers();", "public String getEnable() {\r\n return enable;\r\n }", "public java.lang.Boolean getEnabled() {\n return enabled;\n }", "public void setDisabled(boolean disabled) {\n\t\tthis.disabled = disabled;\n\t}", "public boolean getBilanganBool() /*const*/{\n\t\tassert(getTipeBilangan()==Tipe._bool);\n\t\treturn Val.B;\n\t}", "public Boolean getDisableCacheSync() {\r\n return getAttributeAsBoolean(\"disableCacheSync\");\r\n }", "public boolean getBlocked() { return this.blocked; }", "@Override\n public boolean getItemActive() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.ITEM_ACTIVE_);\n return ((Boolean)retnValue).booleanValue ();\n }", "@Accessor(qualifier = \"itemsSkipped\", type = Accessor.Type.GETTER)\n\tpublic Integer getItemsSkipped()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(ITEMSSKIPPED);\n\t}", "@OAMany(\n displayName = \"Exclude Award Types\", \n toClass = AwardType.class, \n reverseName = AwardType.P_ExcludeItems, \n createMethod = false\n )\n @OALinkTable(name = \"AwardTypeExcludeItem\", indexName = \"AwardTypeExcludeItem\", columns = {\"ItemId\"})\n private Hub<AwardType> getExcludeAwardTypes() {\n return null;\n }", "public boolean getItemState(){\n\t\treturn this.isWarningOn;\n\t}", "public String isEnabled() {\n return this.isEnabled;\n }", "@ApiModelProperty(required = true, value = \"1APP8 Managed administrative status\")\n @JsonProperty(\"locked\")\n public Boolean getLocked() {\n return locked;\n }", "@Override\n\tpublic List<mOrders> getList() {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.ne(\"O_Status_Code\",Constants.ORDER_STATUS_DELIVERIED ));\n\t\t\t//criteria.createAlias(\"O_BatchCode\", \"O_BatchCode\");\n\t\t\t//criteria.addOrder(Order.asc(\"O_BatchCode.value\"));\n\t\t\tList<mOrders> listOrders = criteria.list();\n\t\t\tcommit();\n\t\t\treturn listOrders;\n\t\t}catch(HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally{\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "public java.lang.String getEnabled() {\n java.lang.Object ref = enabled_;\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 enabled_ = s;\n }\n return s;\n }\n }", "public NinePatch getButtonArrow_disable()\r\n\t{\r\n\t\treturn getRaw(IMGS_ROOT+\"/button_arrow_disable.9.png\");\r\n\t}", "public int getDisabledReasonValue(int index) {\n return disabledReason_.get(index);\n }", "public int getDisableComment() {\n return instance.getDisableComment();\n }", "String getDisabledByPolicyTitleForFinancedDevice();", "public Boolean enabled() {\n return this.enabled;\n }", "public java.lang.String getEnabled() {\n java.lang.Object ref = enabled_;\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 if (bs.isValidUtf8()) {\n enabled_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Byte getOrderStatus() {\n return orderStatus;\n }", "public java.util.List<java.lang.Integer> getDisabledReasonValueList() {\n return java.util.Collections.unmodifiableList(disabledReason_);\n }", "@Override\n public void onDisabled() {\n }", "public Boolean getEnable() {\n\t\treturn enable;\n\t}", "boolean getDeactivated();", "public boolean isAdbDisabled(boolean isEnable) {\n return false;\n }", "@JsonProperty(\"enabled\")\r\n @JacksonXmlProperty(localName = \"enabled\", isAttribute = true)\r\n public String getEnabled() {\r\n return enabled;\r\n }", "@ApiModelProperty(value = \"True if the auto order was canceled because the customer purchased a downgrade item\")\r\n public Boolean isCancelDowngrade() {\r\n return cancelDowngrade;\r\n }", "@Override\n\tpublic List findUncheckedOrder() {\n\t\treturn jewelOrderDao.selectUncheckedOrder();\n\t}" ]
[ "0.6760518", "0.6075609", "0.5869716", "0.58622795", "0.5847505", "0.5826342", "0.578895", "0.57828635", "0.5782695", "0.57379484", "0.5651059", "0.5643983", "0.5641828", "0.5603837", "0.5586027", "0.55572057", "0.5505041", "0.5443555", "0.54096514", "0.5404696", "0.5393353", "0.538638", "0.53738105", "0.5368369", "0.5368369", "0.5364311", "0.5341686", "0.53306925", "0.52993083", "0.5288163", "0.5285288", "0.5253612", "0.5241261", "0.5213539", "0.5213539", "0.5213539", "0.5198805", "0.5187478", "0.5176197", "0.5169194", "0.51629615", "0.5154976", "0.51479846", "0.5145464", "0.51324046", "0.5129292", "0.51144797", "0.511237", "0.51098806", "0.50957626", "0.5090507", "0.50778234", "0.5067523", "0.506388", "0.5055549", "0.5041312", "0.5034061", "0.5032054", "0.5030577", "0.50267255", "0.50241387", "0.5019127", "0.4979386", "0.4978302", "0.49738988", "0.4966299", "0.49598926", "0.49576527", "0.49552548", "0.4953623", "0.4952163", "0.494935", "0.4940438", "0.4933177", "0.4919911", "0.49077204", "0.4899707", "0.4893192", "0.4890027", "0.48747027", "0.4859931", "0.48541483", "0.48500732", "0.48452267", "0.4842357", "0.4841953", "0.48393118", "0.48390803", "0.4838887", "0.48373702", "0.48338798", "0.4832344", "0.48275304", "0.48236564", "0.48126447", "0.47992516", "0.47969627", "0.47938848", "0.47937638", "0.47881728" ]
0.63989526
1
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.disabled
public void setDisabled(Boolean disabled) { this.disabled = disabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setDisabled(boolean arg0) throws NotesApiException {\n\r\n\t}", "public void setDisabled() {\n\t\tdisabled = true;\n\t}", "boolean isItemDisabled( final Object item );", "public void setDisabled(boolean disabled) {\n this.disabled = disabled;\n }", "public static void setDisabled(boolean _disabled) {\r\n disabled = _disabled;\r\n }", "public final String getDisabledAttribute() {\n return getAttributeValue(\"disabled\");\n }", "public void setDisabled(boolean disabled) {\n\t\tthis.disabled = disabled;\n\t}", "public final void setDisabled(boolean value)\n {\n myDisabledProperty.set(value);\n }", "public void setIsDisabled(boolean isDisabled) {\r\n this.isDisabled = isDisabled;\r\n }", "public Boolean getDisabled() {\n return disabled;\n }", "void setEnable(boolean b) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public JsStatement disable()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'disable'\");\n\t}", "@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }", "@objid (\"85e0d2fc-c5f1-47a6-a7a9-d1d92c110978\")\n void setIsOrdered(boolean value);", "void setDateDisabled(final Date dateDisabled);", "private void enableDisable() throws Exception\n\t{\n\t\tfor (String param : parameters.keySet())\n\t\t{\n\t\t\tif (piseMarshaller.getPrecond(param) != null)\n\t\t\t{\n\t\t\t\tElement element = parameters.get(param); \n\t\t\t\tif (processPrecond(param) == true)\n\t\t\t\t{\n\t\t\t\t\telement.enabled = true;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\telement.enabled = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public DraggableBehavior setDisabled(boolean disabled)\n\t{\n\t\tthis.options.put(\"disabled\", disabled);\n\t\treturn this;\n\t}", "@Override\n public void onDisabled() {\n }", "public void disable() throws SQLException {\n disable_stmt.executeUpdate();\n }", "public void setBillEnabled(boolean b) {\n\t\tbtnBill.setEnabled(b);\n\t}", "@Override\n\tpublic void disable(T t) throws DaoException {\n\t\tEntityManager em = entityManager();\n\t\t\n\t\ttry {\n\t\t\n\t\t\tt.setStatus(false);\n\t\t\tem.getTransaction().begin();\n\t\t\tem.merge(t);\n\t\t\tem.merge(t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tem.getTransaction().rollback();\n\t\t\tthrow new DaoException(e.getMessage());\n\t\t\t\n\t\t} finally {\n\t\t\t\n\t\t\tem.close();\n\t\t\t\n\t\t}\n\t}", "public void doReadOnlyMode(boolean b) {\r\n txtb_ckdUniv.setReadonly(b);\r\n txtb_cnamaUniv.setReadonly(b);\r\n txtb_alamatUniv.setReadonly(b);\r\n txtb_cstatus.setReadonly(b);\r\n list_status.setDisabled(b);\r\n cmb_status.setDisabled(b);\r\n }", "public abstract void wgb_onDisable();", "@Override\r\n\tpublic boolean isDisabled() throws NotesApiException {\n\t\treturn false;\r\n\t}", "public void setDisabled(EventType ore, boolean d) {\r\n\t\tif (d) disabled |= 1L << ore.ordinal();\r\n\t\telse disabled &= ~(1L << ore.ordinal());\r\n\t}", "public void setOrderStatus(Boolean orderStatus) {\n this.orderStatus = orderStatus;\n }", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "public Order(boolean newTakeOut) {\n this.blnTakeOut = newTakeOut;\n this.dblTotal = 0.0;\n this.itemsInOrder = new ArrayList<OrderItem>();\n }", "private void setBidded(){\n this.status = \"Bidded\";\n }", "public void setRemoveAllItemEnabled(boolean b) {\n\t\tbtnRemoveallitem.setEnabled(b);\n\t}", "public void setbEnable(Boolean bEnable) {\n this.bEnable = bEnable;\n }", "void setAccountNonLocked(boolean accountNonLocked);", "public void setEnabled(boolean b) {\n setFocusable(b);\n other.setEnabled(b);\n }", "@Test\n public void testDynamicDisabled() {\n JXTable table = new JXTable(10, 3);\n table.setColumnControlVisible(true);\n assertEquals(table.isEnabled(), table.getColumnControl().isEnabled());\n table.setEnabled(!table.isEnabled());\n assertEquals(table.isEnabled(), table.getColumnControl().isEnabled());\n }", "@Override\n\tpublic void setEnabled(boolean flag) {\n\t\t\n\t}", "public void setEnabled(boolean aFlag) { _enabled = aFlag; }", "public Criteria andEnabledNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"enabled <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public int getForbidCondition() {\n\t\t\treturn forbidCondition;\n\t\t}", "public void setEnabled(boolean b) {\n // Not supported for MenuComponents\n }", "public void setEnabled(boolean enabled);", "public void setEnabled(boolean enabled);", "public Byte getDisableFlag() {\n return disableFlag;\n }", "@Override\n public void setUilButtonDisabledColor(java.lang.Object uilButtonDisabledColor) throws G2AccessException {\n setAttributeValue (UIL_BUTTON_DISABLED_COLOR_, uilButtonDisabledColor);\n }", "public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "public void setEnabled(boolean value) {\n m_Enabled = value;\n }", "@Modifying \n\t@Transactional\n\t@Query(value = \"UPDATE item_user iu SET iu.active=false WHERE iu.item_id IN (SELECT id FROM item i WHERE i.type=?1)\", nativeQuery = true)\n\tvoid updateNoActiveByType(String type);", "public boolean setEnabled(boolean enable);", "@Test\n\tpublic void testAdminDisable() {\n\t\tAccount acc1 = new Account(00000, \"ADMIN\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"temp\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"ADMIN\", 00000, 0, \"A\"));\n\t\ttransactions.add(1, new Transaction(07, \"temp\", 00001, 0, \"A\"));\n\t\ttransactions.add(2, new Transaction(00, \"ADMIN\", 00000, 0, \"A\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Account Disabled\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to disable account as admin\", testResult);\n\t}", "public void updateOrderBoolean(int orderId, String column, boolean newValue) {\r\n int bToInt = 0;\r\n if (newValue)\r\n bToInt = 1;\r\n \r\n String sqlQuery = \"UPDATE orders SET \" + column + \"=?\" + \" WHERE id=?;\";\r\n \r\n System.out.println(sqlQuery);\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n \r\n p.setInt(1, bToInt);\r\n p.setInt(2, orderId);\r\n \r\n p.executeUpdate();\r\n } catch(SQLException e) {\r\n System.out.println(e.toString());\r\n }\r\n }", "public void setRowDraggingEnabled(boolean b) {\r\n\t\t// AttrSession.logPrintln(this + \": setRowDraggingEnabled(\"+b+\")\");\r\n\t\tif (b) {\r\n\t\t\tif (this.rowDragger == null) {\r\n\t\t\t\tthis.rowDragger = new TableRowDragger(this.tableView);\r\n\t\t\t}\r\n\t\t\tif (!this.rowDraggingEnabled) {\r\n\t\t\t\tthis.rowDraggingEnabled = true;\r\n\t\t\t\tthis.rowDragger.addRowDragListener(this);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this.rowDraggingEnabled) {\r\n\t\t\t\t// No disabling while dragging is active. Request will be\r\n\t\t\t\t// honoured\r\n\t\t\t\t// when dragging stops.\r\n\t\t\t\tif (isDraggingActive()) {\r\n\t\t\t\t\tthis.rowDraggingDisablingRequested = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.rowDraggingEnabled = false;\r\n\t\t\t\t\tthis.rowDragger.removeRowDragListener(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void setInactive(boolean aInactive) {\n/* 4829 */ this.inactive = aInactive;\n/* */ }", "public void onDisabled(Context context) {\n\t}", "@Override\n public void onDisabled(Context context) {\n super.onDisabled(context);\n }", "@Override\n public void setEnabled(boolean b)\n {\n btnDeselectAll.setEnabled(b);\n btnExport.setEnabled(b);\n btnSelectAll.setEnabled(b);\n checkBoxList1.setEnabled(b);\n\n }", "@Override\n public void setEnabled(boolean enabled) {\n }", "public Boolean checkDisabled() {\r\n\t\treturn searchRepository.checkDisabled();\r\n\t}", "@Override\r\n public void onDisabled(Context context) {\n }", "@Override\r\n public void onDisabled(Context context) {\n }", "public void disable ( ) {\r\n\t\tenabled = false;\r\n\t}", "public boolean isIsDisabled() {\r\n return isDisabled;\r\n }", "@Override\r\n\tprotected void onBoEdit() throws Exception {\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tsuper.onBoEdit();\r\n\t}", "public Criteria andOrderStatusNotEqualToColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"order_status <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public String getDisablebuyerrequirements() {\r\n return disablebuyerrequirements;\r\n }", "public void setEnabled(boolean isEnable) throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET enabled=? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, (isEnable ? 1 : 0));\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setEnabled(boolean \"+ isEnable+ \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "public final boolean isDisabled() {\n return isAttributeDefined(\"disabled\");\n }", "private void setIsNoted(ArrayList<OrderItem> oil) {\n if (oil != null) {\n int size = oil.size();\n isNoted = new boolean[size];\n\n for (int i = 0; i < size; i++) {\n isNoted[i] = !oil.get(i).getNote().equals(\"\");\n }\n }\n }", "public void setEnabled(boolean value) {\n this.enabled = value;\n }", "public abstract void Disabled();", "public void setEnabled(String tmp) {\n enabled = DatabaseUtils.parseBoolean(tmp);\n }", "public boolean isDisabled() {\n return disabled;\n }", "protected void setInactive() {\r\n\t\tactive = false;\r\n\t}", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }" ]
[ "0.58627456", "0.5846225", "0.5632741", "0.5627405", "0.55885875", "0.5509431", "0.54872054", "0.5424688", "0.5424016", "0.5338617", "0.5287524", "0.52172184", "0.51574165", "0.5129797", "0.5115793", "0.50966185", "0.507027", "0.5062022", "0.50578886", "0.50312114", "0.5015579", "0.5005018", "0.49955788", "0.49629635", "0.49459645", "0.49410382", "0.49310738", "0.4882866", "0.4882613", "0.4877699", "0.485567", "0.4854863", "0.4853826", "0.4852173", "0.4843342", "0.4840459", "0.48228157", "0.4817392", "0.48115546", "0.48088068", "0.48088068", "0.4796365", "0.47780564", "0.47767222", "0.476329", "0.476329", "0.476329", "0.476329", "0.4762876", "0.47601202", "0.4756204", "0.47513998", "0.47500744", "0.47474414", "0.47471955", "0.47422114", "0.47398537", "0.47272682", "0.4721284", "0.47207806", "0.47151348", "0.47151348", "0.469625", "0.46885124", "0.4683347", "0.46805716", "0.46787164", "0.46751422", "0.46750933", "0.46750715", "0.46714303", "0.46684837", "0.4668006", "0.46680018", "0.4665393", "0.46646205", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165", "0.46617165" ]
0.56617254
2
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.uuid
public String getUuid() { return uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getUuid() {\n return uuid;\n }", "public String getUUID () \n\t{\n\t\treturn (String)get_Value(COLUMNNAME_UUID);\n\t}", "OrderItemDto getOrderItem(long id) throws SQLException;", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public String getUuid() {\n return this.uuid;\n }", "public String getUuid()\n {\n return this.uuid;\n }", "public String getUuid() {\n return _uuid;\n }", "public UUID getUUID() {\n return this.uuid;\n }", "public String getUuid() {\r\n return uuid;\r\n }", "public String getUuid() {\r\n return uuid;\r\n }", "public String getUuid() {\r\n return uuid;\r\n }", "@Override\n\tpublic String getUuid() {\n\t\treturn model.getUuid();\n\t}", "@Override\n\tpublic String getUuid() {\n\t\treturn model.getUuid();\n\t}", "@Override\n\tpublic String getUuid() {\n\t\treturn model.getUuid();\n\t}", "public String getUUID() {\n return uuid;\n }", "public String getUuid() {\n return this.Uuid;\n }", "public UUID getUuid() {\n return uuid;\n }", "public UUID getUuid() {\n return uuid;\n }", "public UUID getUUID() {\n return uuid;\n }", "public UUID getUuid() { return uuid; }", "@Override\n\tpublic java.lang.String getUuid() {\n\t\treturn _second.getUuid();\n\t}", "@JsonGetter(\"uuid\")\r\n public String getUuid ( ) { \r\n return this.uuid;\r\n }", "public String uuid() {\n return this.innerProperties() == null ? null : this.innerProperties().uuid();\n }", "public String getUuid() {\n\t\tif (uuid == null) {\n\t\t\tthis.uuid = getProperty(\"uuid\");\n\t\t}\n\t\treturn uuid;\n\t}", "public String getUuid() {\n\t\treturn uuid;\n\t}", "public UUID getUuid();", "java.lang.String getBusinessPartnerUuid();", "java.lang.String getPriceListUuid();", "public java.lang.String getUuid() {\n return uuid;\n }", "public abstract String getUuid();", "public String getId(){\n\t\treturn uuid;\n\t}", "@AutoEscape\n\t@Override\n\tpublic String getUuid();", "public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }", "@AutoEscape\n\tpublic String getUuid();", "@AutoEscape\n\tpublic String getUuid();", "@AutoEscape\n\tpublic String getUuid();", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "String getUuid();", "public int geti_ordertrx_temp_ID();", "@Override\n\tpublic Integer getUid() {\n\t\treturn this.ordAmmId;\n\t}", "public UUID getDeviceUuid() {\n return uuid;\n }", "java.lang.String getUUID();", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "java.lang.String getWarehouseUuid();", "public String getUuid() {\n\t\t// lazy init of UUID\n\t\tif (uuid == null) {\n\t\t\tuuid = UUID.randomUUID().toString();\n\t\t}\n\t\treturn uuid;\n\t}", "@Override\n public UUID getUuid() {\n return GATT_UUID;\n }", "@TypeConverter\n public String fromUUID(UUID mUUID){\n return mUUID.toString();\n }", "public long getBuid() {\r\n return buid;\r\n }", "@Override\n public long getUUID() {\n return endpointHandler.getUUID();\n }", "@Override\n public java.lang.String getUuid() {\n return _partido.getUuid();\n }", "@Override\n\tpublic String getUuid() {\n\t\treturn null;\n\t}", "public Long getOrderid() {\r\n return orderid;\r\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "public Integer getRegItemUid() {\n return regItemUid;\n }", "public String getUser_person_uuid() {\n return user_person_uuid;\n }", "@Override\n\tpublic UUID getUUID() {\n\t\treturn null;\n\t}", "@Override\n public String toString() {\n return \"OrderItems{\" +\n \"itemId='\" + itemId + '\\'' +\n \", itemName='\" + itemName + '\\'' +\n \", itemPrice=\" + itemPrice +\n \", itemQuantity=\" + itemQuantity +\n \", itemAmount=\" + itemAmount +\n '}';\n }", "public int getId() {\n return orderID;\n }", "@Override\n\tpublic String getUserUuid() {\n\t\treturn model.getUserUuid();\n\t}", "@Override\n\tpublic String getUserUuid() {\n\t\treturn model.getUserUuid();\n\t}", "@Override\n\tpublic String getUserUuid() {\n\t\treturn model.getUserUuid();\n\t}", "@Override\n\tpublic java.lang.String getUserUuid() {\n\t\treturn _second.getUserUuid();\n\t}", "@Override\n\tpublic String getUserUuid();", "@Override\n\tpublic String getUserUuid();", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public Integer getU_ID()\n {\n return this.U_ID;\n }", "public String getOrderid() {\n return orderid;\n }", "@Override\n\tpublic UUID getUniqueId() {\n\t\treturn uid;\n\t}", "public String getAccountId() {\n return (String)(userItem.getId());\n }", "String getOrderId();", "public static String getUUID(BundleContext bc) {\n synchronized (\"org.osgi.framework.uuid\") {\n String uuid = bc.getProperty(\"org.osgi.framework.uuid\");\n if (uuid == null) {\n uuid = UUID.randomUUID().toString();\n System.setProperty(\"org.osgi.framework.uuid\", uuid);\n }\n return uuid;\n }\n }", "public String getOrderItemName() {\n return orderItemName;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "UUID getTransactionId();", "public Integer\t\tgetOrderID();", "public long getBomItemKey() {\n\t\treturn bomItemKey;\n\t}", "public String getOrderID() {return orderID;}", "public Integer getProductUomId() {\n return productUomId;\n }", "public Integer getProductUomId() {\n return productUomId;\n }", "@Override\r\n\tpublic Orderitem queryByUidAndPid(Orderitem oi) {\n\t\treturn orderitemDao.queryByUidAndPid(oi);\r\n\t}", "public Integer getuId() {\n return uId;\n }", "public Integer getuId() {\n return uId;\n }", "UUID getUUID();", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "public com.google.protobuf.ByteString\n getUUIDBytes() {\n java.lang.Object ref = uUID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n uUID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "io.dstore.values.IntegerValue getOrderPersonId();", "public String getResourceUuidSql()\r\n \t{\r\n \t\treturn \"select RESOURCE_UUID from CONTENT_RESOURCE where RESOURCE_ID=?\";\r\n \t}", "ClOrderInfo selectByPrimaryKey(String orderId);", "public com.google.protobuf.ByteString\n getUuidBytes() {\n java.lang.Object ref = uuid_;\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 uuid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getUuidBytes() {\n java.lang.Object ref = uuid_;\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 uuid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.60057276", "0.60045767", "0.59565175", "0.5903187", "0.5772402", "0.5742751", "0.57274944", "0.5681605", "0.5582146", "0.5582146", "0.5582146", "0.55686045", "0.55686045", "0.55686045", "0.5547304", "0.5537908", "0.55310005", "0.55310005", "0.55090815", "0.55083114", "0.5478612", "0.54745", "0.54683685", "0.5460995", "0.54463893", "0.54098225", "0.5387537", "0.5356231", "0.53376496", "0.52977663", "0.5289752", "0.5287422", "0.5270618", "0.5246714", "0.5246714", "0.5246714", "0.5232386", "0.52285814", "0.519227", "0.51591885", "0.5154036", "0.5145417", "0.51405656", "0.5109168", "0.5090229", "0.5062735", "0.5034592", "0.50306135", "0.50263727", "0.5017919", "0.5005881", "0.5003978", "0.49851283", "0.49840337", "0.49791303", "0.49702513", "0.49676833", "0.49633744", "0.4957261", "0.4957261", "0.4957261", "0.49561423", "0.49538082", "0.49538082", "0.49513966", "0.49466783", "0.4945157", "0.49383697", "0.4928508", "0.49273786", "0.49248073", "0.4924528", "0.49206805", "0.49206805", "0.49135864", "0.48984474", "0.48978007", "0.4897316", "0.4862758", "0.4862758", "0.48605344", "0.48531085", "0.48531085", "0.48307234", "0.48296705", "0.48247528", "0.48158336", "0.48100346", "0.47967094", "0.47961265", "0.47961265" ]
0.5558505
23
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.uuid
public void setUuid(String uuid) { this.uuid = uuid == null ? null : uuid.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUuid(Integer uuid) {\n this.uuid = uuid;\n }", "private void setUUID(UUID uuid) {\n this.uuid = uuid;\n }", "public void setUUID (String UUID)\n\t{\n\t\tset_Value (COLUMNNAME_UUID, UUID);\n\t}", "public void setUuid(UUID uuid);", "public void setUUID(UUID uuid) {\n this.UUID = uuid.toString();\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setUuid(String _uuid) {\n this._uuid = _uuid;\n }", "public void setUuid(String uuid);", "public void setUuid(String uuid);", "public void setUuid(String uuid);", "public void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);", "public void setUuid(String uuid)\n {\n this.uuid = uuid;\n }", "@PrePersist\n public void assignUUID() {\n this.uid = UUID.randomUUID();\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public void setUuid(String uuid) {\n this.uuid = uuid;\n }", "public void setUuid(String uuid) {\n this.uuid = uuid;\n }", "public void setUuid(String uuid) {\n this.uuid = uuid;\n }", "public void setUuid(String uuid) {\n this.uuid = uuid;\n }", "@JsonSetter(\"uuid\")\r\n public void setUuid (String value) { \r\n this.uuid = value;\r\n }", "@Override\n\tpublic void setUuid(String uuid);", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "@Override\n\tpublic void setUuid(java.lang.String uuid) {\n\t\t_second.setUuid(uuid);\n\t}", "public void setUuid_(long uuid_) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt64(__io__address + 0, uuid_);\n\t\t} else {\n\t\t\t__io__block.writeInt64(__io__address + 0, uuid_);\n\t\t}\n\t}", "public void setId(Uuid uuid) {\n\t\t this.id = uuid;;\n\t}", "public void setUuid(String uuid) {\n\t\tthis.uuid = uuid;\n\t}", "@Override\n public void setUuid(java.lang.String uuid) {\n _partido.setUuid(uuid);\n }", "@Override\n\tpublic void setUuid(String uuid) {\n\t\tmodel.setUuid(uuid);\n\t}", "@Override\n\tpublic void setUuid(String uuid) {\n\t\tmodel.setUuid(uuid);\n\t}", "@Override\n\tpublic void setUuid(String uuid) {\n\t\tmodel.setUuid(uuid);\n\t}", "public void setUserUuid(String userUuid);", "public void setUserUuid(String userUuid);", "public void setUserUuid(String userUuid);", "public void setUserUuid(String userUuid);", "public void setUuid(String Uuid) {\n this.Uuid = Uuid;\n }", "public void setUuid(java.lang.String uuid) {\n this.uuid = uuid;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "@JsonSetter(\"orderId\")\r\n public void setOrderId (int value) { \r\n this.orderId = value;\r\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "void setItemId(String itemId);", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public void setUuid(String uuid) {\r\n this.uuid = uuid == null ? null : uuid.trim();\r\n }", "public void setUuid(String uuid) {\r\n this.uuid = uuid == null ? null : uuid.trim();\r\n }", "public void setUuid(String uuid) {\r\n this.uuid = uuid == null ? null : uuid.trim();\r\n }", "public Integer getUuid() {\n return uuid;\n }", "@Override\n\tpublic void setUserUuid(String userUuid);", "@Override\n\tpublic void setUserUuid(String userUuid);", "@Override\n\tpublic void setUid(Integer uid) {\n\t\tthis.ordAmmId = uid;\n\t}", "public int registerOrderItem(OrderItem i) {\n int ok = 0;\n try {\n String query = \"INSERT INTO order_Item (id_Order_Item, amount, product_id_Product, order_id_Order) VALUES (?, ?, ?, ?) ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n\n st.setInt(1, 0);\n st.setInt(2, i.getAmount());\n st.setInt(3, i.getProductIdProduct());\n st.setInt(4, i.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the insert\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "public String getUuid() {\n return this.uuid;\n }", "@Override\n public void setUserUuid(java.lang.String userUuid) {\n _partido.setUserUuid(userUuid);\n }", "public void setAmazonCustomerId(final Customer item, final String value)\n\t{\n\t\tsetAmazonCustomerId( getSession().getSessionContext(), item, value );\n\t}", "public String getUuid()\n {\n return this.uuid;\n }", "@Override\n\tpublic void setUuid(java.lang.String uuid) {\n\t\t_esfTournament.setUuid(uuid);\n\t}", "public void setOrder(String id,String email);", "@Override\n\tpublic void setUserUuid(String userUuid) {\n\t\tmodel.setUserUuid(userUuid);\n\t}", "@Override\n\tpublic void setUserUuid(String userUuid) {\n\t\tmodel.setUserUuid(userUuid);\n\t}", "@Override\n\tpublic void setUserUuid(String userUuid) {\n\t\tmodel.setUserUuid(userUuid);\n\t}", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public void setAmazonCustomerId(final SessionContext ctx, final Customer item, final String value)\n\t{\n\t\titem.setProperty(ctx, AmazoncoreConstants.Attributes.Customer.AMAZONCUSTOMERID,value);\n\t}", "public UUID getUUID() {\n return this.uuid;\n }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public String getUuid() {\n return _uuid;\n }", "public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }", "@Override\n\tpublic void setUserUuid(java.lang.String userUuid) {\n\t\t_second.setUserUuid(userUuid);\n\t}", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "@Override\n\tpublic void setUserUuid(java.lang.String userUuid) {\n\t\t_employee.setUserUuid(userUuid);\n\t}", "public String getUuid() {\r\n return uuid;\r\n }", "public String getUuid() {\r\n return uuid;\r\n }", "public String getUuid() {\r\n return uuid;\r\n }", "protected static void TEST_CHANGE_UUID() {\r\n\t\tUUID = System.getProperty(\"java.io.tmpdir\") + \"/titan_test_\" + UuidUtils.get().getRandomUuid();\r\n\t}", "public void setOrderId(int value) {\n this.orderId = value;\n }", "public UUID getUuid() { return uuid; }", "public String getUUID() {\n return uuid;\n }", "public BasketItemBuilder() {\n generateRandomId();\n }", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "@Override\n\tpublic void setUserUuid(String userUuid) {\n\t\t_changesetEntry.setUserUuid(userUuid);\n\t}", "private void setBId(int value) {\n \n bId_ = value;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public String getUuid() {\n return uuid;\n }", "public void setUser_person_uuid(String user_person_uuid) {\n this.user_person_uuid = user_person_uuid;\n }", "public UUID getUUID() {\n return uuid;\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public void setU_ID( Integer U_ID )\n {\n this.U_ID = U_ID ;\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public void setUniqueId(final String uniqueId) {\n _uniqueId = uniqueId;\n }", "public String getUUID () \n\t{\n\t\treturn (String)get_Value(COLUMNNAME_UUID);\n\t}", "public int getItem_order_code_id() {\n return item_order_code_id;\n }" ]
[ "0.56021404", "0.5597364", "0.5512918", "0.54851174", "0.5478974", "0.54615724", "0.5449257", "0.5448337", "0.5448337", "0.5448337", "0.54280305", "0.54078585", "0.5347233", "0.5326315", "0.53060156", "0.53060156", "0.53060156", "0.53060156", "0.53011686", "0.52918994", "0.52358353", "0.52358353", "0.5222283", "0.5177389", "0.5119188", "0.50851923", "0.5081051", "0.5048381", "0.5048381", "0.5048381", "0.5040799", "0.5040799", "0.5040799", "0.5040799", "0.50384307", "0.5018694", "0.50176954", "0.5008949", "0.49892968", "0.49758753", "0.49683198", "0.4958776", "0.4958776", "0.4958776", "0.4936431", "0.48792598", "0.48792598", "0.48409748", "0.48221707", "0.48136985", "0.47979316", "0.4766956", "0.47641137", "0.4761815", "0.47574797", "0.47498634", "0.47498634", "0.47498634", "0.47435674", "0.47359157", "0.47234237", "0.47213364", "0.47173244", "0.47172385", "0.47080114", "0.467152", "0.4666553", "0.46665353", "0.46665353", "0.46665353", "0.46560982", "0.46520784", "0.4640722", "0.4632419", "0.46284193", "0.46228647", "0.4619658", "0.46098787", "0.45993617", "0.45993617", "0.45993617", "0.45993617", "0.45993617", "0.45993617", "0.45993617", "0.45993617", "0.45993617", "0.45993617", "0.4592371", "0.45920998", "0.45751774", "0.45492983", "0.45351464", "0.45307055", "0.45268235", "0.45267218" ]
0.4946924
48
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.create_user
public Integer getCreateUser() { return createUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCreateUser()\r\n\t{\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser () {\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser() {\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser() {\r\n\t\treturn createUser;\r\n\t}", "public Long getCreateUser() {\r\n return createUser;\r\n }", "public Long getCreateUser() {\r\n return createUser;\r\n }", "public String getCreateUser() {\r\n return createUser;\r\n }", "public String getCreateUser() {\r\n return createUser;\r\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public Integer getCreateuser() {\n return createuser;\n }", "public String getCreateUser() {\n return createUser; \n }", "public String getCreateUserId() {\r\n return createUserId;\r\n }", "public Long getCreateUserid() {\r\n\t\treturn createUserid;\r\n\t}", "public Integer getCreateUserId() {\n return createUserId;\n }", "public Integer getCreateUserid() {\n return createUserid;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getCreateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(CREATEUSER_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getCreateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(CREATEUSER_PROP.get());\n }", "public java.lang.String getCreateUser() {\n java.lang.Object ref = createUser_;\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 createUser_ = s;\n return s;\n }\n }", "public java.lang.String getCreateUser() {\n java.lang.Object ref = createUser_;\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 createUser_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Long getUserCreate() {\n return userCreate;\n }", "public String getCreatedUser() {\r\n return this.createdUser;\r\n }", "public Long getCreateduser() {\n return createduser;\n }", "public Integer getCreatedUser() {\n\t\treturn createdUser;\n\t}", "public Integer getCreatedUserId() {\n return this.createdUserId;\n }", "public Integer getCreatedUserId() {\n return this.createdUserId;\n }", "public User getCreateUser()\r\n/* */ {\r\n/* 144 */ return this.createUser;\r\n/* */ }", "public com.google.protobuf.ByteString\n getCreateUserBytes() {\n java.lang.Object ref = createUser_;\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 createUser_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCreateUserBytes() {\n java.lang.Object ref = createUser_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n createUser_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCreateBy() {\r\n return createBy;\r\n }", "public Long getCreateBy() {\n return createBy;\n }", "public Long getCreateBy() {\n return createBy;\n }", "public Long getCreateBy() {\n return createBy;\n }", "public Long getCreateBy() {\n return createBy;\n }", "public eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser getCreateUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser target = null;\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().find_element_user(CREATEUSER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "@AutoEscape\n\tpublic String getCreatedByUser();", "public String getCreateUsername() {\r\n\t\treturn createUsername;\r\n\t}", "public String getCreateBy() {\n return createBy;\n }", "public String getCreateBy() {\n return createBy;\n }", "public String getCreateBy() {\n return createBy;\n }", "public String getCreateBy() {\n return createBy;\n }", "public void setCreateUser (String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public String getCreateBy() {\r\n\t\treturn createBy;\r\n\t}", "public java.lang.String getCreateuserid () {\n\t\treturn createuserid;\n\t}", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "public void setCreateUserId(String createUserId) {\r\n this.createUserId = createUserId;\r\n }", "public String getCreateBy() {\n\t\treturn createBy;\n\t}", "public Integer getCreateby() {\n return createby;\n }", "public LoginMessageResponse getCreateUserResult() {\n return localCreateUserResult;\n }", "public Short getCreateUserIdentity() {\n return createUserIdentity;\n }", "public Short getCreateUserIdentity() {\n return createUserIdentity;\n }", "public void setCreateUser(String createUser)\r\n\t{\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser(String createUser) {\n this.createUser = createUser;\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser;\n }", "public Long getAddUser() {\n return addUser;\n }", "public void setCreateUser(Long createUser) {\r\n this.createUser = createUser;\r\n }", "public void setCreateUser(Long createUser) {\r\n this.createUser = createUser;\r\n }", "public void setCreateUser(Integer createUser) {\n this.createUser = createUser;\n }", "public void setCreateUser(Integer createUser) {\n this.createUser = createUser;\n }", "public eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser addNewCreateUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser target = null;\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().add_element_user(CREATEUSER$0);\n return target;\n }\n }", "public void setCreateUser(String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser(String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCreateUsermac() {\r\n\t\treturn createUsermac;\r\n\t}", "@Override\n\tpublic String DBcreateUser(String userJson) {\n\t\tUser newUser = (User) jsonToUserPOJO(userJson);\n\t\tString id = userRepository.create(newUser);\n\t\treturn id;\n\t}", "public void setCreateUserId(Integer createUserId) {\n this.createUserId = createUserId;\n }", "private ServerCommand processCreateUserCommand(RoMClient client, CreateUserClientCommand createUserCommand) {\r\n \t\tboolean success = false;\r\n \r\n \t\t// Check if user is admin\r\n \t\tif (client.getIsAdmin()) {\r\n \t\t\tsuccess = this.dataLayer.addUser(createUserCommand.getNewUserName(), createUserCommand.getSHA1EncryptedPassword());\r\n \t\t}\r\n \r\n \t\tServerCommand serverResponseCommand = new CreateUserServerCommand(success, createUserCommand);\r\n \r\n \t\treturn serverResponseCommand;\r\n \t}", "public Integer getCreatedUserId() {\n return (Integer) get(4);\n }", "public String getCreatedUserName() {\n return createdUserName;\n }", "public com.sforce.soap.enterprise.sobject.User getCreatedBy() {\r\n return createdBy;\r\n }", "public void setCreateuser(Integer createuser) {\n this.createuser = createuser;\n }", "@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}", "public Date getCreateBy() {\n return createBy;\n }", "public Integer getCreateUid() {\n return createUid;\n }", "public Integer getCreateUid() {\n return createUid;\n }", "public Integer getCreateUid() {\n return createUid;\n }", "public Integer getCreateUid() {\n return createUid;\n }", "public Integer getCreateUid() {\n return createUid;\n }", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "public long getCreatedByUser();", "public String createdBy() {\n return this.createdBy;\n }", "public com.myconnector.domain.UserData getCreatedBy () {\n\t\treturn createdBy;\n\t}", "public com.sforce.soap.enterprise.sobject.User getCreatedBy() {\n return createdBy;\n }", "public void setCreatedUser(String createdUser) {\r\n this.createdUser = createdUser;\r\n }", "private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }" ]
[ "0.72487754", "0.72257745", "0.72026443", "0.72026443", "0.7170423", "0.7170423", "0.715876", "0.715876", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.7116454", "0.70815474", "0.70141774", "0.69362247", "0.6873385", "0.68306667", "0.6794648", "0.6786275", "0.6777889", "0.66832286", "0.6645184", "0.6588417", "0.65535146", "0.6460014", "0.64412284", "0.63931614", "0.63931614", "0.622505", "0.6205693", "0.61672926", "0.6144633", "0.6144005", "0.6144005", "0.6144005", "0.6144005", "0.61392015", "0.60938406", "0.60773265", "0.60606503", "0.60606503", "0.60606503", "0.60606503", "0.6057859", "0.60575485", "0.60403323", "0.60270756", "0.6008968", "0.60082823", "0.59938246", "0.5990124", "0.5988918", "0.5988918", "0.5972295", "0.5970577", "0.5970577", "0.5967478", "0.5966799", "0.5966799", "0.59411275", "0.59411275", "0.59319025", "0.5926323", "0.5926323", "0.5906795", "0.5906795", "0.5906795", "0.5906795", "0.59047455", "0.589365", "0.5885915", "0.5872221", "0.5850591", "0.58447194", "0.583731", "0.58256376", "0.582548", "0.581807", "0.58137566", "0.58137566", "0.58137566", "0.58137566", "0.58137566", "0.5799245", "0.5798277", "0.57963747", "0.5786643", "0.5782562", "0.5740375", "0.5736342" ]
0.7162334
7
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.create_user
public void setCreateUser(Integer createUser) { this.createUser = createUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }", "public void setCreateUser(String createUser)\r\n\t{\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser (String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser(Long createUser) {\r\n this.createUser = createUser;\r\n }", "public void setCreateUser(Long createUser) {\r\n this.createUser = createUser;\r\n }", "public void setCreateUser(User createUser)\r\n/* */ {\r\n/* 151 */ this.createUser = createUser;\r\n/* */ }", "public void setCreateUser(eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser createUser)\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser target = null;\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().find_element_user(CREATEUSER$0, 0);\n if (target == null)\n {\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().add_element_user(CREATEUSER$0);\n }\n target.set(createUser);\n }\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser;\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser;\n }", "public void setCreateuser(Integer createuser) {\n this.createuser = createuser;\n }", "public void setCreateUser(String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser(String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }", "public void setCreateUserId(String createUserId) {\r\n this.createUserId = createUserId;\r\n }", "public void setCreateBy (com.redsaga.hibnatesample.step2.User _createBy) {\n\t\tthis._createBy = _createBy;\n\t}", "public void setCreateUserId(Integer createUserId) {\n this.createUserId = createUserId;\n }", "public void setUserCreate(Long userCreate) {\n this.userCreate = userCreate;\n }", "public void setCreatedUser(Integer createdUser) {\n\t\tthis.createdUser = createdUser;\n\t}", "public String getCreateUser () {\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser()\r\n\t{\r\n\t\treturn createUser;\r\n\t}", "public void setCreatedUser(String createdUser) {\r\n this.createdUser = createdUser;\r\n }", "public void setCreateUser(String newVal) {\n if ((newVal != null && this.createUser != null && (newVal.compareTo(this.createUser) == 0)) || \n (newVal == null && this.createUser == null && createUser_is_initialized)) {\n return; \n } \n this.createUser = newVal; \n\n createUser_is_modified = true; \n createUser_is_initialized = true; \n }", "public String getCreateUser() {\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser() {\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser() {\r\n return createUser;\r\n }", "public String getCreateUser() {\r\n return createUser;\r\n }", "public Long getCreateUser() {\r\n return createUser;\r\n }", "public Long getCreateUser() {\r\n return createUser;\r\n }", "public void setCreateUserid(Integer createUserid) {\n this.createUserid = createUserid;\n }", "public Integer getCreateUser() {\n return createUser;\n }", "public Integer getCreateUser() {\n return createUser;\n }", "public void setCreateUser(String createUser) {\r\n this.createUser = createUser == null ? null : createUser.trim();\r\n }", "public void setCreateUser(String createUser) {\r\n this.createUser = createUser == null ? null : createUser.trim();\r\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser == null ? null : createUser.trim();\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public Integer getCreateuser() {\n return createuser;\n }", "public Long getCreateUserid() {\r\n\t\treturn createUserid;\r\n\t}", "public String getCreateUser() {\n return createUser; \n }", "public Builder setCreateUser(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n createUser_ = value;\n onChanged();\n return this;\n }", "public void setCreateUserid(Long createUserid) {\r\n\t\tthis.createUserid = createUserid;\r\n\t}", "public void setCreateduser(Long createduser) {\n this.createduser = createduser;\n }", "public String getCreateUserId() {\r\n return createUserId;\r\n }", "public void setCreatedByUser(String createdByUser);", "void setCreateby(final U createdBy);", "public Integer getCreateUserid() {\n return createUserid;\n }", "public Integer getCreateUserId() {\n return createUserId;\n }", "public void setCreatedByUser(long createdByUser);", "public void setCreatedUserId(Integer value) {\n this.createdUserId = value;\n }", "public void setCreatedUserId(Integer value) {\n this.createdUserId = value;\n }", "public void setUserCreated(java.lang.String userCreated) {\n\t\t_tempNoTiceShipMessage.setUserCreated(userCreated);\n\t}", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "private ServerCommand processCreateUserCommand(RoMClient client, CreateUserClientCommand createUserCommand) {\r\n \t\tboolean success = false;\r\n \r\n \t\t// Check if user is admin\r\n \t\tif (client.getIsAdmin()) {\r\n \t\t\tsuccess = this.dataLayer.addUser(createUserCommand.getNewUserName(), createUserCommand.getSHA1EncryptedPassword());\r\n \t\t}\r\n \r\n \t\tServerCommand serverResponseCommand = new CreateUserServerCommand(success, createUserCommand);\r\n \r\n \t\treturn serverResponseCommand;\r\n \t}", "public void setCreateUserIdentity(Short createUserIdentity) {\n this.createUserIdentity = createUserIdentity;\n }", "public void setCreateUserIdentity(Short createUserIdentity) {\n this.createUserIdentity = createUserIdentity;\n }", "public void createUser(User user) {\n\n\t}", "public void setQuestionCreateUser(String questionCreateUser) {\n this.questionCreateUser = questionCreateUser;\n }", "@Override\n public void createUser(User user) {\n run(()->{this.userDAO.save(user);});\n\n }", "public void setCreatedBy(User createdBy)\n\t{\n\t\t this.addKeyValue(\"Created_By\", createdBy);\n\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getCreateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(CREATEUSER_PROP.get());\n }", "public void setCreatedUserId(Integer value) {\n set(4, value);\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getCreateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(CREATEUSER_PROP.get());\n }", "public void createUser(UserRow user) throws AdminPersistenceException {\n SynchroReport.debug(\"UserTable.createUser()\", \"Ajout de \" + user.login\n + \", requête : \" + INSERT_USER, null);\n insertRow(INSERT_USER, user);\n \n CallBackManager.invoke(CallBackManager.ACTION_AFTER_CREATE_USER, user.id,\n null, null);\n }", "@Override\n\tpublic int create(Users user) {\n\t\tSystem.out.println(\"service:creating new user...\");\n\t\treturn userDAO.create(user);\n\t}", "public void setCreatedBy(Number value)\n {\n setAttributeInternal(CREATEDBY, value);\n }", "public void userCreated(UserCreateCommand command) {\n\t\t}", "public void setCreatedByUser(\n @Nullable\n final String createdByUser) {\n rememberChangedField(\"CreatedByUser\", this.createdByUser);\n this.createdByUser = createdByUser;\n }", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "public void setCreatedBy(com.sforce.soap.enterprise.sobject.User createdBy) {\r\n this.createdBy = createdBy;\r\n }", "public User getCreateUser()\r\n/* */ {\r\n/* 144 */ return this.createUser;\r\n/* */ }", "public void setCreatedBy (com.myconnector.domain.UserData createdBy) {\n\t\tthis.createdBy = createdBy;\n\t}", "@Override\n\tpublic String DBcreateUser(String userJson) {\n\t\tUser newUser = (User) jsonToUserPOJO(userJson);\n\t\tString id = userRepository.create(newUser);\n\t\treturn id;\n\t}", "public void setCreateUserip(String createUserip) {\r\n\t\tthis.createUserip = createUserip;\r\n\t}", "@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}", "public void setCreateUsermac(String createUsermac) {\r\n\t\tthis.createUsermac = createUsermac;\r\n\t}", "public void setCreatedBy(com.sforce.soap.enterprise.sobject.User createdBy) {\n this.createdBy = createdBy;\n }", "@Transactional\n\t@Override\n\tpublic void createUser(User user) {\n\t\tString token = UUID.randomUUID().toString();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.DAY_OF_YEAR, 1);\n\n\t\tuser.setExpiryDate(cal.getTime());\n\t\tuser.setToken(token);\n\t\tAccount account = user.getAccount();\n\t\tRole role = new Role(\"ROLE_CUSTOMER\");\n\t\taccount.setRole(role);\n\t\taccount.setEnabled(false);\n\t\taccountService.createAccount(account);\n\t\tuserRepository.insertUser(user);\n\t\tthis.sendRegistrationToken(user);\n\t}", "public Long getUserCreate() {\n return userCreate;\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }" ]
[ "0.7004847", "0.68713623", "0.6827299", "0.6812848", "0.6812848", "0.68046427", "0.6803149", "0.6770995", "0.6770995", "0.67536384", "0.6731954", "0.6731954", "0.6710504", "0.64771956", "0.6467618", "0.6451992", "0.64509636", "0.6345841", "0.63442266", "0.634291", "0.6339817", "0.6337468", "0.63136625", "0.63136625", "0.6288263", "0.6288263", "0.6273339", "0.6273339", "0.6243379", "0.6232238", "0.6232238", "0.6217202", "0.6217202", "0.62025046", "0.62025046", "0.62025046", "0.62025046", "0.62025046", "0.62025046", "0.62025046", "0.62025046", "0.62025046", "0.62025046", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.620164", "0.61885697", "0.6168373", "0.61658597", "0.6140453", "0.6123836", "0.6088897", "0.60851467", "0.60512173", "0.6033534", "0.6024024", "0.5952936", "0.5921776", "0.59205663", "0.59205663", "0.58691794", "0.5863657", "0.58108765", "0.58087295", "0.58087295", "0.57826406", "0.5763414", "0.57360023", "0.57326293", "0.57313603", "0.5706426", "0.568624", "0.56775016", "0.56731606", "0.5653229", "0.5649675", "0.56397206", "0.5631719", "0.5624022", "0.5608096", "0.5588918", "0.5579142", "0.5572664", "0.55688035", "0.55500686", "0.55487573", "0.55333406", "0.5526733", "0.55244637" ]
0.69144845
2
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.create_time
public Date getCreateTime() { return createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreatetime() {\n return createtime;\n }", "public Integer getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Integer getCreateTime() {\n return createTime;\n }", "public Long getCreateTime() {\n return createTime;\n }", "public Date getCreateTime() {\n return createTime;\n }", "public Timestamp getCreateTime() {\n return createTime;\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public String getCreatetime() {\r\n return createtime;\r\n }", "public long getCreateTime() {\n return this.createTime;\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public String getCreateTime() {\r\n return createTime;\r\n }", "public java.sql.Timestamp getCreateTime () {\r\n\t\treturn createTime;\r\n\t}", "public String getCreatetime() {\n return createtime;\n }", "public String getCreatetime() {\n return createtime;\n }" ]
[ "0.7190169", "0.70682776", "0.705193", "0.705193", "0.70430654", "0.70172894", "0.6968198", "0.6965138", "0.6956736", "0.6956736", "0.69137007", "0.6911592", "0.6906646", "0.6906646", "0.6906646", "0.6906646", "0.6906646", "0.6906646", "0.68981916", "0.6897067", "0.68916595", "0.68916595" ]
0.6889858
87
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.create_time
public void setCreateTime(Date createTime) { this.createTime = createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "private void setCreateTime(long createTime) {\n this.createTime = createTime;\n }", "public void setCreatetime(Long createtime) {\n this.createtime = createtime;\n }", "public void setCreateTime (java.sql.Timestamp createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}", "public void setTimeCreate(Date timeCreate) {\n this.timeCreate = timeCreate;\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(Integer createTime) {\r\n this.createTime = createTime;\r\n }" ]
[ "0.708328", "0.708328", "0.6753023", "0.67402846", "0.67402846", "0.67402846", "0.6685616", "0.6685616", "0.6685616", "0.6685616", "0.6685616", "0.6685616", "0.6685616", "0.6685616", "0.6671795", "0.66042286", "0.66041124", "0.65940684", "0.65861845", "0.65861845", "0.65861845", "0.65861845", "0.65861845", "0.65861845", "0.65796447", "0.6542705" ]
0.6509601
95
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.update_user
public Integer getUpdateUser() { return updateUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUpdateUserId() {\r\n return updateUserId;\r\n }", "public Long getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser () {\r\n\t\treturn updateUser;\r\n\t}", "public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}", "public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}", "public String getUpdateUser() {\r\n return updateUser;\r\n }", "public String getUpdateUser() {\r\n return updateUser;\r\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser; \n }", "public Long getUpdateUserid() {\r\n\t\treturn updateUserid;\r\n\t}", "public Integer getUpdateUserid() {\n return updateUserid;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getUpdateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(UPDATEUSER_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getUpdateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(UPDATEUSER_PROP.get());\n }", "public UserItem getUpdatedBy() {\n return updatedBy;\n }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "public String getUpdUserid() {\n return updUserid;\n }", "public String updatedBy() {\n return this.updatedBy;\n }", "public Long getUpdatedBy() {\n return updatedBy;\n }", "public Long getUpdatedBy() {\n return updatedBy;\n }", "public Long getUpdatedBy() {\n return updatedBy;\n }", "public Long getUpdatedBy() {\n return updatedBy;\n }", "public String getUpdatedBy() {\r\n return updatedBy;\r\n }", "public void setUpdateUserId(String updateUserId) {\r\n this.updateUserId = updateUserId;\r\n }", "public void setUpdateUser (String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}", "@Override\n\tpublic int update(TbUser user) {\n\t\treturn new userDaoImpl().update(user);\n\t}", "public Long getUpdatedBy() {\n\t\treturn updatedBy;\n\t}", "public String getUpdateBy() {\r\n return updateBy;\r\n }", "public Long getUpdateBy() {\n return updateBy;\n }", "public Long getUpdateBy() {\n return updateBy;\n }", "public Long getUpdateBy() {\n return updateBy;\n }", "public void setUpdateUser(String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}", "public void setUpdateUser(String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}", "public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser;\n }", "@Override\n public boolean updateUserById(User user ) {\n boolean tag=false;\n this.sqlSession = MyBatisUtils.getSqlSession();\n tag = this.sqlSession.getMapper(UserDao.class).updateUserInfoById(user);\n sqlSession.commit();\n return tag;\n }", "public void setUpdatedBy(UserItem userItem) {\n this.updatedBy = userItem;\n }", "public void setUpdateUser(Integer updateUser) {\n this.updateUser = updateUser;\n }", "public void setUpdateUser(Long updateUser) {\n this.updateUser = updateUser;\n }", "public String getUpdatedBy() {\r\n\t\treturn updatedBy;\r\n\t}", "public Integer getModifyUser() {\n return modifyUser;\n }", "public String getUpdateBy() {\n return updateBy;\n }", "public String getUpdateBy() {\n return updateBy;\n }", "public String getUpdateBy() {\n return updateBy;\n }", "public Integer getUpdateby() {\n return updateby;\n }", "public String getUpdateUsername() {\r\n\t\treturn updateUsername;\r\n\t}", "public String getUpdatedBy() {\n\t\treturn updatedBy;\n\t}", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public int getUpdatedBy();", "public String getUpdateBy() {\n\t\treturn updateBy;\n\t}", "public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}", "public int updateByPrimaryKey(User record) {\r\n int rows = getSqlMapClientTemplate().update(\"spreader_tb_user.ibatorgenerated_updateByPrimaryKey\", record);\r\n return rows;\r\n }", "public String getUpdatedBy() {\n return (String)getAttributeInternal(UPDATEDBY);\n }", "public String getUpdatedBy() {\n return (String)getAttributeInternal(UPDATEDBY);\n }", "public MessageResponseOfUserModelNuLtuh91 getUpdateUserResult() {\n return localUpdateUserResult;\n }", "public String updateUser(){\n\t\tusersservice.update(usersId, username, password, department, role, post, positionId);\n\t\treturn \"Success\";\n\t}", "public String getUpdatedBy() {\n return (String) getAttributeInternal(UPDATEDBY);\n }", "public void setUpdateUserid(Integer updateUserid) {\n this.updateUserid = updateUserid;\n }", "public String getUpdateUsermac() {\r\n\t\treturn updateUsermac;\r\n\t}", "public String getUpdateUserip() {\r\n\t\treturn updateUserip;\r\n\t}", "@Override\r\n\tpublic int updateUser(Users user) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int update(User user) {\n\t\treturn 0;\r\n\t}", "public String getModifyUser() {\n return modifyUser;\n }", "public String getModifyUser() {\n return modifyUser;\n }", "public String getModifyUser() {\n return modifyUser;\n }", "public String getModifyUser() {\n return modifyUser;\n }", "public String getModifyUser() {\n return modifyUser;\n }", "@Override\n\tpublic int updateUser(SmbmsUser user) {\n\t\treturn sud.updateUser(user);\n\t}", "public Long getModifieduser() {\n return modifieduser;\n }", "Long getUserUpdated();", "public int update(User user) throws SQLException {\n\t\treturn 0;\n\t}", "public void setUpdateUserid(Long updateUserid) {\r\n\t\tthis.updateUserid = updateUserid;\r\n\t}", "public String getUpdatedby() {\n return (String)getAttributeInternal(UPDATEDBY);\n }", "public Integer getModifiedUser() {\n\t\treturn modifiedUser;\n\t}", "public int updateUser(User user) {\n\t\t\n\t\treturn 1;\n\t}", "@Override\n\tpublic int update(Users user) {\n\t\treturn userDAO.update(user);\n\t}", "public User updateUser(User update) {\n\t\treturn userRepository.save(update);\n\t}", "@Override\n\tpublic Integer update(UserOrder e) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic int updateUser(User user, String userName) {\n\t\treturn 0;\r\n\t}", "public Integer getModifiyUserId() {\n return modifiyUserId;\n }", "public String getLastUpdateUser() {\n return lastUpdateUser;\n }", "public String getLastUpdateUser() {\n return lastUpdateUser;\n }", "@Override\n\tpublic String update(User user) {\n\t\treturn null;\n\t}", "public Integer getModifiedUserId() {\n return this.modifiedUserId;\n }", "public Integer getModifiedUserId() {\n return this.modifiedUserId;\n }", "public int Edituser(Long userid, Long brokerId, String firstname,\r\n\t\tString lastname, String address, String city, String eMail, Long phone,\r\n\t\tLong pincode) throws SQLException {\n\tLong useridd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select user_id from customer where login_id=\"+userid+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tuseridd=rs.getLong(1);\r\n\t}\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update customer set address='\"+address+\"',city='\"+city+\"',e_mail='\"+eMail+\"',phone=\"+phone+\",pincode=\"+pincode+\" where user_id=\"+useridd+\"\");\r\n\treturn i;\r\n}" ]
[ "0.72059435", "0.71999544", "0.7186367", "0.7180869", "0.7180869", "0.716759", "0.716759", "0.71101916", "0.71101916", "0.71101916", "0.71101916", "0.71101916", "0.71101916", "0.7080927", "0.7068268", "0.70666903", "0.6926352", "0.69088143", "0.6847381", "0.64842093", "0.6404035", "0.63145983", "0.6275103", "0.6275103", "0.6275103", "0.6275103", "0.6250721", "0.6247007", "0.6239083", "0.6238364", "0.62236005", "0.61969924", "0.6187199", "0.6187199", "0.6187199", "0.6174357", "0.6174357", "0.6167519", "0.61637676", "0.6157652", "0.615552", "0.6142098", "0.6139395", "0.61294234", "0.61283946", "0.61283946", "0.61283946", "0.61051935", "0.6093508", "0.6091036", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6082366", "0.6056641", "0.60296285", "0.6011393", "0.5981209", "0.5981209", "0.59790593", "0.5959769", "0.5955931", "0.5940541", "0.59219027", "0.5911148", "0.5889788", "0.58694214", "0.58674866", "0.58674866", "0.58674866", "0.58674866", "0.58674866", "0.58624005", "0.585547", "0.585294", "0.5851234", "0.5843749", "0.584352", "0.5834801", "0.5796429", "0.5779923", "0.5769496", "0.5766239", "0.5764623", "0.57512665", "0.5719581", "0.5719581", "0.5713911", "0.5711161", "0.5711161", "0.5693439" ]
0.7230076
0
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.update_user
public void setUpdateUser(Integer updateUser) { this.updateUser = updateUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpdatedBy(UserItem userItem) {\n this.updatedBy = userItem;\n }", "public void setUpdateUser(Long updateUser) {\n this.updateUser = updateUser;\n }", "private void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }", "public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser;\n }", "public void setUpdateUser (String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}", "public void setUpdateUser(String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}", "public void setUpdateUser(String updateUser) {\r\n\t\tthis.updateUser = updateUser;\r\n\t}", "public void setUpdateUserId(String updateUserId) {\r\n this.updateUserId = updateUserId;\r\n }", "public void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }", "public void setUpdateUserid(Integer updateUserid) {\n this.updateUserid = updateUserid;\n }", "public void setUpdateUser(String updateUser) {\r\n this.updateUser = updateUser == null ? null : updateUser.trim();\r\n }", "public void setUpdateUser(String updateUser) {\r\n this.updateUser = updateUser == null ? null : updateUser.trim();\r\n }", "public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }", "public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }", "public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }", "public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }", "public void setUpdateUser(String updateUser) {\n this.updateUser = updateUser == null ? null : updateUser.trim();\n }", "public void setUpdateUserid(Long updateUserid) {\r\n\t\tthis.updateUserid = updateUserid;\r\n\t}", "@Override\n\tpublic int update(TbUser user) {\n\t\treturn new userDaoImpl().update(user);\n\t}", "@Override\r\n\tpublic int updateUser(Users user) {\n\t\treturn 0;\r\n\t}", "public void setUpdateUser(String newVal) {\n if ((newVal != null && this.updateUser != null && (newVal.compareTo(this.updateUser) == 0)) || \n (newVal == null && this.updateUser == null && updateUser_is_initialized)) {\n return; \n } \n this.updateUser = newVal; \n\n updateUser_is_modified = true; \n updateUser_is_initialized = true; \n }", "@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}", "@Override\r\n\tpublic int updateUser(User user, String userName) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int updateUser(SmbmsUser user) {\n\t\treturn sud.updateUser(user);\n\t}", "@Override\r\n\tpublic void update(User user) {\n\t\tint iRet = dao.update(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"修改失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"修改成功\");\r\n\t}", "@Override\n public boolean updateUserById(User user ) {\n boolean tag=false;\n this.sqlSession = MyBatisUtils.getSqlSession();\n tag = this.sqlSession.getMapper(UserDao.class).updateUserInfoById(user);\n sqlSession.commit();\n return tag;\n }", "public String getUpdateUserId() {\r\n return updateUserId;\r\n }", "public void updateUser(User user) {\n\t\t\r\n\t}", "@Override\n\t@Transactional\n\tpublic void updateUser(User user) {\n\t\tDate date = DateUtils.getCurrentDateObject(DateUtils.IST);\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tCustomUserDetails curUser = ((CustomUserDetails) SecurityContextHolder.getContext().getAuthentication()\n\t\t\t\t.getPrincipal());\n\t\tStringBuilder sb = new StringBuilder(\"UPDATE user SET \").append(\"LAST_MODIFIED_DATE=:dt, \")\n\t\t\t\t.append(\"LAST_MODIFIED_BY=:curEmpId, \").append(\"USERNAME=:username, \").append(\"ACTIVE=:active, \")\n\t\t\t\t.append(\"NAME=:name \");\n\t\tparams.put(\"userId\", user.getUserId());\n\t\tparams.put(\"dt\", date);\n\t\tparams.put(\"curEmpId\", curUser.getUserId());\n\t\tparams.put(\"username\", user.getUsername().toLowerCase());\n\t\tparams.put(\"active\", user.isActive());\n\t\tparams.put(\"name\", WordUtils.capitalizeFully(user.getName()));\n\t\tif (curUser.hasBusinessFunction(\"ROLE_BF_OUTSIDE_ACCESS\")) {\n\t\t\tsb.append(\", OUTSIDE_ACCESS=:outsideAccess\");\n\t\t\tparams.put(\"outsideAccess\", user.isOutsideAccess());\n\t\t}\n\t\tsb.append(\" WHERE user.USER_ID=:userId\");\n\t\tthis.namedParameterJdbcTemplate.update(sb.toString(), params);\n\n\t\tString sqlString = \"UPDATE user_role SET ROLE_ID=:roleId WHERE USER_ID=:userId\";\n\t\tparams.clear();\n\t\tparams.put(\"userId\", user.getUserId());\n\t\tparams.put(\"roleId\", user.getRole().getRoleId());\n\t\tthis.namedParameterJdbcTemplate.update(sqlString, params);\n\t\tparams.clear();\n\t\tString query = \" DELETE FROM user_vendor_mapping WHERE USER_ID=:userId; \";\n\t\tparams.put(\"userId\", user.getUserId());\n\t\tthis.namedParameterJdbcTemplate.update(query, params);\n\n\t}", "@Override\n\tpublic void updateUser(user theUser) {\n\t}", "@Override\n\tpublic void updateUser(User user)\n\t{\n\n\t}", "public Long getUpdateUserid() {\r\n\t\treturn updateUserid;\r\n\t}", "public UserItem getUpdatedBy() {\n return updatedBy;\n }", "@Override\r\n\tpublic int update(User user) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void update(User user) throws DAOException {\n\t\t\n\t}", "public String getUpdateUser() {\r\n return updateUser;\r\n }", "public String getUpdateUser() {\r\n return updateUser;\r\n }", "public Integer getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}", "public String getUpdateUser() {\r\n\t\treturn updateUser;\r\n\t}", "public Long getUpdateUser() {\n return updateUser;\n }", "public int update(User user) throws SQLException {\n\t\treturn 0;\n\t}", "public String getUpdateUser () {\r\n\t\treturn updateUser;\r\n\t}", "@Override\n\tpublic Boolean updateUser(User user) {\n\t\treturn null;\n\t}", "public Integer getUpdateUserid() {\n return updateUserid;\n }", "public String getUpdateUser() {\n return updateUser; \n }", "void setUserUpdated(final Long userUpdated);", "ManageUserResponse updateUser(UserUpdateRequest user, Long userId);", "public void update(User userForgot) throws SQLException {\n\t\ttry {\n\n\t\t\tthis.TryConnect();\n\n\t\t\tthis.m_objData.SetStoreName(\"sys_user_update(?,?,?,?,?,?,?)\");\n\t\t\tthis.m_objData.Parameters.setString(1, userForgot.getUser_name());\n\t\t\tthis.m_objData.Parameters.setString(2, userForgot.getPassword());\n\t\t\tthis.m_objData.Parameters.setString(3,\n\t\t\t\t\tuserForgot.getPassword_hint());\n\t\t\tthis.m_objData.Parameters.setString(4, userForgot.getClient_id());\n\t\t\tthis.m_objData.Parameters.setInt(5, userForgot.getStatus_id());\n\t\t\tthis.m_objData.Parameters.setString(6, userForgot.getUpdate_user());\n\t\t\tthis.m_objData.Parameters.setString(7, userForgot.getForgot_key());\n\n\t\t\tthis.m_objData.ExecNoneQuery();\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tthis.TryDisconnect();\n\t\t}\n\t}", "public void userUpdate(User user) {\n\t\tdao.userUpdate(user);\n\t}", "public int updateByPrimaryKey(User record) {\r\n int rows = getSqlMapClientTemplate().update(\"spreader_tb_user.ibatorgenerated_updateByPrimaryKey\", record);\r\n return rows;\r\n }", "@Override\n\tpublic void updateUser(User user) {\n\t userMapper.updateUser(user);\n\t}", "public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public String getUpdateUser() {\n return updateUser;\n }", "public int updateUser(User user) {\n\t\t\n\t\treturn 1;\n\t}", "public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }", "@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}", "public void updateUser(User user) {\n\t\t\r\n\t\tsessionFactory.getCurrentSession().update(user);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void updateUser(User user) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t try\r\n\t\t {\r\n\t\t session.beginTransaction();\r\n\t\t Query query = session.createQuery(\"from User where userName = :user\");\r\n\t\t User ifUserExist =(User) query.setParameter(\"user\",user.getUserName()).uniqueResult();\r\n\t\t long id = ifUserExist.getId();\r\n\t\t Query query2 = session.createQuery(\"UPDATE User SET password = :pass , userName= :user\" +\r\n\t\t \" where id = :d\");\r\n\t\t query2.setParameter(\"pass\", user.getPassword());\r\n\t\t query2.setParameter(\"user\", user.getUserName());\r\n\t\t query2.setParameter(\"d\", id);\r\n\t\t query2.executeUpdate();\r\n\t\t session.getTransaction().commit();\r\n\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 } \r\n\t}", "@Override\n\tpublic int modifyUser(User user) {\n\t\tuser.setUpdateTime(new Date());\n\t\treturn userDao.updateUserById(user);\n\t}", "@Override\n\tpublic void update(User user)\n\t{\n\t\tuserDAO.update(user);\n\t}", "@Override\r\n\tpublic void update(User user) {\n\t\tuserDao.update(user);\r\n\t}", "public int Edituser(Long userid, Long brokerId, String firstname,\r\n\t\tString lastname, String address, String city, String eMail, Long phone,\r\n\t\tLong pincode) throws SQLException {\n\tLong useridd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select user_id from customer where login_id=\"+userid+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tuseridd=rs.getLong(1);\r\n\t}\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update customer set address='\"+address+\"',city='\"+city+\"',e_mail='\"+eMail+\"',phone=\"+phone+\",pincode=\"+pincode+\" where user_id=\"+useridd+\"\");\r\n\treturn i;\r\n}", "@Override\r\n\tpublic boolean updateUser(user user) {\n\t\tif(userdao.updateByPrimaryKey(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "@Override\r\n\tpublic void updateUser(TUsers tuser) {\n\t\tdao.updateUser(tuser);\r\n\t}", "@Override\n\tpublic String updateUser(String user) {\nreturn null;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getUpdateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(UPDATEUSER_PROP.get());\n }", "public void update(com.conurets.inventory.model.User model) throws InventoryException {\n }", "@Override\n\tpublic void editUser(ERSUser user) {\n\t\tuserDao.updateUser(user);\n\t}", "@Override\n\tpublic void updateItem(User entity) {\n\t\tuserRepository.save(entity);\n\t}", "@Override\n\tpublic Integer update(UserOrder e) {\n\t\treturn null;\n\t}", "public void setUpdUserid(String updUserid) {\n this.updUserid = updUserid;\n }", "@Override\n\tpublic int update(Users user) {\n\t\treturn userDAO.update(user);\n\t}", "public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }", "public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }", "public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getUpdateUser() {\n return (entity.User)__getInternalInterface().getFieldValue(UPDATEUSER_PROP.get());\n }", "public void setUserItem(UserItem userItem) {\n attributes.put(KEY_USER_ITEM, userItem);\n this.getHttpRequest().setAttribute(KEY_USER_ITEM, userItem);\n }", "public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}", "public void updateUser(UserRow user) throws AdminPersistenceException {\n SynchroReport.debug(\"UserTable.updateUser()\", \"Maj de \" + user.login\n + \", Id=\" + user.id + \", requête : \" + UPDATE_USER, null);\n updateRow(UPDATE_USER, user);\n }", "public void setUpdatedBy( Integer updatedBy ) {\n this.updatedBy = updatedBy;\n }", "ResponseMessage updateUser(final User user);", "public String updateUser(){\n\t\tusersservice.update(usersId, username, password, department, role, post, positionId);\n\t\treturn \"Success\";\n\t}", "public void modifyUser() {\n\t\tUser selectedUser = null;\r\n\t\tselectedUser = tableUser.getSelectionModel().getSelectedItem();\r\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tif (selectedUser != null) {\r\n\t\t\t\tframeManager.modifyUser(user, selectedUser);\r\n\t\t\t\tpesquisar();\r\n\t\t\t} else {\r\n\t\t\t\tAlertUtils.alertErroSelecionar(\"Para modificar um usuario é necessário selecionar um!\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "@Override\n public void updateUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.update(u);\n logger.info(\"User updated successfully, User Details=\"+u);\n }", "@Override\n public User update(User user) {\n return dao.update(user);\n }", "public void updateUser(User user) {\n\n String updateSql = \"update USER set name = ?, age = ? , salary = ? where id = ?\";\n jdbcTemplate.update(updateSql, user.getName(), user.getAge(), user.getSalary(), user.getId());\n }", "public DAO updateUserMail(User user) throws SQLException{\n String SQL = \"UPDATE user SET email = ? where id = ?\";\n PreparedStatement ps = connection.prepareStatement(SQL);\n ps.setString(1, user.getEmail());\n ps.setLong(2, user.getId());\n int result = ps.executeUpdate();\n if(result > 0) System.out.println(\"Atualização de email concluída!\");\n ps.close();\n return this;\n\n }", "@Override\n\tpublic User update(User u) {\n\t\tSystem.out.println(\"OracleDao is update\");\n\t\treturn null;\n\t}", "public boolean update(UserDTO user){\r\n try {\r\n PreparedStatement preSta = conn.prepareStatement(sqlUpdateUser);\r\n preSta.setString(1,user.getEmail());\r\n preSta.setString(2, user.getPassword());\r\n preSta.setInt(3, user.getRole());\r\n preSta.setInt(4, user.getUserId());\r\n if(preSta.executeUpdate() >0){\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n error=\"khong ton tai userId\"+ user.getUserId();\r\n return false;\r\n }", "@Override\n\tpublic int updateUser(User user) {\n\t\treturn userDao.updateUser(user);\n\t}", "public void setUserOrder(User userOrder) {\n this.userOrder = userOrder;\n }", "public void update(User u) {\n\r\n\t}", "public void update(User user) {\n\t\tmapper.update(user);\n\t}", "public int updateByPrimaryKeySelective(User record) {\r\n int rows = getSqlMapClientTemplate().update(\"spreader_tb_user.ibatorgenerated_updateByPrimaryKeySelective\", record);\r\n return rows;\r\n }" ]
[ "0.710976", "0.69433165", "0.69185627", "0.6909782", "0.6905505", "0.6869907", "0.6869907", "0.67375135", "0.6721793", "0.6507735", "0.64940304", "0.64940304", "0.64645594", "0.64645594", "0.64645594", "0.64645594", "0.64645594", "0.6413732", "0.630379", "0.62518305", "0.62141156", "0.6206719", "0.6194707", "0.61872345", "0.61774486", "0.61627513", "0.61546075", "0.6130139", "0.61246806", "0.61242384", "0.6123757", "0.6120646", "0.60883635", "0.60814637", "0.6079435", "0.60693985", "0.60693985", "0.60614145", "0.60604787", "0.60604787", "0.60421", "0.60385984", "0.6031808", "0.6031695", "0.6027663", "0.60217917", "0.6021233", "0.6015119", "0.60107714", "0.60060394", "0.6005517", "0.5996126", "0.5987714", "0.5986317", "0.5986317", "0.5986317", "0.5986317", "0.5986317", "0.5986317", "0.5970374", "0.596929", "0.5955245", "0.5916811", "0.5916693", "0.58972627", "0.5896046", "0.5889485", "0.58877707", "0.5883871", "0.5874845", "0.58724946", "0.5871925", "0.58675796", "0.58618563", "0.5858391", "0.5855536", "0.5839451", "0.5827452", "0.58244616", "0.58244616", "0.58244616", "0.5818287", "0.58122736", "0.5808424", "0.5807974", "0.57996136", "0.5793775", "0.5785763", "0.57743126", "0.5764847", "0.57641244", "0.5762313", "0.5759693", "0.57569194", "0.5752671", "0.5742572", "0.574154", "0.57382905", "0.5732046", "0.5730221" ]
0.70631754
1
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.update_time
public Date getUpdateTime() { return updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatetime();", "public Date getUpdateTime()\n {\n return data.updateTime;\n }", "public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }", "public Date getTimeUpdate() {\n return timeUpdate;\n }", "public Timestamp getUpdateTime() {\n return updateTime;\n }", "public Long getUpdateAt() {\n return updateAt;\n }", "public Integer getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n\t\treturn this.updatedTime;\r\n\t}", "public Long getUpdateTime() {\n return updateTime;\n }", "public Long getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTime() {\n return this.updateTime;\n }", "public Long getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\n\t\treturn this.updateTime;\n\t}", "public Date getUpdateTimestamp() {\n return updateTimestamp;\n }", "public DateTime getUpdatedTimestamp() {\n\t\treturn getDateTime(\"sys_updated_on\");\n\t}", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "public Date getUpdateTimestamp() {\r\n return updateTimestamp;\r\n }", "public Date getUpdateTime() {\r\n\t\treturn updateTime;\r\n\t}", "public String getUpdTime() {\n return updTime;\n }", "public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }", "public String getUpdateTime() {\n\t\t\treturn updateTime;\n\t\t}", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public Date getUpdateTimeDb() {\r\n\t\treturn updateTimeDb;\r\n\t}", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getUpdateTime() {\n return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;\n }", "public Timestamp getUpdateDate() {\n return updateDate;\n }", "@ApiModelProperty(value = \"修改时间\")\n public Date getRowUpdateTime() {\n return rowUpdateTime;\n }", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }", "int getUpdateTriggerTime();" ]
[ "0.7365351", "0.7305223", "0.7305223", "0.7191507", "0.7184367", "0.7184367", "0.71586406", "0.71586406", "0.70849", "0.70603204", "0.70603204", "0.70603204", "0.70500565", "0.6941025", "0.6941025", "0.691094", "0.69107735", "0.6878023", "0.6874058", "0.6822726", "0.6782219", "0.6782137", "0.6757756", "0.6745965", "0.67453194", "0.67453194", "0.67357665", "0.6721768", "0.6713761", "0.6713761", "0.6713761", "0.6713761", "0.6708324", "0.6708324", "0.6708324", "0.6708324", "0.6695263", "0.6686881", "0.6679286", "0.66700834", "0.666569", "0.66553587", "0.6649197", "0.6648109", "0.6645734", "0.6630933", "0.66229874", "0.6622672", "0.6622672", "0.6622672", "0.66149306", "0.6614798", "0.6606375", "0.6563382", "0.6558175", "0.65267414", "0.65234315" ]
0.6658522
72
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.update_time
public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdateTime (java.sql.Timestamp updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setUpdateTime(DateTime updateTime) {\n this.updated = updateTime;\n }", "public void setUpdateDatetime(Long updateDatetime) {\n this.updateDatetime = updateDatetime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdateTime(Timestamp updateTime) {\n this.updateTime = updateTime;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}", "public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public void setUpdateDatetime(Date updateDatetime) {\r\n\t\tthis.updateDatetime = updateDatetime;\r\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public void setUpdateDatetime(Date updateDatetime);", "public void setUpdateTime(com.flexnet.opsembedded.webservices.DateTimeQueryType updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(java.util.Date updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Integer updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTimeDb(Date updateTimeDb) {\r\n\t\tthis.updateTimeDb = updateTimeDb;\r\n\t}", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public void setUpdateTime(Long updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tsetField(\"updateTime\", updateTime);\n\t}", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }", "public void setUpdateTime(String updateTime) {\n\t\t\tthis.updateTime = updateTime;\n\t\t}", "public Date getUpdateDatetime();", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "void setLastUpdatedTime();" ]
[ "0.7136633", "0.7136633", "0.6856802", "0.6815624", "0.67840075", "0.67840075", "0.66866815", "0.6659164", "0.6599059", "0.6599059", "0.6599059", "0.65952337", "0.6574767", "0.6574767", "0.6572632", "0.65101755", "0.65101755", "0.65101755", "0.65101755", "0.64635503", "0.6449721", "0.6436226", "0.6436226", "0.64359707", "0.6431623", "0.6425373", "0.64240175", "0.6413506", "0.6413506", "0.6413506", "0.63999665", "0.6399943", "0.6387062", "0.6386879", "0.63754725", "0.636361", "0.636361", "0.636361", "0.6363111", "0.6349408", "0.6349408", "0.63463455", "0.63463455", "0.631789", "0.6294401", "0.627745", "0.627745", "0.6264661", "0.6230769", "0.61859065", "0.61605805", "0.61605805", "0.6154731", "0.6143608", "0.6143608", "0.6143608", "0.6138365" ]
0.6440089
60
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.remark
public String getRemark() { return remark; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOrderRemark() {\n return orderRemark;\n }", "public String getRemark() {\n return this.Remark;\n }", "public String getRemark() {\r\n return remark;\r\n }", "public java.lang.String getRemark () {\n\t\treturn _remark;\n\t}", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n\t\treturn remark;\r\n\t}", "public String getRemark() {\n\t\treturn remark;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "public java.lang.String getRemark () {\r\n\t\treturn remark;\r\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }", "public String getBusinessRemark() {\n return businessRemark;\n }", "public String getGoodsRemark() {\n return goodsRemark;\n }", "String getRemark();", "public java.lang.String getRemark2()\r\n {\r\n return _remark2;\r\n }", "public String getLineRemark() {\n return lineRemark;\n }", "public java.lang.String getActualRemark () {\n\t\treturn actualRemark;\n\t}", "public void setOrderRemark(String orderRemark) {\n this.orderRemark = orderRemark == null ? null : orderRemark.trim();\n }", "public java.lang.String getRemark1()\r\n {\r\n return _remark1;\r\n }", "public java.lang.String getRemark3()\r\n {\r\n return _remark3;\r\n }", "public String getComment() throws SQLException {\n\t\tloadFromDB();\n\t\treturn rev_comment;\n\t}", "public java.lang.CharSequence getORDERDESCRIPTION() {\n return ORDER_DESCRIPTION;\n }", "public java.lang.CharSequence getORDERDESCRIPTION() {\n return ORDER_DESCRIPTION;\n }", "public java.lang.String getRevisedRemark () {\n\t\treturn revisedRemark;\n\t}", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "public String getLovRemark() {\r\n\t\treturn lovRemark;\r\n\t}", "public String getRemarks() {\r\n return remarks;\r\n }", "public void setRemark (java.lang.String _remark) {\n\t\tthis._remark = _remark;\n\t}", "public void setRemark(String remark) {\r\n this.remark = remark;\r\n }", "public String getRemarks() { return remarks; }", "public Integer getRemarkPro() {\n return remarkPro;\n }", "public String getCOD_ITEM() {\n return COD_ITEM;\n }", "public String getRemarks() {\r\n return (String) getAttributeInternal(REMARKS);\r\n }", "public String getRemarks() {\n return remarks;\n }", "public String getRemarks() {\n return remarks;\n }", "public String getRemarks() {\n return remarks;\n }", "public String getRemarks() {\n return remarks;\n }", "public String getRemarks() {\n return remarks;\n }", "public String getRemarks() {\n return remarks;\n }", "public String getRemarks() {\n return remarks;\n }", "public void setRemark(String remark) {\r\n this.remark = remark;\r\n }", "public void setRemark(String remark) {\r\n this.remark = remark;\r\n }", "public String getRemarks() {\n return (String)getAttributeInternal(REMARKS);\n }", "public String getRemarks() {\n return (String)getAttributeInternal(REMARKS);\n }", "public String getRemarks() {\n return (String)getAttributeInternal(REMARKS);\n }", "public String getRemarks() {\n return (String)getAttributeInternal(REMARKS);\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public String getRemarks() {\n return (String) getAttributeInternal(REMARKS);\n }", "public String getRemarks() {\n return (String) getAttributeInternal(REMARKS);\n }", "@Override\n public com.gensym.util.Sequence getItemNotes() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.ITEM_NOTES_);\n return (com.gensym.util.Sequence)retnValue;\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }" ]
[ "0.728049", "0.66128725", "0.6596134", "0.65748775", "0.65641415", "0.65641415", "0.65641415", "0.65641415", "0.6504866", "0.64378595", "0.6393158", "0.63831794", "0.6236509", "0.61389714", "0.6099583", "0.6076881", "0.5907906", "0.58845174", "0.58477414", "0.58360577", "0.58247715", "0.56818116", "0.56664896", "0.563476", "0.56159216", "0.5605055", "0.5600274", "0.55984247", "0.55701494", "0.55568635", "0.55320805", "0.5525248", "0.55240303", "0.5512856", "0.551248", "0.55082333", "0.55082333", "0.55082333", "0.55082333", "0.55082333", "0.55082333", "0.55082333", "0.55004734", "0.55004734", "0.54870874", "0.54870874", "0.54870874", "0.54870874", "0.54848015", "0.54848015", "0.54848015", "0.54848015", "0.54848015", "0.54848015", "0.54848015", "0.54848015", "0.54848015", "0.5471124", "0.5471124", "0.54521143", "0.5451075", "0.5442771", "0.5442771", "0.5442771", "0.5442771", "0.5442771", "0.5442771", "0.5442771", "0.5442771", "0.5442771" ]
0.6529023
34
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.remark
public void setRemark(String remark) { this.remark = remark == null ? null : remark.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRemark(String remark)\n/* */ {\n/* 267 */ this.remark = remark;\n/* */ }", "public void setOrderRemark(String orderRemark) {\n this.orderRemark = orderRemark == null ? null : orderRemark.trim();\n }", "public String getOrderRemark() {\n return orderRemark;\n }", "public void setRemark(String remark) {\r\n this.remark = remark;\r\n }", "public void setRemark(String remark) {\r\n this.remark = remark;\r\n }", "public void setRemark(String remark) {\r\n this.remark = remark;\r\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\n this.remark = remark;\n }", "public void setRemark(String remark) {\r\n\t\tthis.remark = remark;\r\n\t}", "public void setRemark(String Remark) {\n this.Remark = Remark;\n }", "public void setRemark (java.lang.String _remark) {\n\t\tthis._remark = _remark;\n\t}", "public void setRemark (java.lang.String remark) {\r\n\t\tthis.remark = remark;\r\n\t}", "public void setRemark(String remark) {\r\n this.remark = remark == null ? null : remark.trim();\r\n }", "public void setRemark(String remark) {\r\n this.remark = remark == null ? null : remark.trim();\r\n }", "public void setRemark(String remark) {\n\t\tthis.remark = remark == null ? null : remark.trim();\n\t}", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\r\n return remark;\r\n }", "public String getRemark() {\n return this.Remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\n return remark;\n }", "public String getRemark() {\r\n\t\treturn remark;\r\n\t}", "public void setMoneyRemark(String moneyRemark) {\n this.moneyRemark = moneyRemark == null ? null : moneyRemark.trim();\n }", "protected void setRemark(EmployeeLeave employeeLeave, ResultSet rs, int rowNumber) throws SQLException{\n\t\tString remark = rs.getString(EmployeeLeaveTable.COLUMN_REMARK);\n\t\tif(remark == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\n\t\temployeeLeave.setRemark(remark);\n\t}", "protected void setDescriptionColumn(SQLUpdatableStatementIfc sql,\n OrderTransactionIfc orderTransaction)\n { // begin setDescriptionColumn()\n String description = null;\n AbstractTransactionLineItemIfc[] lineItems =\n orderTransaction.getLineItems();\n if (lineItems.length > 0)\n {\n description = lineItems[0].getItemDescription(LocaleMap.getLocale(LocaleMap.DEFAULT));\n }\n\n if (!Util.isEmpty(description))\n {\n sql.addColumn(ARTSDatabaseIfc.FIELD_ORDER_DESCRIPTION,\n makeSafeString(description));\n }\n\n }", "public String getRemark() {\n\t\treturn remark;\n\t}", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "public java.lang.String getRemark () {\n\t\treturn _remark;\n\t}", "public void setRemarks(String remarks) {\n this.remarks = remarks;\n }", "public void setItemDesc(String itemDesc) {\n this.itemDesc = itemDesc == null ? null : itemDesc.trim();\n }", "public void setBusinessRemark(String businessRemark) {\n this.businessRemark = businessRemark == null ? null : businessRemark.trim();\n }", "public java.lang.String getRemark () {\r\n\t\treturn remark;\r\n\t}", "public void setActualRemark (java.lang.String actualRemark) {\n\t\tthis.actualRemark = actualRemark;\n\t}", "public String getBusinessRemark() {\n return businessRemark;\n }", "public void setRemark1(java.lang.String _remark1)\r\n {\r\n this._remark1 = _remark1;\r\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public void setRemark2(java.lang.String _remark2)\r\n {\r\n this._remark2 = _remark2;\r\n }", "public void setGoodsRemark(String goodsRemark) {\n this.goodsRemark = goodsRemark == null ? null : goodsRemark.trim();\n }", "public void setRemarks(java.lang.String remarks) {\n this.remarks = remarks;\n }", "public String getGoodsRemark() {\n return goodsRemark;\n }", "public final void setRemarks(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String remarks)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Remarks.toString(), remarks);\n\t}", "public String getMoneyRemark() {\n return moneyRemark;\n }" ]
[ "0.6598138", "0.6525628", "0.6437325", "0.64318055", "0.64027184", "0.64027184", "0.635204", "0.635204", "0.635204", "0.635204", "0.635204", "0.635204", "0.635204", "0.635204", "0.635204", "0.6282532", "0.62288344", "0.6226659", "0.6225059", "0.6008228", "0.6008228", "0.5995046", "0.58105284", "0.5778995", "0.5778995", "0.5778995", "0.5778995", "0.57469535", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.5725281", "0.56963027", "0.5685569", "0.56496054", "0.5625773", "0.5602517", "0.5530582", "0.55153", "0.5499929", "0.5430351", "0.5424436", "0.5401768", "0.5401416", "0.53733504", "0.5372978", "0.53480506", "0.5318171", "0.5297784", "0.5295079", "0.52246875", "0.5208917", "0.51934713" ]
0.6006853
37